Back to top
 
 
 

Libvirt management

Contents

1 Managing libvirt environments (ConVirt 3.4.4+ )

Starting ConVirt 3.4.4, you can use ConVirt to manage libvirt hosts in a centralized fashion. In addition, you get the following automation features from using the ConVirt framework.

 * Template based provisioning
 * Scheduled provisioning
 * High Availability
 * Dynamic Workload Management (similar to VMware DRS)
 * Backup and Restore
 * Annotation for collaboration
 * and more.

1.1 Prerequisites

  • Xen or KVM Virtualization host
  • Libvirt 1.2+
  • Tested an certified platforms
 * Ubuntu 14.04 KVM
 * Ubuntu 14.04 Xen ( live migration not working at the moment, will be available with libvirt 1.2.6) 
 * CentOS 7 KVM 

1.2 Preparing a Libvirt Host

  • root account is setup with password and can be remotely access. ConVirt uses the root account to do storage and networking changes.

1.3 Adding/Discovering Libvirt Host

Select Data Center and choose Create New Server Pool option from the context menu. Specify Libvirt in plaform drop down and select the platform (xen/kvm) as well as the communication/transport (tcp, ssh, tls). You will also need to have to give root credentials.


After few seconds pressing ok, you will see a node in the navigator under server pool and a Import Virtual Machine task submitted in the bottom task panel. You will start seeing virtual machines on that server show up under the host/server node in the navigator.


1.4 Creating Virtual Machine

Please refer to Creating Virtual Machine page to get idea of the overall flow. Some of the things that can be tweaked are explained here.

  • Create your custom template by doing a Create Like on one of the libvirt template in Libvirt Templates folder.
  • For KVM/Xen : Storage tab, and point to correct ISO.
  • For KVM : Miscellaneous tab : kvm_emulator : Point to the kvm binary.
  • For Xen : Miscellaneous tab : xen_emulator : Default should work in most cases.
  • Disk customization : You can use the disk_custom field to add additional tags and attributes to disks. The default value shows how to add cache='none' in the disk attribute.
["{'tag': 'driver', 'attr': 'cache', 'value': 'none'}"]
For adding specific attributes to a specific disk, use the <device>_custom attribute in the Miscellaneous tab. for e.g. hda_custom or vda_custom
  • Device customization : You can use the device.xml under convirt-enterprise/image_store/<image/template name> directory to customize default devices that are added to the newly created VM.
  • For Xen PV template: Download the kernel and ramdisk for network installation and make it available to all nodes via shared location or rsync/scp.
    • Go to Boot Params and change the kernel and ramdisk to point to the location where you copied the kernel and ramdisk on the managed node.
    • Adjust kernel args to have correct url for the installation.
    • Provision a new VM using the template and go through the installation.
    • After successful installation, stop the VM.
    • Now Edit the VM and change the Boot Params page to use the boot loader by checking the "Boot Loader" checkbox.
    • Now the VM would start using the boot loader instead of going back to installation flow.

1.5 Virtual Machine Operations

You can select the virtual machine and use the context menu to do various VM operations like start, stop, pause etc.

1.6 Automation features

The libvirt platform enjoys all the features mentioned below. Refer to ConVirt Enterprise Documentation for more details. For convenience some of the topics are linked here.

 

Comentários