Is it possible to convert Solaris 10 DomU from hvm to pv?? Dom0 is Opensolaris b132. Possibly any Documentation about this? Here is config of Solaris DomU: <domain type=''xen'' id=''1''> <name>Solaris-10</name> <uuid>c505f6c3-b37b-8268-fe46-f10b3277238b</uuid> <memory>2097152</memory> <currentMemory>2097152</currentMemory> <vcpu>2</vcpu> <os> <type>hvm</type> <loader>/usr/lib/xen/boot/hvmloader</loader> <boot dev=''hd''/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset=''localtime''/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <distro> <type>solaris</type> <variant>solaris10</variant> </distro> <devices> <emulator>/usr/lib/xen/bin/qemu-dm</emulator> <disk type=''block'' device=''disk''> <driver name=''phy'' type=''zvol''/> <source dev=''/tank/guests/dom4/disk0''/> <target dev=''hda'' bus=''ide''/> </disk> <disk type=''file'' device=''cdrom''> <target dev=''hdc'' bus=''ide''/> <readonly/> </disk> <interface type=''ethernet''> <mac address=''XX:XX:XX:XX:XX:XX''/> <script path=''/usr/lib/xen/scripts/vif-vnic''/> <target dev=''vif1.0''/> </interface> <serial type=''pty''> <source path=''/dev/pts/1''/> <target port=''0''/> </serial> <console type=''pty'' tty=''/dev/pts/1''> <source path=''/dev/pts/1''/> <target port=''0''/> </console> <input type=''tablet'' bus=''usb''/> <input type=''mouse'' bus=''ps2''/> <graphics type=''vnc'' port=''5900'' autoport=''yes'' keymap=''en-us''/> </devices> </domain> Thank you!
Ben Rockwood
2010-Feb-18 21:43 UTC
Re: Howto convert Solaris 10 DomU from hvm to paravirt?
I''ve not attempted to do this, but today came across an answer in the Xen-Users FAQ that fit your question... it may lead you in the right direction: ==Guest Conversion Q (G1.0): How do I convert a Centos HVM Guest to a PV Guest? A (G1.0): Creating a Centos HVM domU with working PV drivers : http://pastebin.com/fb6fe631 Converting HVM guest to PV guest : http://pastebin.com/f6a5022bf If you follow both parts correctly you should have a working PV domU. If anything goes wrong during conversion process, you should still be able to boot the previous HVM domU config if you select the non-xen kernel (second entry) from grub menu.list. == benr. -- This message posted from opensolaris.org
Fajar A. Nugraha
2010-Feb-19 07:48 UTC
Re: Howto convert Solaris 10 DomU from hvm to paravirt?
On Thu, Feb 18, 2010 at 3:36 AM, E.S. <a.n.s.i@gmx.net> wrote:> Is it possible to convert Solaris 10 DomU from hvm to pv??AFAIK you can''t run solaris 10 as pv domU. You CAN, however, convert a HVM opensolaris domU to PV. easily enough.> > Dom0 is Opensolaris b132. Possibly any Documentation about this?This is what I did on RHEL dom0 (should also work on opensolaris dom0): - create opensolaris HVM domU (I use b132). Complete installation until you can login to the new installation. - login as the user you created - pfexec su - (I prefer this rather than typing "pfexec" everytime) - beadm create pv (this is the name of new BE. Pick anything you like) - edit /rpool/boot/grub/menu.lst, edit the new BE entry section to use xpv kernel so it looks like this ############ kernel$ /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics module$ /platform/i86pc/$ISADIR/boot_archive ############ - activate the new BE with "beadm activate pv". This is necessary because pygrub will use default entry. - shutdown HVM domU At this point you can use HVM''s disk directly. In my case I prefer to create a snapshot and clone. If you start PV domU now, you''ll get error like this ############ NOTICE: Can not read the pool label from ''/pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0:a'' NOTICE: spa_import_rootpool: error 5 Cannot mount root on /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0:a fstype zfs panic[cpu0]/thread=fffffffffbc60520: vfs_mountroot: cannot mount root fffffffffbc948c0 genunix:vfs_mountroot+32e () fffffffffbc948f0 genunix:main+125 () fffffffffbc94900 unix:_locore_start+80 () skipping system dump - no dump device configured rebooting... ############ This is because the disk controller has change (from hda to xvda). You''ll need to import-export the pool first. So we boot using livecd with a domU config like this (I use old-style config, which should work on newer version of Xen as well) ############ memory = "2000" disk = [ ''file:/z/iso/osol.iso,xvdc:cdrom,r'', ''file:/z/osol-pv/hda.img,xvda,w'', ] vif = [ ''mac=00:16:3E:D4:F7:22'' ] bootloader="/usr/bin/pygrub" vcpus=1 ############ osol.iso the opensolaris live cd. This will bring you to livecd text console - login with jack/jack - pfexec su - - zpool import -f rpool - zpool export rpool - shutdown domU Then you change domU config a little to put the disk first (or you could remove the cdrom iso) ############ memory = "2000" disk = [ ''file:/z/osol-pv/hda.img,xvda,w'', ''file:/z/iso/osol.iso,xvdc:cdrom,r'', ] vif = [ ''mac=00:16:3E:D4:F7:22'' ] bootloader="/usr/bin/pygrub" vcpus=1 ############ then boot domU. You''ll get a working PV domU with text console. -- Fajar