[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Convert "full virtual" xenU to "paravirtual"



I have not tried this on RHEL5 yet, but I have done it successfully on
Fedora.

Along with installing the xen kernel on the guest with yum, I had to
recreate the initrd and include the xenblk module.

mkinitrd -f --preload=xenblk /boot/initrd.<kernel_version>.xenblk.img
<kernel_version>

After that I modified the grub config of the guest (assuming you're
using pygrub) to make use of the new initrd.


My steps in short form:
  Install HVM guest
  Boot into HVM guest
  Install xen kernel from within HVM guest
  Recreate initrd from within HVM guest
  Modify grub.conf of HVM guest to point to the new initrd.
  Shutdown HVM guest
  Modify HVM config on dom0 to be a PV config file (remove
hvmloader/device_model and add in pygrub like you have.  I think i also
removed type=ioemu from the vif line)
  xm create on the modified config (use -c to choose which kernel to
boot)


Hope that helps.  If its not clear let me know.  I planned to make a
detailed guide (for this as well as converting PV to HVM) for my own
use, but haven't had time yet.

On Wed, 2007-09-26 at 14:33 -0400, James Drenter wrote:
> I'm stuck in a position where I need to be able to convert (in situ) a fully 
> virtualized xenU to a paravirtualized xenU.  I've seen this discussed a few 
> times in a few places, but I've never seen a good discussion of it actually 
> being done.  It always seems like some workaround is put into place.  My 
> options are extremely limited so that isn't really feasible for me.
> 
> Here's the situation:
> I have a single RHEL5 system (64-bit) with plenty of memory and hard drive 
> space with Xen 3.0.3 installed.  While I have root access and can reboot this 
> system, I do not have access to the system console (it sits in an 
> inaccessible data center).
> 
> On this system, I need to host 4 paravirtualized xenU's running 64-bit RHEL 4 
> & 5.  Still all well and good.
> 
> Now it starts to get tricky:  I need to install these systems from prepared 
> ISO images.  There does not seem to be any way to directly install a 
> paravirtualized domain from ISOs, only a fully virtualized domain (HVM).  
> I've been able to install HVM domUs, but now performance is an issue and I'd 
> really like to convert them to paravirtualized domUs.  I can't seem to make 
> it work.
> 
> I've got the xenU kernel in place and changed the original /etc/xen/vm.cfg 
> file from:
> name = "vm1"
> builder = "hvm"
> memory = "1000"
> disk = [ 'phy:/dev/VolGroupVMa/LogVol03,hda,w', ]
> vif = [ 'type=ioemu, mac=00:16:3e:1a:19:29, bridge=xenbr0', ]
> uuid = "7c3cc0d6-9135-714e-df58-d85e16136d29"
> device_model = "/usr/lib64/xen/bin/qemu-dm"
> kernel = "/usr/lib/xen/boot/hvmloader"
> vnc=1
> vncunused=1
> apic=1
> acpi=1
> pae=1
> vcpus=2
> serial = "pty" # enable serial console
> on_reboot   = 'restart'
> on_crash    = 'restart'
> 
> To:
> name = "vm1"
> memory = "1000"
> disk = [ 'phy:/dev/VolGroupVMa/LogVol03,hda,w', ]
> vif = [ 'type=ioemu, mac=00:16:3e:1a:19:29, bridge=xenbr0', ]
> uuid = "33983d8f-5235-155f-719c-0a0ca299a7a7"
> bootloader = "/usr/bin/pygrub"
> root = "/dev/hda1 rw"
> vnc=1
> vncunused=1
> vcpus=2
> on_reboot   = 'restart'
> on_crash    = 'restart'
> 
> Everytime I try to start the xenU domain (xm create vm1), it looks like it is 
> going to work, then dies after a couple of seconds.  The output is not very 
> helpful:
> Using config file "./vm4".
> Going to boot Red Hat Enterprise Linux AS (2.6.9-55.ELxenU)
>  kernel: /boot/vmlinuz-2.6.9-55.ELxenU
>  initrd: /boot/initrd-2.6.9-55.ELxenU.img
> Started domain vm4
> xen_start_info @ffffffff80818000
> shared @m0000275000 @ffffffff80107000=@ffffffffff5fd000 [0x802]
> xen_start_info: @ffffffff80818000
> cr3 0000000000101000 pml4p ffffffff80101ff8
> pml4e 0000000000103067 (real 000000012a711067) pgdp ffffff8000103ff0
> pgde 0000000000105067 (real 000000012a667067) pmdp ffffff8000105020
> pmde 0000000000822067 (real 000000012a9ca067) ptep ffffff80008220c0
> pte 0010000000818027 (real 001000012a9d4027)
> xen_shared_info: @ffffffffff5fd000
> cr3 0000000000101000 pml4p ffffffff80101ff8
> pml4e 0000000000103067 (real 000000012a711067) pgdp ffffff8000103ff8
> pgde 0000000000000000 is none
> PAGE_OFFSET+1.2: @ffffff8000001000
> cr3 0000000000101000 pml4p ffffffff80101ff8
> pml4e 0000000000103067 (real 000000012a711067) pgdp ffffff8000103000
> pgde 0000000000824067 (real 000000012a9c8067) pmdp ffffff8000824000
> pmde 0000000000825067 (real 000000012a9c7067) ptep ffffff8000825008
> pte 0000000000001167 (real 000000012a643167)
> rtc: IRQ 8 is not free.
> i8042.c: No controller found.
> Kernel panic - not syncing: Attempted to kill init!
> 
> That's it, it stops there.
> 
> My experience with XEN is limited, so I know I might be doing something 
> completely wrong.  Any help would be greatly appreciated.
> 
> Regards,
> James
> 
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.