Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 :
First, we need to build a disk image of the VM. Information on how to build a disk image in detail is available here for a Yocto VM, or here for a Debian VM.

Configuration

The inventory may define these hosts to run:

  • hypervisors: Set of hosts to launch virtual machines

Hypervisor

The project use the KVM hypervisor to virtualize machines.

RADOS Block Device

libvirt will automatically detect the RBD and create a pool with this option --enable-rbd. The found resources can be used to launch a VM (if it's an image for a virtual machine).


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.

...

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.

Configuration

The inventory must define these hosts to run this step:

...

Before starting, make sure there is enough space in /home and /tmp.

Manage VM on the cluster

Manage virtual machine on the cluster

  • Add VM in the cluster:

    Code Block
    languagebash
    vm-mgr create --name NAME --xml /path/to/configuration.xml --image /path/to/disk.qcow2 --disable --force --enable-live-migration --migration-user virtu --migrate-to-timeout 180

    Check the execution of the resource:

    Code Block
    languagebash
    crm status


  • Get the status of the resource:

    Code Block
    languagebash
    vm-mgr status --name NAME


  • Delete VM in the cluster:

    Code Block
    languagebash
    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.

...