Manage virtual machines

Existing virtual machines can be managed in various ways; for example, you can enable or disable backups and add or remove additional IP addresses.


Manage a KVM VM using the control panel

This section provides a closer look at managing a virtual machine.

You can view all your VMs by navigating to the Virtual machines overview in the Compute section of the left-hand sidebar menu. All KVM virtual machines have ID names that include kvm. In the example below, the virtual machine is named kvm5548147. To manage a virtual server, click on it in the list.

Enable backups

You can enable automatic backups for your VM. This adds a cost to the VM’s price based on the frequency of the backups.

Backups are stored in a separate data center from the one where the server is located, providing enhanced security.

Please note that backups are linked to the specific virtual server. If we delete the virtual server, all of its backups will also be deleted.

Three tabs are displayed when you click on a virtual machine: Details, Backups, and Network adapters. Click on the Backups tab to view the overview of the server's backups.

Scheduled backups

At the top, the scheduled backups are displayed. Here, you can see when the scheduled backups started, when they were completed, their size, and whether they were daily or weekly backups. You also see the status of all the backups.

Additionally, you can reconfigure the backup schedule by clicking the Edit schedule button.

In the dialog box, use the sliders to adjust the retention period for automatic backups, specifying the number of days or weeks. The example image below saves seven daily backups and three weekly backups.

Please note that the displayed cost refers to the total cost for the server, not just for the backups.

Manual backups

Further down the backups overview page, the manual backups are displayed. These backups are retained for as long as you want or until you delete the server. You can create new manual backups by clicking + Create manual backup.

In the dialog box, you can also see the cost of the manual backup. Click Create backup to start the backup process.

If it appears that the backup is never completed, meaning the status shows Backup is running... for an extended period, you can try refreshing the webpage by pressing the F5 key. Most likely, the status will then update to Finished.

To restore a virtual server from a backup, see Restore virtual machines.

Add or remove IP addresses

It is possible to add and remove IP addresses from the server. This is done in the server overview. About halfway down the page, you will find an IP Addresses section. Here, you can view the server's current IP addresses and add new ones using the Add IPv4 and Add IPv6 buttons. To remove an IP address, click the red cross to the right of the IP address.

In this example, we will add an IPv4 address by clicking Add IPv4.

In the dialog box that appears, select from either available IP addresses or previously reserved IP addresses. The reserved IP addresses are shown at the top.

Select an IP address and click Add Selected.

When you return to the server overview, the new IP address is listed.

Follow the same procedure to add IPv6 addresses; instead, click Add IPv6 in the overview.

Finally, you must configure the IP addresses in the server's operating system. The process of adding IP addresses varies among different Linux distributions. Here, we will cover the distributions provided by Glesys.

Locate the gateway and the netmask

You must determine their netmask and gateway before adding the IP addresses to the server's operating system. This information can be found under IP addresses in the left-hand menu under Network. Here, we can see all IP addresses, including those assigned to our servers and the ones we have reserved. Both assigned and reserved IP addresses are listed under the Overview tab.

Click the information icon next to the IP address to view the netmask and gateway.

When there is only one IP address assigned to your server—the initial IP address created when the server was set up—it is automatically assigned to the server. Now that you are adding new IP addresses, you must switch from automatic settings (DHCP) to manual settings for all IP addresses in the server's operating system, including the first one. Therefore, you must also determine the netmask and gateway for the first address.

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.

Add the IP addresses in the VM's operating system

Before adding the addresses, you need to disable automatic cloud configuration of the network settings. If you don't do this, there’s a risk that the settings you apply may be overwritten.

Open the file /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg, for example, using:

In this file, add the following line:

Once this is done, you can configure your IP addresses in the file /etc/network/interfaces.d/50-cloud-init. Open the file using, for example, vi or nano:

This example server will have three IPv4 and three IPv6 addresses. For the gateway, use the gateway associated with the first IP address for each respective IP version.

The file's content should resemble the example below, but ensure you replace the IP addresses, netmasks, and gateways with the correct values. The network interface should remain unchanged, as it is the one configured for the system—in this example, ens1.

Note that if you only want to assign manual IPv4 addresses, leave the line for IPv6 untouched, meaning keep it as iface ens1 inet6 dhcp. The same applies the other way around: if you only want to set IPv6 addresses, keep the IPv4 line iface ens1 inet dhcp unchanged.

Please note that you must place the line with the DNS servers as the last entry for each IP version. In this example, we have positioned the DNS servers under the third IP address for IPv4 and IPv6. Debian uses resolvconf, which has a maximum limit of three DNS servers. In this example, we are adding four DNS servers, but the system will only use the last three.

Finally, we need to restart the network for the settings to take effect. This can be done with:

If something goes wrong with the network, you can log in via the console in the Glesys control panel.

Verify and test that the IP addresses are functioning

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

You can test by pinging Google’s DNS from all the assigned 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. We only need to send two pings, so we utilize the -c2 flag. Additionally, you need to specify the IP version using either -4 or -6 for the respective IP version.

In the example above, all the addresses function as expected.

Delete an IP address

To remove an IP address from a server, first select the server in the Virtual machines section. Scroll down to the IP Addresses section in the server overview. To remove an IP address from a server, 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. This enables you to reuse the same IP address on another server. In this case, we opt to keep it. The IP address will be removed from the server, but will remain in the project for future use.

Once the IP address has been removed from the server in the control panel, you must also delete it from the server's operating system. You remove the IP address from the same file, command, or setting where it was added. Refer to Add or remove IP addresses for information on where the IP address settings are located in each operating system.

Manage a KVM VM using the API

Several API endpoints are available for managing your virtual machine.

Last updated

Was this helpful?