1 2 Previous Next 23 Replies Latest reply: Nov 3, 2011 4:35 PM by Avi Miller-Oracle RSS

    Converting Guest to PVM from HVM

    user897654321
      I am trying to install the paravirtualized drivers, but not get the RPM to install properly.

      The guest is OEL 5.5 and I do not think I have installed anything weird or unusual into the OS.

      I do have Oracle RDBMS 10g Installed and running.

      Here is the message I receive

      [root@office Server]# rpm -ivh kernel-xen-2.6.18-194.el5.x86_64.rpm
      Preparing... ########################################### [100%]
      1:kernel-xen ########################################### [100%]
      WARNING: No module xen_vbd found for kernel 2.6.18-194.el5xen, continuing anyway
      [root@office Server]#

      And when I try to mkinitd I am receiving a similar message about the xen_vbd.

      Any ideas of what I need to install to get the module there?
        • 1. Re: Converting Guest to PVM from HVM
          Herbert van den Bergh
          The xen pv drivers are already built into the pv kernel. When you install the pv kernel, mkinitrd tries to add all drivers used by the current kernel (hvm with pv drivers) into the initrd. Since the pv kernel doesn't have separate modules for these drivers, you get this warning. You can ignore it safely.
          • 2. Re: Converting Guest to PVM from HVM
            user897654321
            So if I simply ignore the error and then try the next step it fails:

            "From the 3.0 user's Guide
            3. Back up the old initrd file, and make the new one with xennet, xenblk driver:

            # mv initrd-oldversion.el5xen.img initrd-oldversion.el5xen.img.old
            # mkinitrd initrd-newversion.el5xen.img newversion.el5xen --with=xenblk --with=xennet --preload=xenblk --preload=xennet
            "


            I receive

            [root@office boot]# mkinitrd initrd-2.6.18-194.el5xen.img 2.6.18-194.el5xen with=xenblk with=xennet preload=xenblk preload=xennet
            No module xen_vbd found for kernel 2.6.18-194.el5xen, aborting.

            And the new .img file was not created.

            Seems like I need this xen_vbd.
            • 3. Re: Converting Guest to PVM from HVM
              Herbert van den Bergh
              These are the instructions to convert HVM to PV-HVM, not to PVM. Which do you want?
              • 4. Re: Converting Guest to PVM from HVM
                user897654321
                I am trying to not use only HVM and simply want to go to PVM from there. The machine is currently labeled as HVM and I am trying to improve performance of it.

                For both I/O to the disks and for NIC speed.

                I assume changing the VM from HVM to PVM is not all I need to do.

                Following these instructions:


                8.11 Installing Paravirtualized Drivers

                For optimized performance, you can install paravirtualized drivers on hardware virtualized machines. Paravirtual drivers are optimized and improve the performance of the operating system in a virtual machine. These drivers enable high performance throughput of I/O operations in guest operating systems on top of the Oracle VM Server hosts.

                Creating hardware virtualized machines may require that you install paravirtual drivers for your hardware on the guest operating system.

                To install paravirtual drivers on an Oracle Linux guest operating system:

                Download the paravirtualized kernel on the virtual machine, for example for an Oracle Enterprise Linux 5.5 64-bit guest, download:

                http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/x86_64/kernel-xen-2.6.18-194.el5.x86_64.rpm

                Install the paravirtualized kernel on the virtual machine:

                # rpm -ivh kernel-xen-version.type.rpm
                Preparing... ########################################### [100%]
                1:kernel-xen ########################################### [100%]
                Back up the old initrd file, and make the new one with xennet, xenblk driver:

                # mv initrd-oldversion.el5xen.img initrd-oldversion.el5xen.img.old
                # mkinitrd initrd-newversion.el5xen.img newversion.el5xen with=xenblk with=xennet preload=xenblk preload=xennet
                Edit the /boot/grub/grub.conf file to be:

                default=0
                timeout=5
                splashimage=(hd0,0)/grub/splash.xpm.gz
                hiddenmenu
                title Enterprise Linux Enterprise Linux Server (version.el5xen)
                root (hd0,0)
                kernel /vmlinuz-version.el5xen ro root=LABEL=/
                initrd /initrd-version.el5xen.img
                Modify the /etc/modprobe.conf file to include:

                alias scsi_hostadapter xenblk
                alias eth0 xennet
                Shut down the virtual machine. See Section 8.9.5, "Shutting Down a Virtual Machine" for information on shutting down a virtual machine.

                Edit the virtual machine and change the Domain Type to Xen PVM. See Section 8.9.9, "Editing a Virtual Machine" for information on editing a virtual machine.

                Start the virtual machine. See Section 8.9.1, "Starting a Virtual Machine" for information on starting a virtual machine.
                • 5. Re: Converting Guest to PVM from HVM
                  861130
                  HI,

                  You can't convert from HVM to PVM - you just use PV drivers in a HVM machine. e.g. PV-HVM. That is what is confusing some people.

                  HTH
                  • 6. Re: Converting Guest to PVM from HVM
                    Herbert van den Bergh
                    Note there are 3 modes for guests:
                    HVM: unmodified kernel and drivers using software emulated devices
                    PV-HVM: unmodified kernel with paravirtualized (Xen specific) disk and network drivers
                    PV: modified kernel and drivers

                    Those instructions are incorrect. Do not install the xen kernel if you just want to add PV drivers to your HVM guest.

                    You can definitely convert an HVM guest to PV. This is documented in the Oracle VM 2.2 user's guide (section 4.7). The same procedure should still work for OVM 3.0.
                    • 7. Re: Converting Guest to PVM from HVM
                      user897654321
                      So I should follow this Metalink Note?

                      Oracle VM: Comparison of Guest Virtualisation Modes; HVM, PVM and PVHVM [ID 757719.1]

                      and more importantly this section?

                      "Configuration, Mode Validation and Conversion to PVHVM

                      This section describes how to convert an exiting HVM guest to PVHVM mode. The use of latest package versions is strongly recommended before attempting conversion. Examples and excerpts provided can be used to validate and troubleshoot an existing PVHVM configuration."
                      • 8. Re: Converting Guest to PVM from HVM
                        Herbert van den Bergh
                        Which kernel are you currently running in that guest? And what output do you get from: lsmod|grep xen

                        I suspect you may be running a kernel that already uses PV drivers, and their names are xen-vbd and xen-vnif.
                        • 9. Re: Converting Guest to PVM from HVM
                          user897654321
                          [root@office Server]# uname -a
                          Linux office.advantagedata.com 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux



                          [root@office Server]# lsmod |grep xen
                          xen_vnif 58817 0 [permanent]
                          xen_vbd 50345 0
                          xen_balloon 45641 1 xen_vnif,[permanent]
                          xen_platform_pci 117741 3 xen_vnif,xen_vbd,xen_balloon,[permanent]


                          Its OEL 5.5 x86_64
                          • 10. Re: Converting Guest to PVM from HVM
                            Herbert van den Bergh
                            OK, that means you already have the PV drivers installed and running. To see which driver is used for your network interface, do:
                            ls -l /sys/class/net/eth0/device/driver
                            and for hda:
                            ls -l /sys/block/hda/device/driver
                            • 11. Re: Converting Guest to PVM from HVM
                              user897654321
                              # ls -l /sys/class/net/eth0/device/driver
                              lrwxrwxrwx 1 root root 0 Oct 4 15:19 /sys/class/net/eth0/device/driver -> ../../../bus/pci/drivers/8139cp

                              lrwxrwxrwx 1 root root 0 Oct 4 15:19 /sys/block/hda/device/driver -> ../../../../../bus/ide/drivers/ide-disk

                              my current modprobe.conf only contains


                              alias eth0 8139cp
                              alias scsi_hostadapter ata_piix

                              So it appears I am not using the xen drivers even though they are loaded in the kernel.. is that right?

                              How to fix?
                              • 12. Re: Converting Guest to PVM from HVM
                                Herbert van den Bergh
                                1. fix modprobe.conf
                                2. fix grub.conf
                                3. fix vm.cfg
                                4. reboot
                                • 13. Re: Converting Guest to PVM from HVM
                                  user897654321
                                  Herbert van den Bergh wrote:
                                  1. fix modprobe.conf
                                  2. fix grub.conf
                                  3. fix vm.cfg
                                  4. reboot
                                  IN VM 3.0, I can not modify vm.cfg correct? So that would be an "Edit Virtual Machine" and change to PV

                                  On modprobe, I think I want to change


                                  alias eth0 8139cp
                                  alias scsi_hostadapter ata_piix

                                  to

                                  alias eth0 xen_vnif
                                  alias scsi_hostadapter xen_vbd


                                  Though I am not sure if its xen_vnif or xen-vnif or xennet
                                  and if it should be xen_vbd or xen-vbd or xenblk

                                  I have seen refereences to all of them.

                                  On grub.conf

                                  I currently have

                                  default=0
                                  timeout=5
                                  splashimage=(hd0,0)/grub/splash.xpm.gz
                                  hiddenmenu
                                  title Enterprise Linux (2.6.18-194.el5)
                                  root (hd0,0)
                                  kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
                                  initrd /initrd-2.6.18-194.el5.img

                                  and not sure what options I should add to the end of the kernel line.

                                  I don't need to run mkinitrd?
                                  • 14. Re: Converting Guest to PVM from HVM
                                    Herbert van den Bergh
                                    user897654321 wrote:
                                    Herbert van den Bergh wrote:
                                    1. fix modprobe.conf
                                    2. fix grub.conf
                                    3. fix vm.cfg
                                    4. reboot
                                    IN VM 3.0, I can not modify vm.cfg correct? So that would be an "Edit Virtual Machine" and change to PV
                                    Change the virtual network controller and virtual disk to PV, not the VM itself. You are leaving it as HVM.

                                    >
                                    On modprobe, I think I want to change


                                    alias eth0 8139cp
                                    alias scsi_hostadapter ata_piix

                                    to

                                    alias eth0 xen_vnif
                                    alias scsi_hostadapter xen_vbd


                                    Though I am not sure if its xen_vnif or xen-vnif or xennet
                                    and if it should be xen_vbd or xen-vbd or xenblk

                                    I have seen refereences to all of them.
                                    xen-vbd and xen-vnif

                                    >
                                    On grub.conf

                                    I currently have

                                    default=0
                                    timeout=5
                                    splashimage=(hd0,0)/grub/splash.xpm.gz
                                    hiddenmenu
                                    title Enterprise Linux (2.6.18-194.el5)
                                    root (hd0,0)
                                    kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
                                    initrd /initrd-2.6.18-194.el5.img

                                    and not sure what options I should add to the end of the kernel line.
                                    hda=noprobe hdb=noprobe hdc=noprobe hdd=noprobe ide0=noprobe ide1=noprobe
                                    I don't need to run mkinitrd?
                                    Yes you do, but for your current kernel version, not the el5xen kernel.

                                    All this is in note 757719.1 as well, section 3.3 and onward.

                                    Edited by: Herbert van den Bergh on Oct 5, 2011 2:37 PM
                                    1 2 Previous Next