# Manage virtual machines

***

## Manage VMware VMs in the control panel

After a VMware virtual machine has been created, you can manage it in various ways. All VM management options can be found by clicking on the virtual machine's name in the overview under **Compute → Virtual machines** in the left-hand menu. VMware VM names begin with *wps*. Additionally, the Platform column indicates whether a server is a VMware or a KVM VM.

<figure><img src="/files/vmkKEpRIr7qrXsoSbaMR" alt=""><figcaption></figcaption></figure>

### Manage additional disks

In VMware, it is possible to add additional disks to the VM. This allows you to easily create additional storage space without needing to resize the system disk. These disks can be resized after they have been created if necessary.

#### Create an additional disk in the control panel

To add additional disks, click on the VM to which you want to add the disk. Then, we click on the **Disks** tab at the top and then on **Add additional disk**.

<figure><img src="/files/f4q9zmYAyLMTta1YutRe" alt=""><figcaption></figcaption></figure>

In the next dialog box, choose a name for the disk and specify its size. You also need to choose the type of disk you want—*Gold* or *Silver*. Gold is a faster disk with a higher price, while Silver is slower but more cost-effective.

Adjust the slider to increase or decrease the size. Once you have chosen the size, type, and name, click **Create disk**.

<figure><img src="/files/2ybiACl4Ky5KCQYwxu0y" alt=""><figcaption></figcaption></figure>

When the new disk is created, it will appear in the list of additional disks. Here, you can also see its SCSI ID. Make a note of the SCSI ID since you can use it to confirm that you are working on the correct disk later on.

<figure><img src="/files/O5OkVpbTZ7HDVb69q0G9" alt=""><figcaption></figcaption></figure>

Once the disk is created, you need to add the disk to the operating system so you can utilize it.

#### Add an additional disk to the VM's operating system

How you add an additional disk in the operating system differs between different systems. Here, we'll cover Microsoft Windows and Linux.

{% tabs %}
{% tab title="Microsoft Windows" %}
Once a new disk has been created in the control panel, you need to add the disk in Windows. Start by searching for the *Computer Management* tool. Open the Start menu, search for *Computer Management*, and click on it when it appears.

<figure><img src="/files/KXQdwqoXmipP2dd2HGiY" alt=""><figcaption></figcaption></figure>

Then double-click on **Storage**.

<figure><img src="/files/fi6kqhbOncqzRjyIrsvf" alt=""><figcaption></figcaption></figure>

In the next window, double-click on **Disk Management**.

<figure><img src="/files/k1lgkRzbz9jXjkrHokBD" alt=""><figcaption></figcaption></figure>

You should now see the new disk. In this example, it's *Disk 1*. To make sure it's the correct disk, right-click on *Disk 1* and select *Properties*.&#x20;

<figure><img src="/files/d08sYVEoxbQEnHMhqbt5" alt=""><figcaption></figcaption></figure>

Here, the **target ID** should correspond with the SCSI ID in the control panel. Once you've verified that it's the correct disk, click **OK**.

<figure><img src="/files/ug2qlkM6femg2IellT1e" alt=""><figcaption></figcaption></figure>

The new disk is marked as *Offline*. Before you can do anything to the disk, you need to set it as *Online* and initialize it.

Right-click on *Disk 1* and then click **Online**.

<figure><img src="/files/NnSPn57KqXdfnJpKno3Z" alt=""><figcaption></figcaption></figure>

Now, right-click on the disk again and click **Initialize Disk**.

<figure><img src="/files/81336HJpEO3UsGgQuClf" alt=""><figcaption></figcaption></figure>

A new dialog box is opened. Here, choose how the disk should be formatted—that is, which partition table type it should have. Leave it as **GPT**, which is the default. GPT is newer and more modern than *MBR*. Then click **OK**.

<figure><img src="/files/Ckzf46nfwXZfIMRnAMJA" alt=""><figcaption></figcaption></figure>

Now, right-click on the unallocated space in *Disk 1* and select **New Simple Volume...**

<figure><img src="/files/oJZte3oNyD44DnXVG23A" alt=""><figcaption></figcaption></figure>

A wizard will now start, which you can follow. Here, accept the default values and click **Next** until you reach the *Format Partition* step. Here, you can choose your own name for the new partition. The other options can be left as they are; let the file system be *NTFS,* and let *Perform a quick format* be checked. Then, click **Next**.

<figure><img src="/files/fzCGBxjSh6hbm6NvkgJ1" alt=""><figcaption></figcaption></figure>

In the next step, you get a summary of all the choices you've made. Here, click **Finish** if everything looks okay.&#x20;

The new disk will then be ready and appear under **This Computer**.
{% endtab %}

{% tab title="Linux" %}
Once a new disk has been created in the control panel, you need to add the disk to Linux. Start by locating the new disk. The easiest way is to check `dmesg`. When the new disk was attached to the VM, some log entries were created about it.

{% code title="Command" %}

```
sudo dmesg
```

{% endcode %}

{% code title="Output" %}

```
[  125.101726] scsi 2:0:1:0: Direct-Access     VMware   Virtual disk     2.0 PQ: 0 ANSI: 6
[  125.101877] sd 2:0:1:0: Attached scsi generic sg3 type 0
[  125.102050] sd 2:0:1:0: [sdb] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB)
[  125.102065] sd 2:0:1:0: [sdb] Write Protect is off
[  125.102067] sd 2:0:1:0: [sdb] Mode Sense: 3b 00 00 00
[  125.102096] sd 2:0:1:0: [sdb] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
[  125.133739] sd 2:0:1:0: [sdb] Attached SCSI disk
```

{% endcode %}

The newly attached disk is therefore *sdb*. You can confirm this by using `lsblk` to ensure that *sdb* is not mounted and does not have a file system.

{% code title="Command" %}

```
lsblk -f
```

{% endcode %}

{% code title="Command" %}

```
NAME   FSTYPE   FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0  squashfs 4.0                                                    0   100% /snap/core20/1891
loop1  squashfs 4.0                                                    0   100% /snap/lxd/24322
loop2  squashfs 4.0                                                    0   100% /snap/snapd/19122
sda
├─sda1 vfat     FAT32 esp   27A4-F1A9                             504.9M     1% /boot/efi
└─sda2 ext4     1.0   root  1634c48b-a2f2-4d20-b485-b29ff8374378   15.2G    16% /
sdb
sr0
sr1
```

{% endcode %}

You can also make sure it's the correct disk by comparing the SCSI ID from the control panel with the SCSI ID in the operating system. You can view the SCSI ID in Linux by using `lsblk`.

{% code title="Command" %}

```
lsblk --scsi
```

{% endcode %}

{% code title="Output" %}

```
NAME HCTL       TYPE VENDOR   MODEL                           REV SERIAL                           TRAN
sda  0:0:0:0    disk VMware   Virtual disk                   2.0  6000c29994d2cd6bc9e39c83a494766c
sdb  0:0:1:0    disk VMware   Virtual disk                   2.0  c848f60fb23b4d98aeb950f5fd6c66ab
sr0  1:0:0:0    rom  NECVMWar VMware Virtual IDE CDROM Drive 1.00 00000000000000000001             ata
```

{% endcode %}

In the output above, `sdb` has `0:0:1:0` in its second field. The third number in this field is the target (the T in HCTL stands for target), which corresponds to the SCSI ID.

Proceed to create a partition on the new disk. This can be done using the interactive tool `parted`. The program is pre-installed on most Linux distributions, but if it is not, it can be installed with the command `sudo apt install parted` in Debian and Ubuntu, and `sudo dnf install parted` in CentOS, AlmaLinux, and Fedora.

Start by launching `parted` and specify the device as an argument on which you want to create the partition. Be sure to double-check that it is the correct disk—this operation will erase everything on it.

{% code title="Command" %}

```
sudo parted /dev/sdb
```

{% endcode %}

{% code title="Output" %}

```
GNU Parted 3.4
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) 
```

{% endcode %}

To further ensure that this is a new, empty disk, type `print` at the prompt in `parted`.

<pre data-title="Session in parted. The prompt is shown as &#x27;(parted)&#x27;."><code><strong>(parted) print
</strong>Error: /dev/sdb: unrecognised disk label
Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
</code></pre>

There is neither a partition table nor a *disk label*, so you can assume that the disk is empty and unformatted.

The next step is to create a partition table on the disk. Select *GPT* as the partition table type.

<pre data-title="Session in parted. The prompt is shown as &#x27;(parted)&#x27;."><code><strong>(parted) mklabel gpt
</strong></code></pre>

If everything worked correctly, there would be no output. The program will simply return to the prompt.

Next, you need to create a partition on the disk. Here, we start the partition at 1MiB and set the end to 100%, meaning it will occupy the full size of the disk.

<pre data-title="Session in parted. The prompt is show as (parted)."><code><strong>(parted) mkpart primary 1MiB 100%
</strong></code></pre>

There will be no output if everything worked as it should. However, you can verify that everything looks correct by using `print`.

<pre data-title="Session in parted. The prompt is shown as &#x27;(parted)&#x27;."><code><strong>(parted) print
</strong>Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  10.7GB  10.7GB               primary
</code></pre>

Everything looks correct, so we exit `parted` with the command `quit`.

<pre class="language-terminal"><code class="lang-terminal"><strong>(parted) quit
</strong>Information: You may need to update /etc/fstab.
</code></pre>

Now, recheck the disks using `lsblk`. The new partition should now appear as *sdb1*.

{% code title="Command" %}

```
lsblk
```

{% endcode %}

{% code title="Output" %}

```
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0  63.5M  1 loop /snap/core20/1891
loop1    7:1    0 111.9M  1 loop /snap/lxd/24322
loop2    7:2    0  53.2M  1 loop /snap/snapd/19122
sda      8:0    0    20G  0 disk
├─sda1   8:1    0   512M  0 part /boot/efi
└─sda2   8:2    0  19.5G  0 part /
sdb      8:16   0    10G  0 disk
└─sdb1   8:17   0    10G  0 part
sr0     11:0    1  1024M  0 rom
sr1     11:1    1  1024M  0 rom
```

{% endcode %}

Now you need to create a file system on the disk. This is done by using `mkfs.ext4`. By default, five percent of the space is reserved for the root user. If you don't want to reserve any space for root, add the flag `-m 0`, where zero means that zero percent will be reserved.

{% code title="Command" %}

```
sudo mkfs.ext4 /dev/sdb1
```

{% endcode %}

{% code title="Output" %}

```
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done
Creating filesystem with 2620928 4k blocks and 655360 inodes
Filesystem UUID: 23b0822a-896d-4d6c-9ef7-b6995942fa60
[...]
```

{% endcode %}

To access the disk, you also need to mount it. Before you can mount it, you need to create a mount point for the disk. Here, in this example, we choose `/mnt/extradisk1`.

{% code title="Command" %}

```terminal
sudo mkdir /mnt/extradisk1
```

{% endcode %}

Now you add the new disk to the system's `/etc/fstab` file so that it is mounted automatically at startup. You use the UUID that you saw in the output above. Be sure to replace the UUID with the one shown by `mkfs.ext4`. Add the following line to `/etc/fstab`, but remember to replace the UUID with the real one:

{% code title="Line in /etc/fstab" %}

```
/dev/disk/by-uuid/23b0822a-896d-4d6c-9ef7-b6995942fa60 /mnt/extradisk1 ext4 defaults 0 2
```

{% endcode %}

Once you have saved the `/etc/fstab` file with the new entry, you can finally mount the disk.

{% code title="Command" %}

```
sudo mount /mnt/extradisk1/
```

{% endcode %}

The disk is now mounted and appears in commands such as `df`.

{% code title="Command" %}

```
df -h
```

{% endcode %}

{% code title="Output" %}

```
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           198M  1.2M  197M   1% /run
/dev/sda2        20G  3.2G   16G  18% /
tmpfs           988M     0  988M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda1       511M  6.1M  505M   2% /boot/efi
tmpfs           198M  4.0K  198M   1% /run/user/1000
/dev/sdb1       9.8G   24K  9.8G   1% /mnt/extradisk1
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Resize an existing additional disk in the control panel

To resize a disk, click the three dots next to the disk's name and select **Edit Size**.

<figure><img src="/files/lQ83AICkTuua6GlPixot" alt=""><figcaption></figcaption></figure>

In the dialog box that opens, adjust the disk size by moving the slider. Once done, click **Update**.

<figure><img src="/files/srvk8zhPO2zg1qIZAqxt" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Note that it is only possible to increase the size of additional disks, not decrease.
{% endhint %}

After increasing the disk size in the Glesys control panel, you also need to expand the partition size in the operating system.

{% tabs %}
{% tab title="Linux" %}
For the operating system to detect that the underlying disk has grown, you need to rescan the disk. If you check the disk with `lsblk` first, it will still show the same size as before. Note that in these examples, *sdb* is the additional disk. If you have multiple additional disks, it could be *sdc* or *sdd* instead.

{% code title="Command" %}

```
lsblk
```

{% endcode %}

{% code title="Output" %}

```
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0  63.5M  1 loop /snap/core20/1891
loop1    7:1    0 111.9M  1 loop /snap/lxd/24322
loop2    7:2    0  53.2M  1 loop /snap/snapd/19122
sda      8:0    0    20G  0 disk
├─sda1   8:1    0   512M  0 part /boot/efi
└─sda2   8:2    0  19.5G  0 part /
sdb      8:16   0    10G  0 disk
└─sdb1   8:17   0    10G  0 part /mnt/extradisk1
sr0     11:0    1  1024M  0 rom
sr1     11:1    1  1024M  0 rom
```

{% endcode %}

Now, perform a scan of the disk using the following command. Remember to replace *sdb* in the command below with the device name of the additional disk.

{% code title="Command" %}

```
sudo sh  -c 'echo 1 > /sys/class/block/sdb/device/rescan'
```

{% endcode %}

Recheck the disk with `lsblk`; it should have grown to the size you selected in the control panel. However, note that only the disk has grown, not the partition.

{% code title="Command" %}

```
lsblk
```

{% endcode %}

{% code title="Output" %}

```
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 111.9M  1 loop /snap/lxd/24322
loop1    7:1    0  63.5M  1 loop /snap/core20/1891
loop2    7:2    0  53.2M  1 loop /snap/snapd/19122
sda      8:0    0    20G  0 disk
├─sda1   8:1    0   512M  0 part /boot/efi
└─sda2   8:2    0  19.5G  0 part /
sdb      8:16   0    50G  0 disk
└─sdb1   8:17   0    10G  0 part /mnt/extradisk1
sr0     11:0    1  1024M  0 rom
sr1     11:1    1  1024M  0 rom
```

{% endcode %}

You also need to expand the partition and the file system. Start with the partition. Use the `growpart` tool, which comes pre-installed with most Linux distributions on Glesys. If it is not available, it can be installed using `sudo apt install cloud-guest-utils` in Debian and Ubuntu, or  `sudo dnf install cloud-utils-growpart` in Fedora, AlmaLinux, and CentOS.

Note the space between `/dev/sdb` and `1` below. This specifies partition 1 of *sdb*.

{% code title="Command" %}

```
sudo growpart /dev/sdb 1
```

{% endcode %}

{% code title="Output" %}

```
CHANGED: partition=1 start=2048 old: size=20967424 end=20969472 new: size=104855519 end=104857567
```

{% endcode %}

You also need to expand the file system. This is done using `resize2fs`, which is already installed.

{% code title="Command" %}

```
sudo resize2fs /dev/sdb1
```

{% endcode %}

{% code title="Output" %}

```
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/sdb1 is mounted on /mnt/extradisk1; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 7
The filesystem on /dev/sdb1 is now 13106939 (4k) blocks long.
```

{% endcode %}

Recheck the disk with `df`; it should now reflect the size you selected in the control panel.

{% code title="Command" %}

```
df -h
```

{% endcode %}

{% code title="Output" %}

```
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           198M  1.2M  197M   1% /run
/dev/sda2        20G  3.2G   16G  18% /
tmpfs           988M     0  988M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda1       511M  6.1M  505M   2% /boot/efi
/dev/sdb1        50G   24K   50G   1% /mnt/extradisk1
tmpfs           198M  4.0K  198M   1% /run/user/1000
```

{% endcode %}
{% endtab %}

{% tab title="Microsoft Windows" %}
Once the size has been changed in VMware, log in via Remote Desktop. You now need to expand the partition of the additional disk.

Search for *Computer Management* in the Start Menu and click on it when it appears.

<figure><img src="/files/f2TEJMQrZKn314LhVwBB" alt=""><figcaption></figcaption></figure>

Then, double-click on **Storage**.

<figure><img src="/files/tNdMvLvQXla6C5WvHChl" alt=""><figcaption></figcaption></figure>

Next, double-click on **Disk Management**.

<figure><img src="/files/rgtASRZY15qBdlFICGbu" alt=""><figcaption></figcaption></figure>

In this example, the additional disk is the E: partition. The E: partition and the adjacent unallocated space are now displayed. Right-click on that partition and select **Extend Volume**.

<figure><img src="/files/4Q7lOXbCpNYjnltbvamh" alt=""><figcaption></figcaption></figure>

A wizard will now start. In the first dialog box, click **Next**.

In the next dialog box, the amount by which the E: partition will be expanded is displayed. In the example image below, it will be extended by 20,480 MB, which is the same size as the unallocated space after the E: partition. Once you have verified that the information is correct, click **Next**.

<figure><img src="/files/KCmHWQP5kIpo7vmw26js" alt=""><figcaption></figcaption></figure>

In the final dialog box, you get a summary of how much the partition will be expanded. Here, click **Finish** to extend the partition.

<figure><img src="/files/rJJ0K6sTzuYP51ZWHo39" alt=""><figcaption></figcaption></figure>

You are then returned to the disk overview in the Windows system. The E: partition should now be expanded, as shown in the image below. No unallocated space should remain after the E: partition.

<figure><img src="/files/59vhn2zyMa3b4ubhPIYL" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Delete an additional disk

Before deleting an additional disk in the Glesys control panel, you should unmount it in the operating system to avoid any lockups. Here, we'll cover how to unmount a disk in Microsoft Windows and in Linux.

{% tabs %}
{% tab title="Microsoft Windows" %}
In Windows, you unmount a disk by setting it to *Offline*. To do this, open **Computer Management** by searching for it in the Start menu. Then, double-click on **Storage** and then on **Disk Management**.

The overview of all the system's disks will open. Here, right-click on the additional disk and select **Offline**.

<figure><img src="/files/Gv88Lua3K5sxzSjr78OK" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Linux" %}
In Linux, we first unmount the disk by using `umount` as root. In this example, the mount point for the additional disk is `/mnt/extradisk1`.

{% code title="Command" %}

```
sudo umount /mnt/extradisk1
```

{% endcode %}

Next, remove the entry for the additional disk in `/etc/fstab` so that the system does not attempt to remount the disk on reboot. If the mount point is `/mnt/extradisk1`, the line to delete will look something like this (note that the UUID will differ):

{% code title="Line to remove in /etc/fstab" %}

```
/dev/disk/by-uuid/23b0822a-896d-4d6c-9ef7-b6995942fa60 /mnt/extradisk1 ext4 defaults 0 2
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Delete the disk in the Glesys control panel

Once the disk is unmounted in the operating system, delete it by clicking the three dots next to the additional disk's name and then selecting **Delete disk**.

<figure><img src="/files/KuqtkePw1zAKNZckgiB4" alt=""><figcaption></figcaption></figure>

In the next dialog box, you need to confirm the deletion (note that all data on the disk will be lost). To confirm, type the disk's name into the text field and click **Delete**.

{% hint style="danger" %}
All data on the disk will be lost if you confirm the deletion.
{% endhint %}

<figure><img src="/files/3zpuet5LDEp7WrvggYvT" alt=""><figcaption></figcaption></figure>

### Manage backups

When the VM is created, *no automatic backups* are enabled. This is something you need to enable afterward. In the server's overview, just below the server's resources is the *Backups* section. Here, you can enable backups by clicking **Enable**. The price for backups is displayed before activation. The cost is based on the disk size.

<figure><img src="/files/39nhecMNO4yvVOcQbe4t" alt=""><figcaption></figcaption></figure>

When backups are enabled, the entire server is automatically replicated once per day. Backups are retained for 14 days. To restore a server from a backup, you need to contact Glesys support at <support@glesys.se>.

When backups are enabled for a VM, the following screen is displayed under *Backups*. Here, you can see the size of the disk being backed up. If you want to disable automatic backups again, click **Disable**.

<figure><img src="/files/ffmtoiAmh5En5OPs6zpa" alt=""><figcaption></figcaption></figure>

The current price for the server, including backups, is displayed at the bottom of the server overview under *Cost Summary*.

In VMware, it is not possible to create manual backups. However, it is possible to clone a VM.

### Clone a VM

In VMware, it is possible to clone a VM. This creates an exact copy of the virtual machine, except that the cloned VM does not have any IP addresses. When cloning the server, you can configure CPU, memory size, bandwidth, and disk size—these are the same options available when creating a new VM. However, the disk size cannot be smaller than that of the original server.

To clone a VM, go to the server's overview. Click on **Actions**, then on **Clone**.

<figure><img src="/files/AECVnCA8x9PsipsQKnD2" alt=""><figcaption></figcaption></figure>

In the next dialog box, you configure the cloned server. By default, the configuration is based on the original server. You can configure the number of CPU cores, memory size, bandwidth, and storage size. Remember that the storage size can only be increased, not decreased. Even later, the storage cannot be decreased, only increased.

To make changes, adjust the sliders. Once all selections are made, click **Clone**.

<figure><img src="/files/H0t2lzfUw4zxpmZia8jZ" alt=""><figcaption></figcaption></figure>

The cloned VM will now appear in the VM overview under **Compute → Virtual machines**. It has the same name as the original server, but with the suffix *clone*.

#### Assign new IP addresses to the cloned VM

The cloned VM does not have any IP addresses assigned to it. To add IP addresses to the cloned server, follow the steps outlined in [Manage IP addresses](#manage-ip-addresses).

To configure the operating system with the new IP addresses, you need to log in via the console. The VMware console works the same way as for KVM. Therefore, you can follow the subchapter [Connect to the VM console](/products/compute/kvm-virtual-machines/how-tos/connect-to-the-vm-console.md) for KVM.

If the server is running Microsoft Windows, you can log in via the console directly and configure the IP addresses without needing to restart the server in single-user mode.

#### Give the original VM's IP address to the cloned VM

If you want to assign the original VM's IP addresses to the cloned VM, there is no need to configure anything in the operating system. The old configuration was cloned along with the server. You just release the IP addresses from the original VM and assign them to the cloned VM.

To release the original VM's IP addresses, navigate to the original VM's overview. Scroll down to the *IP Addresses* section. Here, click the red crosses next to the IP addresses you want to release. A dialog box will open where we confirm the removal of the address. It is essential to ensure that **Keep IP** is checked. This will retain the IP address in the project but disconnect it from the server.

<figure><img src="/files/JmyOscpPOAVV6WJekvPD" alt=""><figcaption></figcaption></figure>

Once the IP address has been released from the original VM, navigate to the new, cloned VM (found under **Compute → Virtual machines**).

In the *IP Addresses* section for the cloned VM, click **Add IPv4** or **Add IPv6**, respectively.

<figure><img src="/files/MD2l0nW60EPPEZCIV6ie" alt=""><figcaption></figcaption></figure>

In the list that appears, locate the addresses that were released from the original VM and add them to the cloned VM. The IP addresses from the original VM are listed under *Reserved IP Addresses*. Click on the addresses to select them, then click **Add Selected**.

<figure><img src="/files/fWV9fOVTaEkc0x6bFnaQ" alt=""><figcaption></figcaption></figure>

### Manage IP addresses

It's possible to delete and add multiple IP addresses to your VM under the *IP Addresses* section in the VM overview. Here, you can also see the current IP addresses assigned to the VM. New IP addresses can be added by clicking **Add IPv4** or **Add IPv6**. To remove an IP address, click the red cross to the right of the IP address.

<figure><img src="/files/0Jhb1yyzZrbBSeDtZiK0" alt=""><figcaption></figcaption></figure>

In this example, we choose to add an IPv4 address by clicking **Add IPv4**.

In the dialog box that appears, you can select from either available IP addresses or [previously reserved](/products/connectivity/ip-addresses/how-tos/reserve-ip-addresses.md) IP addresses. The reserved IP addresses are displayed at the top.

Select an IP address and click **Add Selected**.

<figure><img src="/files/P1dPyR0MQm7iMXUVNmsc" alt=""><figcaption></figcaption></figure>

When you return to the VM's overview, you can see the new IP address in the list.

Follow the same procedure to add IPv6 addresses, but select **Add IPv6** in the overview instead.

#### Find gateway, netmask, and DNS for an IP address

Before adding the IP addresses to the VM's operating system, you need to know the subnet mask and gateway for the addresses. This information can be found under **IP addresses** in the left-hand menu under **Network**. Here, you can view all IP addresses, including those assigned to your VMs, as well as reserved IP addresses. Both assigned and reserved IP addresses are listed under the **Overview** tab.

Click the information icon next to the IP address to display its subnet mask and gateway.

<figure><img src="/files/z5cTFIhvSxhADXEXrEud" alt=""><figcaption></figcaption></figure>

The Glesys DNS servers are located at the IPv4 addresses `79.99.4.100` and `79.99.4.101`, and the IPv6 addresses `2a02:751:aaaa::1` and `2a02:751:aaaa::2`.

Now you need to configure the IP addresses in the VM's operating system. The process of adding IP addresses varies between different operating systems.&#x20;

#### Add the IP addresses in the VM's operating system

The process for adding IP addresses in the VM's operating system differs between different operating systems and Linux distributions. Here, we'll cover Microsoft Windows, AlmaLinux, Ubuntu, and Debian. These instructions will most likely also work for newer versions.

{% tabs %}
{% tab title="Microsoft Windows" %}
To add additional IP addresses in Windows, open the Start Menu and click **Settings**. Then click on **Network & Internet**. Under the section *Advanced network settings*, click **Change adapter options**. Now, right-click on **Ethernet0** and choose **Properties** from the menu.

<figure><img src="/files/6SDMwAfmgQhaI5aeqxHw" alt=""><figcaption></figcaption></figure>

Start by adding IPv4 addresses by selecting **Internet Protocol Version 4 (TCP/IPv4)** and clicking **Properties**. To add IPv6 addresses, follow the same procedure but select **Internet Protocol Version 6 (TCP/IPv6)** instead.

<div align="left"><figure><img src="/files/6jRd8kv1aAco9ATFjGUd" alt=""><figcaption></figcaption></figure></div>

The first IP address assigned to the VM during its creation is now displayed. To add more IP addresses, click **Advanced...**

<div align="left"><figure><img src="/files/nk89PS6sKyirp0bBBiRH" alt=""><figcaption></figcaption></figure></div>

A new dialog box opens where you can see the IP addresses and gateways. Start by adding an IP address by clicking **Add...** under *IP addresses*.

<div align="left"><figure><img src="/files/MW3eeb8L3ZD6cOimAFD6" alt=""><figcaption></figcaption></figure></div>

In the dialog box that opens, enter the IP address and subnet mask you want to add.

<div align="left"><figure><img src="/files/tNZEP3de2v7OX4XYEWt3" alt=""><figcaption></figcaption></figure></div>

Now that you have completed this IP address, you can repeat the process if you have more IP addresses to add.

To save the settings, click **OK** in the dialog boxes you have opened until you return to the network adapters. The new IP addresses are added immediately.

#### **Test the IP addresses**

Now you can verify and test the IP addresses by opening the Start Menu and searching for *cmd*. When **Command Prompt** appears in the menu, click on it. Then, list all the VM's IP addresses using the command `ipconfig`.

{% code title="Command" %}

```
ipconfig
```

{% endcode %}

{% code title="Output" %}

```
Windows IP Configuration


Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 2001:db8:18::1398
   Link-local IPv6 Address . . . . . : fe80::6137:3530:d2b1:c110%14
   IPv4 Address. . . . . . . . . . . : 203.0.113.49
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   IPv4 Address. . . . . . . . . . . : 198.51.100.33
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   IPv4 Address. . . . . . . . . . . : 203.0.113.89
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 2001:db8:18::1
                                       203.0.113.49
```

{% endcode %}

Try pinging from the IP addresses. Specify the IP address you want to use as the source with the `-S` flag.

<pre data-title="Multiple commands (prompt is shown as &#x27;C:\Users\Administrator>&#x27;)"><code><strong>C:\Users\Administrator> ping -S 203.0.113.49 dns.google
</strong>
Pinging dns.google [8.8.4.4] from 203.0.113.49 with 32 bytes of data:
Reply from 8.8.4.4: bytes=32 time=11ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
[...]

<strong>C:\Users\Administrator> ping -S 198.51.100.33 dns.google
</strong>
Pinging dns.google [8.8.4.4] from 198.51.100.33 with 32 bytes of data:
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
[...]

<strong>C:\Users\Administrator> ping -S 203.0.113.89 dns.google
</strong>
Pinging dns.google [8.8.4.4] from 203.0.113.89 with 32 bytes of data:
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
Reply from 8.8.4.4: bytes=32 time=9ms TTL=57
[...]

<strong>C:\Users\Administrator>ping -S 2001:db8:18:1398 dns.google
</strong>
Pinging dns.google [2001:4860:4860::8844] from 2001:db8:18:1398 with 32 bytes of data:
Reply from 2001:4860:4860::8844: time=9ms
Reply from 2001:4860:4860::8844: time=9ms
Reply from 2001:4860:4860::8844: time=9ms
Reply from 2001:4860:4860::8844: time=9ms
[...]
</code></pre>

All of the IP addresses are working.
{% endtab %}

{% tab title="AlmaLinux 9" %}
Start by disabling automatic cloud network configuration to prevent your settings from being overwritten. To do this, create a new file:

{% code title="Command" %}

```
sudo vi /etc/cloud/cloud.cfg.d/99-custom-networking.cfg
```

{% endcode %}

Add the following content to the file and save it:

{% code title="/etc/cloud/cloud.cfg.d/99-custom-networking.cfg" %}

```yaml
network: {config: disabled}
```

{% endcode %}

Now it's time to add the IP addresses. But first, you need to identify which connection to add the IP addresses to. This can be done using the command `nmcli connection`. It will most likely look like the example below, where the connection is named *System ens192*:

{% code title="Command" %}

```
nmcli connection
```

{% endcode %}

{% code title="Command" %}

```
NAME           UUID                                  TYPE      DEVICE
System ens192  d18b6429-133f-4947-3b25-4482c7f9d5e7  ethernet  ens192
```

{% endcode %}

Proceed with adding the IP addresses. Note that you must add all the IP addresses, including the first one that was created when the server was set up. The DNS servers are already configured, so you don't need to modify them.&#x20;

Addresses are added by using the `nmcli connection modify` command, as shown here.

{% code title="Multiple commands" %}

```terminal
nmcli connection modify "System ens192" ipv4.addresses \
"198.51.100.85/24,192.0.2.53/24,192.0.2.109/24"

nmcli connection modify "System ens192" ipv4.gateway 198.51.100.1

nmcli connection up "System ens192"
```

{% endcode %}

{% code title="Output" %}

```
Connection successfully activated (D-Bus active path:
/org/freedesktop/NetworkManager/ActiveConnection/3)
```

{% endcode %}

To add IPv6 addresses, follow the same process but replace `ipv4` in the commands with `ipv6`. For example:

{% code title="Multiple commands" %}

```terminal
nmcli connection modify "System ens192" ipv6.addresses \
"2001:db8:18::109c/64,2001:db8:18::13f5/64,2001:db8:18::140f/64"

nmcli connection modify "System ens192" ipv6.gateway "2001:db8:18::1"

nmcli connection up "System ens192"
```

{% endcode %}

{% code title="Output" %}

```
Connection successfully activated (D-Bus active path:
/org/freedesktop/NetworkManager/ActiveConnection/3)
```

{% endcode %}

The IP addresses are now added, and the network has been restarted to utilize the new addresses.

#### Make sure that the IP addresses are functioning

Use the `ip addr` command to confirm that the server has received all our assigned IP addresses.

{% code title="Command" %}

```
ip addr
```

{% endcode %}

{% code title="Output" %}

```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 12:b2:7c:5e:59:01 brd ff:ff:ff:ff:ff:ff
    altname enp1s1
    inet 198.51.100.85/24 brd 198.51.100.255 scope global ens1
       valid_lft forever preferred_lft forever
    inet 192.0.2.53/24 brd 192.0.2.255 scope global ens1
       valid_lft forever preferred_lft forever
    inet 192.0.2.109/24 brd 192.0.2.255 scope global secondary ens1
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::109c/64 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::13f5/64 scope global
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::140f/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::10b2:7cff:fe5e:5901/64 scope link
       valid_lft forever preferred_lft forever
```

{% endcode %}

Test by pinging Google’s DNS from all your IP addresses to confirm that they work. Specify the source address using the `-I` flag. Use the IP addresses you have added for the source address, one at a time. You only need to send two pings, so add the `-c2` flag. Additionally, you need to specify the IP version using either `-4` or `-6` for the respective IP version.

<pre data-title="Commands with output (shell prompt shown as $)"><code><strong>$ ping -4 -c2 -I 198.51.100.85 dns.google
</strong>PING  (8.8.4.4) from 198.51.100.85 : 56(84) bytes of data.
64 bytes from dns.google (8.8.4.4): icmp_seq=1 ttl=57 time=9.45 ms
64 bytes from dns.google (8.8.4.4): icmp_seq=2 ttl=57 time=9.18 ms
[...]

<strong>$ ping -4 -c2 -I 192.0.2.53 dns.google
</strong>PING  (8.8.8.8) from 192.0.2.53 : 56(84) bytes of data.
64 bytes from dns.google (8.8.8.8): icmp_seq=1 ttl=57 time=9.68 ms
64 bytes from dns.google (8.8.8.8): icmp_seq=2 ttl=57 time=9.42 ms
[...]

<strong>$ ping -4 -c2 -I 192.0.2.109 dns.google
</strong>PING  (8.8.4.4) from 192.0.2.109 : 56(84) bytes of data.
64 bytes from dns.google (8.8.4.4): icmp_seq=1 ttl=57 time=9.45 ms
64 bytes from dns.google (8.8.4.4): icmp_seq=2 ttl=57 time=9.07 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::109c dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8844)) from 2001:db8:18::109c : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=1 ttl=57 time=9.41 ms
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=2 ttl=57 time=9.19 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::13f5 dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8844)) from 2001:db8:18::13f5 : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=1 ttl=57 time=9.41 ms
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=2 ttl=57 time=9.23 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::140f dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8888)) from 2001:db8:18::140f : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=1 ttl=57 time=9.81 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=2 ttl=57 time=9.51 ms
[...]
</code></pre>

In the example above, all the addresses function as expected.
{% endtab %}

{% tab title="Ubuntu 22.04" %}
First, disable automatic cloud network configuration to prevent the settings from being overwritten. To do this, create a new file:

{% code title="Command" %}

```terminal
sudo vi /etc/cloud/cloud.cfg.d/99-custom-networking.cfg
```

{% endcode %}

Add the following content to the file and save it:

{% code title="/etc/cloud/cloud.cfg.d/99-custom-networking.cfg" %}

```yaml
network: {config: disabled}
```

{% endcode %}

Next, add the new IP addresses to the file `/etc/netplan/50-cloud-init.yaml`. When you open the file, the server's existing addresses will already be listed. Therefore, you only need to add the new IP addresses in the same format. In the example below, two additional IPv4 addresses and two additional IPv6 addresses have been added. The server now has three IPv4 and three IPv6 addresses.

However, you should change `gateway4` and `gateway6` to the new keyword `routes` to avoid warnings about the deprecated `gateway` keyword. Additionally, you should enclose IPv6 addresses in quotes to prevent colons from being interpreted as part of YAML syntax.

{% code title="/etc/netplan/50-cloud-init.yaml" %}

```yml
network:
  version: 2
  ethernets:
    ens192:
      addresses:
        - 203.0.113.27/24
        - 203.0.113.121/24
        - 192.0.2.218/24
        - "2001:db8:18::101/64"
        - "2001:db8:18::143a/64"
        - "2001:db8:18::174d/64"
      routes:
        - to: default
          via: 203.0.113.1
        - to: "::/0"
          via: "2001:db8:18::1"
      nameservers:
        addresses:
          - 79.99.4.100
          - 79.99.4.101
          - "2a02:751:aaaa::1"
          - "2a02:751:aaaa::2"
```

{% endcode %}

To activate the settings, use `netplan try`. With `try`, the settings will revert to their previous state if you are disconnected and unable to confirm the new settings by pressing the **Enter** key.

{% code title="Command" %}

```terminal
sudo netplan try
```

{% endcode %}

{% code title="Prompt from netplan" %}

```
Do you want to keep these settings?


Press ENTER before the timeout to accept the new configuration


Changes will revert in 115 seconds
Configuration accepted.
```

{% endcode %}

The IP addresses are now added, and the network has been restarted to utilize the new addresses.

#### Make sure the IP addresses are functioning

Use the `ip addr` command to confirm that the server has received all your assigned IP addresses.

{% code title="Command" %}

```
ip addr
```

{% endcode %}

{% code title="Output" %}

```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 12:b2:7c:5e:59:01 brd ff:ff:ff:ff:ff:ff
    altname enp1s1
    inet 203.0.113.27/24 brd 203.0.113.255 scope global ens1
       valid_lft forever preferred_lft forever
    inet 203.0.113.121/24 brd 203.0.113.255 scope global ens1
       valid_lft forever preferred_lft forever
    inet 192.0.2.218/24 brd 192.0.2.255 scope global secondary ens1
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::101/64 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::143a/64 scope global
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::174d/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::10b2:7cff:fe5e:5901/64 scope link
       valid_lft forever preferred_lft forever
```

{% endcode %}

Test by pinging Google’s DNS from all your IP addresses to confirm that they work. Specify the source address using the `-I` flag. Use the IP addresses you have added for the source address, one at a time. You only need to send two pings, so add the `-c2` flag. Additionally, you need to specify the IP version using either `-4` or `-6` for the respective IP version.

<pre data-title="Multiple commands and their output (the prompt is indicated by a &#x27;$&#x27;)"><code><strong>$ ping -4 -c2 -I 203.0.113.27 dns.google
</strong>PING  (8.8.4.4) from 203.0.113.27 : 56(84) bytes of data.
64 bytes from dns.google (8.8.4.4): icmp_seq=1 ttl=57 time=9.45 ms
64 bytes from dns.google (8.8.4.4): icmp_seq=2 ttl=57 time=9.18 ms
[...]

<strong>$ ping -4 -c2 -I 203.0.113.121 dns.google
</strong>PING  (8.8.8.8) from 203.0.113.121 : 56(84) bytes of data.
64 bytes from dns.google (8.8.8.8): icmp_seq=1 ttl=57 time=9.68 ms
64 bytes from dns.google (8.8.8.8): icmp_seq=2 ttl=57 time=9.42 ms
[...]

<strong>$ ping -4 -c2 -I 192.0.2.218 dns.google
</strong>PING  (8.8.4.4) from 192.0.2.218 : 56(84) bytes of data.
64 bytes from dns.google (8.8.4.4): icmp_seq=1 ttl=57 time=9.45 ms
64 bytes from dns.google (8.8.4.4): icmp_seq=2 ttl=57 time=9.07 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::101 dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8844)) from 2001:db8:18::101 : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=1 ttl=57 time=9.41 ms
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=2 ttl=57 time=9.19 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::143a dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8844)) from 2001:db8:18::143a : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=1 ttl=57 time=9.41 ms
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=2 ttl=57 time=9.23 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::174d dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8888)) from 2001:db8:18::174d : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=1 ttl=57 time=9.81 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=2 ttl=57 time=9.51 ms
[...]
</code></pre>

In the example above, all the addresses function as expected.
{% endtab %}

{% tab title="Debian" %}
Start by disabling automatic cloud network configuration to ensure your settings are not overwritten. Create a new file:

{% code title="Command" %}

```terminal
sudo vi /etc/cloud/cloud.cfg.d/99-custom-networking.cfg
```

{% endcode %}

Type in the following content and save it:

{% code title="/etc/cloud/cloud.cfg.d/99-custom-networking.cfg" %}

```yaml
network: {config: disabled}
```

{% endcode %}

Next, configure the new IP addresses in Debian. This is done in the file `/etc/network/interfaces.d/50-cloud-init`.

When you open the file, the VM's existing addresses will already be listed. You only need to add the new IP addresses in the same format and tidy up the configuration. Use the gateway of the first IP address for each respective IP version.

In the example below, two additional IPv4 addresses and two additional IPv6 addresses have been added. The VM now has three IPv4 and three IPv6 addresses.

Edit the file so it looks like the example below, but change the IP addresses, subnet masks, and gateway accordingly. The network interface remains unchanged—it’s the one the system is already configured with, here *ens192*.

```
auto lo
iface lo inet loopback

# The first IP address
auto ens192
iface ens192 inet static
    address 203.0.113.59/24
    gateway 203.0.113.1

# The second IP address
iface ens192 inet static
    address 198.51.100.85/24

# The third IP address
iface ens192 inet static
    address 192.0.2.109/24
    dns-nameservers 79.99.4.100 79.99.4.101

# The IPv6 adress
iface ens192 inet6 static
    address 2001:db8:18::1397/64
    gateway 2001:db8:18::1

# The second IPv6 address
iface ens192 inet6 static
    address 2001:db8:18::140f/64

# The third IPv6 address
iface ens192 inet6 static
    address 2001:db8:18::13f5/64
    dns-nameservers 2a02:751:aaaa::1 2a02:751:aaaa::2 
```

Keep in mind that the line with DNS servers must be placed as the last entry for each IP version. In this case, we place the DNS servers under the third IP address for both IPv4 and IPv6. Debian uses `resolvconf`, which has a maximum limit of three DNS servers. In this case, we add a total of four DNS servers, but only the last three will be used by the system.

Now, you need to restart the network for the settings to take effect. This is done with:

{% code title="Command" %}

```terminal
sudo systemctl restart networking
```

{% endcode %}

The IP addresses are now added, and the network has been restarted to utilize the new addresses.

#### Make sure the IP addresses are functioning

You can use the `ip addr` command to confirm that the VM has received all your assigned IP addresses.

{% code title="Command" %}

```
ip addr
```

{% endcode %}

{% code title="Output" %}

```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 12:b2:7c:5e:59:01 brd ff:ff:ff:ff:ff:ff
    altname enp1s1
    inet 203.0.113.59/24 brd 203.0.113.255 scope global ens1
       valid_lft forever preferred_lft forever
    inet 198.51.100.85/24 brd 198.51.100.255 scope global ens1
       valid_lft forever preferred_lft forever
    inet 192.0.2.109/24 brd 192.0.2.255 scope global secondary ens1
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::1397/64 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::140f/64 scope global
       valid_lft forever preferred_lft forever
    inet6 2001:db8:18::13f5/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::10b2:7cff:fe5e:5901/64 scope link
       valid_lft forever preferred_lft forever
```

{% endcode %}

Test by pinging Google’s DNS from all our IP addresses to confirm that they work. Specify the source address using the `-I` flag. Use the IP addresses you have added for the source address, one at a time. You only need to send two pings, so add the `-c2` flag. Additionally, you need to specify the IP version using either `-4` or `-6` for the respective IP version.

<pre data-title="Multiple commands and their output (the prompt is indicated by a &#x27;$&#x27;)"><code><strong>$ ping -4 -c2 -I 203.0.113.59 dns.google
</strong>PING  (8.8.4.4) from 203.0.113.59 : 56(84) bytes of data.
64 bytes from dns.google (8.8.4.4): icmp_seq=1 ttl=57 time=9.45 ms
64 bytes from dns.google (8.8.4.4): icmp_seq=2 ttl=57 time=9.18 ms
[...]

<strong>$ ping -4 -c2 -I 198.51.100.85 dns.google
</strong>PING  (8.8.8.8) from 198.51.100.85 : 56(84) bytes of data.
64 bytes from dns.google (8.8.8.8): icmp_seq=1 ttl=57 time=9.68 ms
64 bytes from dns.google (8.8.8.8): icmp_seq=2 ttl=57 time=9.42 ms
[...]

<strong>$ ping -4 -c2 -I 192.0.2.109 dns.google
</strong>PING  (8.8.4.4) from 192.0.2.109 : 56(84) bytes of data.
64 bytes from dns.google (8.8.4.4): icmp_seq=1 ttl=57 time=9.45 ms
64 bytes from dns.google (8.8.4.4): icmp_seq=2 ttl=57 time=9.07 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::1397 dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8844)) from 2001:db8:18::1397 : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=1 ttl=57 time=9.41 ms
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=2 ttl=57 time=9.19 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::140f dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8844)) from 2001:db8:18::140f : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=1 ttl=57 time=9.41 ms
64 bytes from dns.google (2001:4860:4860::8844): icmp_seq=2 ttl=57 time=9.23 ms
[...]

<strong>$ ping -6 -c2 -I 2001:db8:18::13f5 dns.google
</strong>PING dns.google(dns.google (2001:4860:4860::8888)) from 2001:db8:18::13f5 : 56 data bytes
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=1 ttl=57 time=9.81 ms
64 bytes from dns.google (2001:4860:4860::8888): icmp_seq=2 ttl=57 time=9.51 ms
[...]
</code></pre>

In the example above, all the addresses function as expected.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
If an issue occurs with the network, you can log in via the [console](/products/compute/kvm-virtual-machines/how-tos/connect-to-the-vm-console.md) in Glesys Cloud.
{% endhint %}

#### Remove IP addresses

To remove an IP address from a VM, select the appropriate VM under **Virtual machines** in the left-hand menu. Scroll down to the **IP Addresses** section in the VM's overview. To remove an IP address from a VM, click the red cross next to the IP address you want to delete.

After clicking the cross next to an IP address, you can decide whether to keep the IP address in the [project](/platform/control-panel/projects.md). This enables you to reuse the same IP address on another VM. In this case, we opt to keep it. The IP address will be removed from the VM, but will remain in the project for future use.

<div align="left"><figure><img src="/files/te2dR7XqgV627OqM5Clm" alt=""><figcaption></figcaption></figure></div>

Once the IP address has been removed from the VM in the control panel, **you must also delete it from the VM's operating system**. You remove the IP address from the same file or command where it was added. Refer to [Add the IP addresses in the VM's operating system](#add-the-ip-addresses-in-the-vms-operating-system) for information on where the IP address settings are located in each Linux distribution.

### Adjust the internet connection's bandwidth

It's possible to adjust the server's internet bandwidth under the **Network Adapters** tab in the server overview. Click on the pencil icon to the right of the network adapter named *Network adapter 1*, which has Internet listed under *Network*.

<figure><img src="/files/PPiVVIiKwXbWamtbwfTa" alt=""><figcaption></figcaption></figure>

In the dialog box that appears, we can increase or decrease the bandwidth for the network adapter by moving the slider. The price for the bandwidth is displayed in the lower-right corner.

<figure><img src="/files/30tEa7OtSk7JNmHUUwvE" alt=""><figcaption></figcaption></figure>

### View server statistics

In the server overview, we can view statistics for CPU usage, memory, and disk. The statistics can be found under the **Statistics** tab.

<figure><img src="/files/clabWGOsSrCSw2PiQ274" alt=""><figcaption></figcaption></figure>

## Manage VMware virtual machines using the API

Several [API](/platform/control-panel/api.md) endpoints are available for managing your virtual machine using the API.

* Use the [server/edit](https://github.com/GleSYS/API-docs/wiki/API-Documentation#serveredit) endpoint to edit resources, backup schedule, bandwidth, description, and hostname.
* Use the [server/clone](https://github.com/GleSYS/API-docs/wiki/API-Documentation#serverclone) endpoint to clone a VM.
* Use the [server/listbackups](https://github.com/GleSYS/API-docs/wiki/API-Documentation#serverlistbackups) endpoint to list the VM's current backups.
* Use the [server/start](https://github.com/GleSYS/API-docs/wiki/API-Documentation#serverstart), [server/stop](https://github.com/GleSYS/API-docs/wiki/API-Documentation#serverstop), and [server/reset](https://github.com/GleSYS/API-docs/wiki/API-Documentation#serverreset) endpoints to start, stop, and reboot your VM.
* Use the [server/networkadapters](https://github.com/GleSYS/API-docs/wiki/API-Documentation#servernetworkadapters) endpoint to list a VM's network adapters.
* Use the [networkadapter/edit](https://github.com/GleSYS/API-docs/wiki/API-Documentation#networkadapteredit) to adjust the bandwidth.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.glesys.com/products/compute/vmware-virtual-machines/how-tos/manage-virtual-machines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
