This page describe the configuration and deployement of virtual machines on SEAPATH.
Build disk image
SEAPATH can host custom virtual machines. If you already have a ready VM disk image, skip directly to deployement part.
However, if you need a virtual machine for testing or for deploying your application, you can use SEAPATH default disk image file :
Information on how to build a disk image in detail is available here for a Yocto VM, or here for a Debian VM.
Components of VM
Each components of VM should have a VirtIO
interface (like the network and the disk). This reduces problems with the virtual hardware.
Some examples are available here.
Troubleshooting
Bootloader
If the VM is in UEFI mode, it's possible that it doesn't boot because the firmware is not the same. Follow this steps:
- Boot the machine on the cluster
- Re-install the bootloader
- Update the bootloader configuration
Deployment of VM with Ansible
The playbook ansible/playbooks/cluster_setup_deploy_vms.yaml
is used to deploy a virtual machine. There is an ansible library (ansible/library/cluster_vm.py
) to wrap vm_manager.
Manage virtual machine on the cluster
Check the execution of the resource:
crm status
Get the status of the resource:
vm-mgr status --name NAME
Delete VM in the cluster:
vm-mgr remove --name NAME
For more information about the vm_manager tool, check this page : The vm_manager tool
VM configuration
The official documentation on the XML format of libvirt is here.
Resources
On the XML configuration of a virtual machine, the resource can be specified to know which slice should be used (more details here). So, the virtual machine will only have acces to the CPU associated with the slice.
Possible values:
/machine/nort
/machine/rt
Example, for a virtual machine with the real-time:
|
CPU tunning
In the project, this element will be used to limite the virtual machine (more details here).
- The
emulatorpin
element specifies which of host physical CPUs the emulator, a subset of a domain not including vCPU or iothreads will be pinned to. - The
vcpupin
element specifies which of host's physical CPUs the domain vCPU will be pinned to. It's used to reserved one or more CPUs for a critical virtual machine. So, it's important not use this CPU on another VM. - The
vcpusched
element specifies the scheduler type for a particular vCPU. A priority can be setting. In the project, all values greats than 10, it's for the host; equals to 10, it's for the RCU and less than 10, it's to set the priority of the RT vCPU among themselves.