Set up Ubuntu Karmic Server (Grub2) PV Guest at Xen 4.0-rc4 Dom0 (2.6.32 pvops) on top of Fedora12

Due to recent set of Change Sets for GRUB 2 Support written by Ian Campbell usual sharing image devices between Ubuntu Karmic Koala Server HVM and PV Guests appears available at Xen-4.0 Linux Dom0. Fedora 12 has been selected due to presence of Libvirt 0.7.1 providing virt-install and virt-manager utilities.

Activate rpmbuild via:-
# yum install transfig texi2html libaio-devel dev86 glibc-devel.i686 e2fsprogs-devel gitk mkinitrd iasl

1.Setup Xen Environment.

1.Install Xen Hypervisor
# wget http://myoung.fedorapeople.org/dom0/src/xen-4.0.0-0.2.rc4.fc12.src.rpm
# rpm -iv xen-4.0.0-0.2.rc4.fc12.src.rpm
# cd rpmbuild/SPEC
# rpmbuild -bb ./xen.spec
# cd ../RPMS/x86_64
yum install xen-4.0.0-0.2.rc4.fc12.x86_64.rpm \
xen-debuginfo-4.0.0-0.2.rc4.fc12.x86_64.rpm \
xen-devel-4.0.0-0.2.rc4.fc12.x86_64.rpm \
xen-doc-4.0.0-0.2.rc4.fc12.x86_64.rpm \
xen-hypervisor-4.0.0-0.2.rc4.fc12.x86_64.rpm \
xen-libs-4.0.0-0.2.rc4.fc12.x86_64.rpm \
xen-runtime-4.0.0-0.2.rc4.fc12.x86_64.rpm

2.Install Libvirt
# yum install libvirt libvirt-python python-virtinst \
virt-manager virt-viewer

3.Install kernel
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
# cd linux-2.6-xen
# git checkout origin/xen/next -b xen/next
# make menuconfig ( setup Xen Dom0 support)
# make -j(x)(number_of_kernels)
# make modules_install install

Reboot into Xen Environment :-
[root@fedora ~]# xm info
host : fedora
release : 2.6.32
version : #2 SMP Sun Feb 21 17:28:46 MSK 2010
machine : x86_64
nr_cpus : 4
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 2833
hw_caps : bfebfbff:20100800:00000000:00000940:0408e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8160
free_memory : 2049
node_to_cpu : node0:0-3
node_to_memory : node0:2049
node_to_dma32_mem : node0:127
max_node_id : 0
xen_major : 4
xen_minor : 0
xen_extra : .0-rc4
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : unavailable
xen_commandline :
cc_compiler : gcc version 4.4.2 20091222 (Red Hat 4.4.2-20) (GCC)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Sun Feb 21 00:27:00 MSK 2010
xend_config_format : 4

[root@fedora ~]# brctl show
bridge name bridge id STP enabled interfaces
eth0 8000.90e6ba2d11eb no peth0
virbr0 8000.000000000000 yes

Virt-install Karmic HVM DomU:-
# virt-install -n KarmicHVM -r 1024 –hvm –vnc -f /dev/sdb6 -c /root/isos/karmic.iso –debug



When done define domain via XML profile:-
[root@fedora ~]#cat KarmicPV.xml
<domaintype=’xen’id=’4′>
<name>KarmicPV</name>
<uuid>956f366a-95d0-6e67-7100-4a84671b2ae8</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>1</vcpu>
<bootloader>/usr/bin/pygrub</bootloader>
<bootloader_args>-q</bootloader_args>
<os>
<type>linux</type>
<cmdline>root=/dev/xvda1</cmdline>
</os>
<clock offset=’utc’/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type=’block’ device=’disk’>
<driver name=’phy’/>
<source dev=’/dev/sdb6′/>
<target dev=’xvda’ bus=’xen’/>
</disk>
<interface type=’bridge’>
<mac address=’00:16:3e:64:7e:d1′/>
<source bridge=’eth0′/>
<script path=’/etc/xen/scripts/vif-bridge’/>
<target dev=’vif4.0′/>
</interface>
<console type=’pty’ tty=’/dev/pts/2′>
<source path=’/dev/pts/2′/>
<target port=’0′/>
</console>
<input type=’mouse’ bus=’xen’/>
<graphics type=’vnc’ port=’5900′ autoport=’yes’/>
</devices>
</domain>
# virsh define KarmicPV.xml
# virsh start KarmicPV
# vncviewier localhost:0
Install Ubuntu Desktop via tasksel





About these ads

One Response to Set up Ubuntu Karmic Server (Grub2) PV Guest at Xen 4.0-rc4 Dom0 (2.6.32 pvops) on top of Fedora12

  1. Brian says:

    I feel far more persons will need to read this, very beneficial info.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: