You are here: Installation > Installing the Management Node > KVM hypervisors

Installing the Management Node — KVM hypervisors

Installation of the Management Node is a two-step process:

  1. Deploying the VM template: this creates a new unconfigured instance of a generic Management Node VM.

    The process for deploying the template in a KVM hypervisor environment is described below.

  2. Running the installation wizard: after deploying the Management Node template, the installation wizard allows you to configure the Management Node VM appropriately for your deployment.

Deploying the Management Node template

To deploy a new instance of a Pexip Infinity Management Node on to a KVM host, you must:

  1. Download the Management Node OVA image file and convert it for use with KVM.
  2. Create a new volume on your KVM server and upload the disk image.
  3. Create the Management Node virtual machine.

    Note that we use the libvirt command line tools to perform the import as they provide greater control than Virtual Machine Manager.

  4. Enable the virtual machine for automatic startup.

These steps are described in detail below.

Download the Pexip .ova image and convert it for use with KVM

You must download the Management Node OVA image file and then, to use it with KVM, you must convert it from VMDK to raw format.

From within your KVM environment:

  1. Download the Pexip Infinity OVA file (Pexip_Infinity_v11_VMware_pxMgr_<release>.ova) from www.pexip.com/software-download.

    (The VMware OVA file is used for KVM deployments.)

  2. Unpack the .ova image, using the command:

    tar xf Pexip_Infinity_v11_VMware_pxMgr_<release>.ova

    This unpacks a set of files including pexipmcumgr-disk01.vmdk.

  3. If required, you can verify the pexipmcumgr.mf manifest file, using the command:

    sha1sum -c pexipmcumgr.mf

  4. Convert the disk image from VMDK to raw, using the command:

    qemu-img convert -O raw pexipmcumgr-disk01.vmdk pexipmcumgr-disk01.raw

    (This conversion process can take several seconds.)

Create a new volume and upload the disk image

Next, you create a new volume on your KVM server and upload the converted disk image. From within your KVM environment:

  1. Use virsh to create a new volume on your KVM server:

    virsh --connect qemu://<hostname>/system vol-create-as <poolname> <volume_name> 99G --format raw

    where:

    <hostname> is the hostname of your KVM server. Note that you can omit the <hostname> if you are running virsh commands on the local server i.e. you can use virsh --connect qemu:///system .

    <poolname> is the name of the storage pool in which to create the volume; typically you would use default. (To determine the storage pools available on the target system, use virsh --connect qemu://<hostname>/system pool-list.)

    <volume_name> is the name of your new volume.

    99G is the virtual size of the volume; always use 99G for a Management Node.

    For example:

    virsh --connect qemu://host1.example.com/system vol-create-as default pexip-manager 99G --format raw

    This example creates a volume named pexip-manager of size 99 GB and format raw in the storage pool named default.

  2. Upload the converted disk image to the newly created volume:

    virsh --connect qemu://<hostname>/system vol-upload <volume_name> pexipmcumgr-disk01.raw --pool <poolname>

    For example:

    virsh --connect qemu://host1.example.com/system vol-upload pexip-manager pexipmcumgr-disk01.raw --pool default

    This example uploads the pexipmcumgr-disk01.raw image to the newly created volume, pexip-manager, in the storage pool named default.

Create the virtual machine

After the disk image has been uploaded, you can create the virtual machine to use it.

Note that we use the libvirt command line tools to perform the import as they provide greater control than Virtual Machine Manager.

  1. Identify the filesystem path of the newly uploaded disk image:

    virsh --connect qemu://<hostname>/system vol-path <volume_name> --pool <poolname>

    For example:

    virsh --connect qemu://host1.example.com/system vol-path pexip-manager --pool default

    This prints out the absolute path to the disk image file, for example:

    /var/lib/libvirt/images/pexip-manager

    This path is used in the disk path parameter in the next step.

  2. Use the virt-install command line tool to create the virtual machine:

    virt-install \
      --import \
      --hvm \
      --name=<vm_name> \
      --arch=x86_64 \
      --vcpus=2 \
      --ram=4096 \
      --cpu host \
      --os-type=linux \
      --connect=qemu://<hostname>/system \
      --virt-type kvm \
      --disk path=<image_file_path>,bus=virtio,format=raw,cache=none,io=native \
      --network bridge=br0,model=virtio \
      --memballoon virtio \
      --graphics vnc,listen=0.0.0.0,password=<password>

    This creates a new VM (KVM domain) from the converted disk image.

    The meaning of the various options are as follows (items in bold may be changed as necessary):

    Option Description
    --import Build guest domain around pre-installed disk image; do not attempt to install a new OS.
    --hvm Create a fully virtualized (i.e. not paravirtualized) VM.
    --name=<vm_name> Name of the new VM, where <vm_name> is, for example, pexip-management-vm.
    --arch=x86_64 CPU architecture of new VM (must be x84_64).
    --vcpus=2 Number of CPUs allocated to new VM. Typically, this is 2 for the Management Node.
    --ram=4096 Memory allocated to new VM (in megabytes).
    --cpu host Expose all host CPU capabilities to new VM (CPUID).
    --os-type=linux The guest OS is Linux.
    --connect=qemu://<hostname>/system Connect to KVM on the target system, where <hostname> is the hostname of your KVM server.
    --virt-type kvm Use KVM to host the new VM.
    --disk path=<image_file_path>,
    bus=virtio,format=raw,cache=none,io=native
    • Define the location of the disk image file, where <image_file_path> is as determined in the previous step, for example /var/lib/libvirt/images/pexip-manager.
    • Expose it to the guest on the virtio paravirtualized bus (as opposed to IDE/SCSI).
    • Define the image file as being in raw format.
    • Instruct the host system not to cache the disk contents in memory.
    • Use the native IO backend to access the disk device.
    --network bridge=br0,model=virtio
    • Create a network interface connected to the br0 bridge interface on the host.
    • Expose it to the guest as a virtio paravirtualized NIC.
    --memballoon virtio Expose the virtio memory balloon to the guest.
    --graphics vnc,listen=0.0.0.0,
    password=<password>
    Expose the graphical console over VNC, listening on 0.0.0.0 (i.e. all addresses on the target system) and with an access password of <password>.

    You may receive a warning "Unable to connect to graphical console: virt-viewer not installed"; if so, this message can be safely ignored.

    After the VM has been created, it may be managed using the Virtual Machine Manager desktop interface (virt-manager application) or via the command line interface (virsh).

    The new node should start automatically. If it does not you can use the Virtual Machine Manager to start the node, or the CLI command:

    virsh --connect qemu://<hostname>/system start <vm_name>

    Note that you can list existing VMs by using virsh --connect qemu://<hostname>/system list

Enabling automatic startup

After deploying a new Management Node in KVM, you should enable automatic startup of that virtual machine (VM). In KVM, automatic startup is disabled by default for every new VM. This means that if the host server is powered down for any reason, when it restarts the VM will not restart and must be started manually.

You can only enable automatic startup after the Management Node has been deployed.

To enable automatic startup using Virtual Machine Manager:

  1. Connect to the Virtual Machine Manager (virt-manager) that is managing the node's VM.
  2. Select the node's VM and then, from the toolbar, select the Show the virtual machine console and details icon .

    A new window for that VM is opened.

  3. If necessary, select View > Details to display the VM information.
  4. From the sidebar menu, select Boot Options.
  5. Select the Start virtual machine on host boot up check box.
  6. Select Apply.

Opening a console window to run the installation wizard

To run the installation wizard, which configures the Management Node, you must open a console window on the Management Node VM.

For step-by-step instructions, see Running the Pexip Infinity installation wizard.