This discussion is archived
1 2 Previous Next 23 Replies Latest reply: Nov 3, 2011 2:35 PM by Avi Miller Go to original post RSS
  • 15. Re: Converting Guest to PVM from HVM
    user897654321 Newbie
    Currently Being Moderated
    Ok I have finally converted my HVM Oracle Enterprise Linux 5.5 machine to PVM.

    I had to work with Oracle Metalink a long while, but we got it solved last night.

    Basically, we had to download the most up to date kernel-xen rpm, 2.6.18-194.32.1.0.1.el5xen, and then with that installed followed the instructions here:

    http://download.oracle.com/docs/cd/E20065_01/doc.30/e18549/vm.htm#autoId32

    All changes were made here, but Step 8, to restart the server. Was the most difficult.

    What happened here is my /etc/fstab had a reference to /dev/hdb1 for one of my mount points. This had to change to /dev/xvdb1 once we went to PVM mode.

    My question now is in my other VM guest that I have tried to convert, I have disks that are even more basic with


    # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
    89G 11G 74G 13% /
    /dev/hdb1 99M 24M 71M 25% /boot
    tmpfs 1.3G 0 1.3G 0% /dev/shm


    and my /etc/fstab is


    /dev/VolGroup00/LogVol00 / ext3 defaults 1 1
    LABEL=/boot /boot ext3 defaults 1 2
    tmpfs /dev/shm tmpfs defaults 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    sysfs /sys sysfs defaults 0 0
    proc /proc proc defaults 0 0
    /dev/VolGroup00/LogVol01 swap swap defaults 0 0

    so what do I need to change here to make it accomodate PVM and be able to boot up?

    When I try to boot with the PVM setting it gives me:

    # xm create -c vm.cfg
    Using config file "./vm.cfg".
    Error: Boot loader didn't return any data!

    Like it could not even read my /boot


    My vm.cfg contains two disk entries, one for the cdrom and one for the virtual disk only. Both with the xvdb nomenclature.

    Any help or explanation of how these disks migrate mount points would be appreciated. Also I think LVM is messing things up a bit two in my current case.
  • 16. Re: Converting Guest to PVM from HVM
    Avi Miller Guru
    Currently Being Moderated
    user897654321 wrote:
    Basically, we had to download the most up to date kernel-xen rpm, 2.6.18-194.32.1.0.1.el5xen, and then with that installed followed the instructions here:
    Actually, the UEK (2.6.32) kernel will automatically switch into PVM mode. You no longer need to download a xen kernel, unless you want to run the RHEL-compatible kernel for some reason.

    Also, that documentation is out of date. The new drivers are xen_netfront and xen_blkfront when you create the initrd.img file in step 3 and when you modify /etc/modprobe.conf in step 5. In fact, I'd do step 5 before step 3 as well.
    My vm.cfg contains two disk entries, one for the cdrom and one for the virtual disk only. Both with the xvdb nomenclature.
    Remove the CDROM entry, as it's not supported under PVM.
    Any help or explanation of how these disks migrate mount points would be appreciated. Also I think LVM is messing things up a bit two in my current case.
    Nah, LVM is fine. It's just not installing the right block/net drivers into initrd.
  • 17. Re: Converting Guest to PVM from HVM
    user897654321 Newbie
    Currently Being Moderated
    Avi Miller wrote:
    Actually, the UEK (2.6.32) kernel will automatically switch into PVM mode. You no longer need to download a xen kernel, unless you want to run the RHEL-compatible kernel for some reason.

    Also, that documentation is out of date. The new drivers are xen_netfront and xen_blkfront when you create the initrd.img file in step 3 and when you modify /etc/modprobe.conf in step 5. In fact, I'd do step 5 before step 3 as well.
    So you are saying download and install the UEK kernel for 5.5, then change to xen_netfront and xen_blkfront in modprobe.conf?

    Is there some place I can get the most current documentation?

    Nah, LVM is fine. It's just not installing the right block/net drivers into initrd.
    So after I install the new kernel, I need to add the new drivers with the "with" and "preload" when building the initrd?

    I can see that xennet and xenblk are loaded if I boot up into HVM mode, it just will not boot into PVM mode.
  • 18. Re: Converting Guest to PVM from HVM
    user897654321 Newbie
    Currently Being Moderated
    Avi,

    Based on what you said earlier, Is it possible to present an ISO to a PVM guest?

    I guess you need to place an ISO on the guest, and then mount it completely inside the guest. And then if I need to boot off the CDROM, convert back to HVM mode and then add the CDROM into the VM Manager.

    Is that the process?
  • 19. Re: Converting Guest to PVM from HVM
    499528 Pro
    Currently Being Moderated
    You should be able to attach an ISO image to a pv guest with xm block-attach vmname file:/path/to/image.iso xvdx r
    then inside the guest: mount -t iso9660 -o ro /dev/xvdx /mnt
  • 20. Re: Converting Guest to PVM from HVM
    user897654321 Newbie
    Currently Being Moderated
    So for Oracle VM 3.0 that seems to be a server side process as opposed to doing it all from VM Manager?

    Doesn't bother me, but it seems Oracle is trying to keep me from logging on to the OVM Server at all. It seems like a fairly common task of working with ISOs and even in my VMware desktop edition, I simply present the ISO to the guest and voila, I have a cdrom. Definitely a point and click type of operation.
  • 21. Re: Converting Guest to PVM from HVM
    499528 Pro
    Currently Being Moderated
    Oops sorry, my mistake, I was thinking of OVM2. I haven't tried adding an iso to a PV VM in the OVM3 manager. If it won't let you add it as a virtual cdrom, can you import it as a disk image, and then add it as a virtual disk? I'll try this myself later. What is the reason you want to attach an ISO image to a PV guest? The guest can't boot from it, and can't treat it as an actual cd/dvdrom device, so you may as well just access the iso in the guest and use losetup to mount it.
  • 22. Re: Converting Guest to PVM from HVM
    user897654321 Newbie
    Currently Being Moderated
    Typically this is the way I do a lot of new rpm install. I grab them off the initial media.

    I can hook up a yum repository of course, but sometimes its easiest from the install media.
  • 23. Re: Converting Guest to PVM from HVM
    Avi Miller Guru
    Currently Being Moderated
    user897654321 wrote:
    I can hook up a yum repository of course, but sometimes its easiest from the install media.
    Create a yum repository instead. It's tedious to loop-mount ISOs into PV guests.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points