Set up Sun xVM 3.4.2 on top of opensolaris 1002-128a via binary packages been built by Pascal Gienger at Index of /software/xvm/3.4.2. Been performing testing bellow my major concern was ability Sun xVM 3.4.2 to handle PV DomUs with boot file systems of ext4fs type. Actually, two guests have been tested : F12 and Ubuntu Karmic Server, in both cases boot partition has been converted to ext3fs to create DomUs manageable via virsh ( virt-manager).
wget http://southbrain.com/software/xvm/3.4.2/SUNWlibvirt-xvm-3.4.2.pkg
wget http://southbrain.com/software/xvm/3.4.2/SUNWlibvirtr-xvm-3.4.2.pkg
wget http://southbrain.com/software/xvm/3.4.2/SUNWurlgrabber-xvm-3.4.2.pkg
........
pkgadd -d SUNWurlgrabber-xvm-3.4.2.pkg
pkgadd -d SUNWlibvirtr-xvm-3.4.2.pkg
pkgadd -d SUNWurlgrabber-xvm-3.4.2.pkg
.......
svcadm enable milestone/xvm
After packages install and enabling xVM, grub entry for xVM should look like :-
title Xen Solaris Development snv_128a X86
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/opensolaris
kernel$ /boot/$ISADIR/xen.gz console=vga dom0_mem=2048M dom0_vcpus_pin=false watchdog=false
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive
Install HVM DomU via virt-install :-
virt-install --debug -n KarmicSRV --hvm -r 2048 \
--vcpus=1 -f /dev/zvol/dsk/tvsk2/disk \
--vnc -c /export/home/boris/isos/karmic.iso
Login into HVM :-
# cd /etc/init
# cp tty1.conf hvc0.conf
# vi hvc0.conf
and replace tty1 with hvc0
Shutdown HVM and load PV DomU first time via profile
# cat koala1.py
name="KarmicPV"
memory=2048
bootloader="/usr/lib/xen/bin/pygrub"
kernel="/vmlinuz-2.6.31-14-server"
ramdisk="/boot/initrd.img-2.6.31-14-server"
vif=[' ']
disk=['phy:/dev/zvol/dsk/tvsk2/disk,xvda,w']
extra="root=/dev/xvda2 ro console=hvc0"
xm create -c koala1.py
When DomU gets loaded run tasksel and install Ubuntu Desktop
Shutdown PV DomU and load HVM DomU
Replace grub2 with grub legacy at Karmic HVM DomU:-
# mv /boot/grub /boot/grub_backup
# mkdir /boot/grub
# apt-get --purge remove grub-pc grub-common os-prober
# apt-get install grub
# update-grub
# grub-install /dev/sda
Modify /boot/grub/menu.lst at DomU as follows:-
title Ubuntu 9.10, kernel 2.6.31-14-server (PV)
uuid 8f2cf635-75a0-40d3-9ae5-8d13ce97fe51
kernel /vmlinuz-2.6.31-14-server root=/dev/xvda2 ro quiet splash
initrd /initrd.img-2.6.31-14-server
title Ubuntu 9.10, kernel 2.6.31-14-server (HVM)
uuid 8f2cf635-75a0-40d3-9ae5-8d13ce97fe51
kernel /vmlinuz-2.6.31-14-server root=UUID=8a70da2f-c711-4b86-a785-efdd
0f5fdf8c ro quiet splash
initrd /initrd.img-2.6.31-14-server
Shutdown HVM and load PV DomU via profile koala2.py :-
name="KarmicPV1"
memory=2048
bootloader="/usr/lib/xen/bin/pygrub"
vif=[' ']
disk=['phy:/dev/zvol/dsk/tvsk2/disk,xvda,w']
vfb=['type=vnc,vncunused=1']
# xm create koala2.py
# vncviewer localhost:0
Run virsh dumpxml KarmicPVM > karmic.xml at runtime and shutdown DomU
# virsh define karmic.xml
# virsh start KarmicPV1
# vncviewer localhost :0
References
1. Sun xVM 3.4.2 available, dom0_min_mem
[…] Set up Sun xVM 3.4.2 on top of opensolaris 1002-128a via binary packages been built by Pascal Gienger at Index of /software/xvm/3.4.2. More here […]
I could only get this to work if I changed
kernel=”/vmlinuz-2.6.31-14-server”
to
kernel=”/boot/vmlinuz-2.6.31-14-server”
and
extra=”root=/dev/xvda1 ro console=hvc0″
to
extra=”root=/dev/xvda2 ro console=hvc0″
in koala1.py
I believe your’s /boot is mounted on /dev/xvda1
and “/” is mounted on /dev/xvda2.
It’s just a typo in my blog.
Could you post “df -h” ?
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 1.9G 671M 1.1G 38% /
udev 1.1G 120K 1.1G 1% /dev
none 1.1G 0 1.1G 0% /dev/shm
none 1.1G 32K 1.1G 1% /var/run
none 1.1G 0 1.1G 0% /var/lock
none 1.1G 0 1.1G 0% /lib/init/rw
Per your report, just one “/” on /dev/xvda1 :-
kernel=”/boot/vmlinuz-2.6.31-14-server”
ramdisk=”/boot/initrd.img-2.6.31-14-server”
extra= “root=/dev/xvda1 ro console=hvc0”
You don’t have /dev/xvda2
Your mode of explaining everything in this article is really fastidious, every one be able to effortlessly understand it, Thanks a lot.