This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Appliance Virtualization

The default installation of Protegrity appliances use hardware virtualization mode (HVM). An appliance can be reconfigured to use parallel virtualization mode (PVM) to optimize the performance of virtual guest machines. Protegrity supports the following virtual servers:

  • Xen
  • Microsoft Hyper-VP
  • Linux KVM Hypervisor

The information in this section will provide details on appliance virtualization. Understanding some of the instructions and details will require some Xen knowledge and technical skills. The virtual server configuration is done with its own tools. The examples shown later in this section are for using paravirtualization with Xen. Xen hypervisor is a thin software layer that is inserted between the server hardware and the operating system. This provides an abstraction layer that allows each physical server to run one or more virtual servers, effectively decoupling the operating system and its applications from the underlying physical server. Xen hypervisor changes are facilitated by the Xen Paravirtualization Tool.

For more information about Xen, and Xen hypervisor, refer http://www.xen.org/.

About switching from HVM to PVM

This section will also show how to switch from HVM to PVM. The following two main tasks are involved:

  • Configuration changes on the guest machine, the appliance.
  • Configuration changes on the virtual server.

The appliance configuration changes are facilitated by the Xen Paravirtualization tool, which is available in the appliance Tools menu, in the CLI Manager.

1 - Xen Paravirtualization Setup

This section describes the paravirtualization process, from preparation to running the tools and rebooting into PVM mode.

The paravirtualization tool provides an easy way to convert HVM to PVM and back again. It automates changes to configuration files and XenServer parameter.

This section describes the actual configuration changes on both the Appliance and XenServer in case you need or want to understand the low-level mechanisms involved.

Before you begin

It is recommended that you consult Protegrity Support before using the information in this Technical Reference section to manually change your configurations.

1.1 - Pre-Conversion Tasks

Before switching from HVM to PVM you should perform a system check, interface check, and system backup.

System Check

The Protegrity software appliance is installed with HVM. This means the appliance operating system does not know that it is running on a hypervisor.

To check the system:

  1. Use the following Linux command to check whether the Linux kernel supports paravirtualization and examine the hypervisor.

    # dmesg | grep –i boot
    

    If the following message does not appear, then the kernel does not support paravirtualization:

    Booting paravirtualized kernel
    

    The rest of the output shows the hypervisor name, for example, Xen. If you are running on a physical hardware, or the hypervisor was not configured to use PVM, then the following output appears:

    bare hardware
    

Interface Check

The conversion tools and tasks assume that the Protegrity Appliance virtual hard disk is using the IDE interface, which is the default interface. Check that the device name used by the Linux Operating System is hda, and not sda or other devices.

System Backup

Switching from HVM to PVM requires changes in many configuration files, so it is very important to back up the system before applying the changes. Use the XenServer snapshot functionality to back up the system.

For more information about the snapshot functionality, refer to the XenServer documentation.

It is also recommended that you back up the appliance data and configuration files using the standard appliance backup mechanisms.

For more information about backing up from CLI Manager, refer here.

Managing local OS user option provides you the ability to create users that need direct OS shell access. These users are allowed to perform non-standard functions, such as schedule remote operations, backup agents, run health monitoring, etc. This option also lets you manage passwords and permissions for the dpsdbuser, which is available by default when ESA is installed.

Managing Local OS Users

This section describes the steps to manage the local OS users.

To manage local OS users:

  1. Navigate to Administration > Accounts and Passwords > Manage Passwords and Local-Accounts > Manage local OS users.

  2. In the dialog displayed, enter the root password and confirm selection.

  3. Add a new user or select an existing user as explained in following steps.

    1. Select Add to create a new local OS user.

      1. In the dialog box displayed, enter a User name and Password for the new user. The & character is not supported in the Username field.

      2. Confirm the password in the required text boxes.

      3. Select OK and press Enter to save the user.

    2. Select an existing user from the list displayed.

      1. You can select one of the following options from the displayed menu.
      OptionsDescriptionProcedure
      Check passwordValidate entered password.In the dialog box displayed, enter the password for the local OS user.
      A Validation succeeded message appears.
      Update passwordChange password for the user.
      1. In the dialog box displayed, enter the Old password for the local OS user.
        This step is optional.
      2. Enter the New Password and confirm it in the required text boxes.
      Update shellDefine shell access for the user.In the dialog box displayed, select one of the following options:
      • No login access
      • Linux Shell - /bin/sh
      • Custom
      Note: The default shell is set as No login access (/bin/false).
      Toggle SSH accessSet SSH access for the user.Select the Toggle SSH access option and press Enter to set SSH access to Yes.
      Note: The default is set as No when a user is created.
      Delete userDelete the local OS user and related home directory.Select the Delete user option and confirm the selection.
  4. Select Close to exit the option.

Backup and Restore

If you backed up the OS in HVM/PVM mode, then you will be able to restore only in the mode in which you backed it up. For more information about backing up from the Web UI, refer to section System Backup and Restore.

1.2 - Paravirtualization Process

There are several tasks you must perform to switch from HVM to PVM.

The following figure shows the overall task flow.

HVM to PVM Conversion Task Flow

The installed Appliance comes with the Appliance Paravirtualization Support Tool, which is equipped with the following:

  • Displays the current paravirtualization status of the appliance.
  • Displays Next Boot paravirtualization status of the appliance.
  • Converts from HVM to PVM and back again.
  • Connects to the XenServer and configures the Xen hypervisor for HVM or PVM.

Starting the Appliance Paravirtualization Support Tool

You can use Appliance Paravirtualization Support Tool to configure the local appliance for PVM.

To start the Appliance Paravirtualization Support Tool:

  1. Access the ESA CLI Manager.

  2. Navigate to Tools > Xen ParaVirtualization screen.

    The root permission is required for entering the tool menu.

    When you launch the tool, the main screen shows the current system status and provides options for managing virtualization.

    Appliance Paravirtualization Support Tool Main Screen

Enabling Paravirtualization

When you convert your appliance to PVM mode, the internal configuration is modified and the Next Boot status changes to support paravirtualization. Both virtual block device and virtual console support is enabled as well.

To enable Paravirtualization:

  1. To enable PVM on the appliance, you need to configure both XenServer and the appliance.

    You can configure XenServer in two ways:

    • Copy the tool to the XenServer and execute it locally, not using the appliance.
    • Execute the commands manually using the xe command of Xen console.
  2. To configure the local appliance for PVM from the Appliance Paravirtualization Support Tool main screen, select Enable paravirtualization settings.

The status indicators in the Next boot configuration section of the main screen change from Disabled to Enabled.

Configuring Host for PVM

To configure the Host for PVM, you need to have access to the XenServer machine.

Once the local Appliance is configured to use PVM, you connect to the XenServer to run the Xen ParaVirtualization Support Tool. This configures changes on the Xen hypervisor so that it runs in Host PVM mode. You will be asked for a root password upon launching the tool.

The following figure shows the main screen of the Xen Paravirtualization Support Tool.

Xen ParaVirtualization Support Tool Main Screen

To configure the Host for PVM:

  1. From the Appliance ParaVirtualization Support Tool main screen, select Connect to XenServer hypervisor and execute tool.

  2. Select OK.

    The XenServer hypervisor interface appears.

  3. At the prompt, type the IP or host name of the XenServer.

  4. Press ENTER.

  5. At the prompt, type the user name for SCP/SSH connection.

  6. Press ENTER.

  7. At the prompt, type the password to upload the file.

  8. Press ENTER.

    The tool is uploaded to the /tmp directory.

  9. At the prompt, type the password to remotely run the tool.

  10. Press ENTER.

    An introduction message appears.

  11. At the prompt, type the name of the target virtual machine.

    Alternatively, press ENTER to list available virtual machines.

    The Xen ParaVirtualization Support Tool Main Screen appears and shows the current virtual machine information and status.

  12. Type 4 to enable paravirtualization settings.

  13. Press ENTER.

    The following screen appears.

    Xen ParaVirtualization Settings Screen

  14. At the prompt, type Y to save the configuration.

  15. Press ENTER.

  16. You can use option 3 to back up the entries that will be modified.
    The backup is stored in the /tmp directory on the XenServer machine as a rollback script that can be executed later on to revert the configuration back from PVM to HVM.

  17. Type q to exit the Appliance Paravirtualization Support Tool.

Rebooting the Appliance for PVM

After configuring the appliance and the Host for PVM, the appliance must be restarted. When it restarts, it will come up and run in PVM mode.

Before you begin

Before rebooting the appliance:

  • Exit both local and remote Paravirtualization tools before rebooting the appliance.

  • In the PVM, the system might not boot if there are two bootable devices. Be sure to eject any bootable CD/DVD on the guest machine.

  • If you encounter console issues after reboot, then close the XenCenter and restart a new session.

Booting into System Restore mode

You cannot boot in the System Restore mode when in the Xen Server PVM mode, because it does not show up during appliance launching and appears only if you have previously backed up the OS. However, you can boot in the System Restore mode when in the Xen Server HVM mode.

How to reboot the appliance for PVM

To reboot appliance for PVM:

  1. To reboot the appliance for PVM, navigate to Administration > Reboot and Shutdown > Reboot.

  2. Restart the Appliance Paravirtualization Support Tool and check the main screen to verify the current mode.

Disabling Paravirtualization

To disable Paravirtualization:

  1. To revert the appliance back to HVM, you need to disable paravirtualization on the guest appliance OS and on the XenServer.

  2. To return the appliance to HVM, use the Disable Paravirtualization Settings option, available in the Appliance Paravirtualization Support Tool.

    The status indicators in the Next boot configuration section on the main screen change from Enabled to Disabled.

  3. To return the XenServer to HVM, perform one of the following tasks to revert the XenServer configuration to HVM:

    If…Then…
    You backed up the XenServer configuration by creating a rollback script while switching from HVM to PVM, using option 3 on the Xen Paravirtualization Support ToolExecute the rollback script.
    You want to use the Xen Paravirtualization Support ToolUse the Xen Paravirtualization Support Tool to connect to the XenServer, and then type 5 to select Disable paravirtualization Setting (enable HVM). For more information about connecting to the XenServer, refer to section Configure Host for PVM.
    You want to perform a manual conversionManually convert from PVM to HVM. For more information about converting from PVM to HVM, refer to section Manual Configuration of Xen Server.

2 - Xen Server Configuration

This section describes about configuring the Xen Server.

Appliance Configuration Files for PVM

The following table describes the appliance configuration files that are affected by the appliance Xen Paravirtualization tool.

File NameDescriptionHVMPVM
/boot/grub/menu.lstBoot Manager. The root partition is affected and the console parameters.root=/dev/hda1root=/dev/xvda1
console=hvc0
xencons=hvc0
/etc/fstabMounting tableUsing the hda device name (/dev/hda1,/dev/hda2,…)Using the xvda device-name (/dev/xvda1,…)
/etc/inittabConsoletty1hvc0

Xen Server Parameters for PVM

This section lists the Xen Server Parameters for PVM.

The following settings are affected by the Appliance Paravirtualization Support Tool.

Parameter NameDescriptionHVMPVM
HVM-boot-policyVM parameter: boot-loaderBIOS Order“” (empty)
PV-bootloaderVM Parameter: paravirtualization loader“” (empty)Pygrub
BootableVirtual Block Device parameterfalse“true”

Manual Configuration of Xen Server

This section describes about configuring the Xen Server manually.

It is recommended that you use the Xen Paravirtualization Support Tool to switch between HVM and PVM. However, you sometimes might need to manually configure the XenServer. This section describes the commands you use to switch between the two modes.

It is recommended that you consult Protegrity Support before manually applying the commands. Back up your data prior to configuration changes. Read the XenServer documentation to avoid errors.

Converting HVM to PVM

This section describes the steps to convert HVM to PVM.

To convert HVM to PVM use the following commands to convert from HVM to PVM, where NAME_OF_VM_MACHINE is the name of the virtual machine.

```
TARGET_VM_NAME="NAME_OF_VM_MACHINE"
TARGET_VM_UUID=$(xe vm-list name-label="$TARGET_VM_NAME" params=uuid --minimal)
TARGET_VM_VBD=$(xe vm-disk-list uuid=$TARGET_VM_UUID | grep -A1 VBD | tail -n 1 | cut -f2 - | sed "s/ *//g")
xe vm-param-set uuid=$TARGET_VM_UUID HVM-boot-policy=""
xe vm-param-set uuid=$TARGET_VM_UUID PV-bootloader="pygrub"
xe vbd-param-set uuid=$TARGET_VM_VBD bootable="true"
```

Converting PVM to HVM

This section describes the steps to convert PVM to HVM.

To convert PVM to HVM use the following commands to convert from PVM to HVM, where NAME_OF_VM_MACHINE is the name of the virtual machine.

```
TARGET_VM_NAME="NAME_OF_VM_MACHINE"
TARGET_VM_UUID=$(xe vm-list name-label="$TARGET_VM_NAME" params=uuid --minimal)
TARGET_VM_VBD=$(xe vm-disk-list uuid=$TARGET_VM_UUID | grep -A1 VBD | tail -n 1 | cut -f2 - | sed "s/ *//g")
xe vm-param-set uuid=$TARGET_VM_UUID HVM-boot-policy="BIOS order"
xe vm-param-set uuid=$TARGET_VM_UUID PV-bootloader=""
xe vbd-param-set uuid=$TARGET_VM_VBD bootable="false"
```

3 - Installing Xen Tools

Protegrity uses Xen tools to enhance and improve the virtualization environment with better management and performance monitoring. The appliance is a hardened machine, so you must send the Xen tools (.deb) package to Protegrity. In turn, Protegrity provides you with an installable package for your Xen Server environment. You must upload the package to the appliance and install it from within the OS Console.

To install Xen tools:

  1. Mount the Xen tools CDROM to the guest machine:

    1. Using the XenCenter, mount the XenTools (xs-tools.iso file) as a CD to the VM.

    2. Log in to the appliance, and then switch to OS Console.

    3. To manually mount the device, run the following command:

      # Mount /dev/xvdd /cdrom

  2. Copy the XEN tools .deb package to your desktop machine. You can do that:

    • Using scp to copy the file to a Linux machine, for example:

      # scp –F /dev/null /cdrom/Linux/*_i386.de YOUR_TARGET_MACHINE:/tmp

    • Using Web UI, download the following package:

      # ln –s /cdrom/Linux /var/www/xentools

    • Downloading the file from https://YOUR_IP/xentools.

      When you are done, delete the soft link (/var/www/xentools).

  3. Send the xe-guest-utilities_XXXXXX_i386.deb file to Protegrity.

    Protegrity will provide you with this package in a .tgz file.

  4. Upload the package to the appliance using the Web UI.

  5. Extract the package and execute the installation:

    # cd /products/uploads
    # tar xvfz xe-guest-utilities_XXXXX_i386.tgz
    # cd xe-guest-utilities_XXXXX_i386
    # ./install.sh
    
  6. Unmount the /cdrom on the appliance.

  7. Eject the mounted ISO.

  8. Reboot the Appliance to clean up references to temporary files and processes.

4 - Xen Source – Xen Community Version

Unlike XenServer, which provides an integrated UI to configure the virtual machines, Xen Source® does not provide one. Therefore, the third step of switching from HVM to PVM must be done manually by changing configuration files.

This section provides examples of basic Xen configuration files that you can use to initialize Protegrity Appliance on Xen Source hypervisor.

For more information about Xen Source, refer to Protegrity Support, Xen Source documentation, and forums.

HVM Configuration

The following commands are used to manually configure the appliance for full virtualization.

import os, re
arch_libdir = 'lib'
arch = os.uname()[4]
if os.uname()[0] == 'Linux' and re.search('64', arch):
arch_libdir = 'lib64'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
boot="cda"
memory = 1024
name = "ESA"
vif = [ 'type=ioemu, bridge=xenbr0' ]
disk = [ 'file:/etc/xen/ESA.img,hda,w', 'file:/media/ESA.iso,hdc:cdrom,r' ]
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
sdl=0
opengl=0
vnc=1
vncunused=0
vncpasswd=''
stdvga=0
serial='pty'

PVM Configuration

The following commands are used to manually configure the appliance for paravirtualization.

kernel = "/usr/lib/xen/boot/pv-grub-x86_64.tgz"
extra = "(hd0,0)/boot/grub/menu.lst"
memory = 1024
name = "ESA"
vif = [ 'bridge=xenbr0' ]
disk = [ 'file:/etc/xen/ESA.img,xvda,w']
#vfb = [ 'vnc=1' ]# Enable this for graphical GRUB splash-screen

Modify the configuration file names, locations, and resources to suit your own environment and requirements.

Virtual Appliance

Create a new (minimum) virtual appliance on XEN Source after creating the configuration files as /etc/xen/ESA.hvm.cfg and /etc/xen/ESA.pv.cfg.

# xm info
# dd if=/dev/zero of=/etc/xen/ESA.img bs=1 count=1 seek=15G
# xm create –c /etc/xen/ESA.hvm.cfg
… Install machine… configure PVM …
# xm shutdown ESA
# xm create –c /etc/xen/ESA.pv.cfg

Paravirtualization FAQ and Troubleshooting

This section lists some Paravirtualization Frequently Asked Questions and Answers.

Frequently Asked QuestionsAnswers
Why are XenTools not provided with the appliance?In addition to the distribution issues, the XenTools depends on the exact version of your XenServer.
I cannot boot the virtual machine in PVM mode.Ensure that no CD/DVD (ISO image) is inserted to the machine. Eject all CD/DVDs, and then reboot.
Make sure that PVM is enabled on the hypervisor itself.
For more information about PVM, refer to section Manual Configuration of Xen Server.
The last resort would be to use a Live-CD, for example, Knoppix, in order modify the appliance files.
I cannot initialize High-Availability.Probably you have installed the XenTools but you have not rebooted the system after the XenTools installation. Reboot the system and retry.
I need to set up a cloned virtual machine as soon as possible.Currently cloning a virtual appliance is a risk which is not recommended.
Perform the following steps. 1. 2.
  1. Clone a machine.
  2. Log onto to the cloned machine.
  3. Modify the hostname and the IP address.
  4. Manually execute the following scripts:
    #/etc/opt/scripts/first-boot/5_mk_ssh_keys.sh
    #/etc/opt/scripts/first-boot/5_mk_web_certificate.sh
After switching to PVM mode, I cannot use the XenCenter.Close the XenCenter and open a new instance.