Virtual machines management

Virtual machines management

Manipulate VMs

The main tool to interact with VMs on SEAPATH is vm_manager. It works either in standalone mode or in a cluster.

Below is a list of basic vm_manager commands for VM management. Full documentation at The vm_manager tool

All these commands can be executed on any SEAPATH machine of the cluster (if using acluster), no matter where the VMs are running.

List the VMs deployed on the cluster (or the standalone machine)

sudo vm-mgr list

Get the state of a VM

sudo vm-mgr status -n <vm_name>

Get the Libvirt XML file of the VM

sudo vm-mgr get_metadata --metadata_name xml -n <vm_name>

Access the console of the VM

sudo vm-mgr console <vm_name>

Manipulate VMs with a REST API

A rest API is available for vm_manager, read more at The vm_manager tool

Pacemaker usage

Pacemaker handles the location and constraints of the VMs on the cluster.

See the locations of the VMs on the cluster

crm status

Verify VM constraints configuration

crm configure show vm

For more information, see the crm usage documentation.

Location of the VM disk

On a standalone machine, by default, the disk is located in /var/lib/libvirt/images

Note that this may be overridden if you change the deploy_vms_standalone_disk_pool in Ansible.

On a cluster machine, the disk is replicated on CEPH RBD.

Migrate a virtual machine

crm resource move <vm_name> <hypervisor_name>

Logs

The logs of a VM are only available on the hypervisor that schedules the VM in /var/log/libvirt/qemu/<vm_name>.log

Additional logs are available on journald journalctl -u libvirtd

Logs related to VM migration can also be found in /var/log/pacemaker/pacemaker.log

Modify the XML of a VM

To modify the XML of the VM we recommend going through a VM update process. Read Update a virtual machine

Time synchronization on virtual machines

Refer to Virtual machine Time Synchronization