Procedure is standard Debian’s network PV install. Download configuration file from following location. Debian and consequently Ubuntu still consider Libvirt and virtinst tools like virt-manager and command line utility virt-install as way to manage RH’s Xen domains like F15,F16,CentOS 6 either to be utilized with remote system mirrors
# wget http://ca.archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg
# cp xm-debian.cfg xm-debian1.cfg
I had to patch xm-debian1.cfg via xm-debian1.patch to make it working
--- xm-debian1.cfg.orig 2011-10-27 17:17:17.333111002 +0400
+++ xm-debian1.cfg 2011-10-27 16:33:24.985110998 +0400
@@ -38,10 +38,10 @@
# Standard variables
# Initial memory allocation (in megabytes) for the new domain.
-memory = 128
+memory = 2048
# A name for your domain. All domains must have different names.
-name = "ExampleDomain"
+name = "OneiricPVD"
# 128-bit UUID for the domain. The default behavior is to generate a new UUID
# on each call to 'xm create'.
@@ -53,7 +53,7 @@
#cpus = "0-3,5,^1" # run on cpus 0,2,3,5
# Number of Virtual CPUS to use, default is 1
-#vcpus = 1
+vcpus = 2
#----------------------------------------------------------------------------
# Define network interfaces.
@@ -69,9 +69,9 @@
#
# or more than one interface may be configured:
#
-# vif = ['', 'bridge=xenbr1']
+vif = ['', 'bridge=br0']
-vif = ['']
+# vif = ['']
#----------------------------------------------------------------------------
# Define the disk devices you want the domain to have access to, and
@@ -82,7 +82,7 @@
#
# NB: Only xvd devices are supported by the kernel in Debian Lenny and later.
-disk = ['file:/path/to/disk.img,xvda,w']
+disk = ['phy:/dev/sda7,xvda,w']
#----------------------------------------------------------------------------
# Define frame buffer device.
@@ -175,7 +175,7 @@
xm_vars.check()
if not xm_vars.env.get('install'):
- bootloader="pygrub"
+ bootloader="/usr/lib64/xen/bin/pygrub"
elif xm_vars.env['install-method'] == "network":
import os.path
print "Install Mirror: %s" % xm_vars.env['install-mirror']
@@ -192,12 +192,16 @@
print
if xm_vars.env.get('install-kernel'):
- kernelurl = xm_vars.env['install-kernel']
+# kernelurl = xm_vars.env['install-kernel']
+ kernelurl = installer + "/netboot/xen/vmlinuz"
+ print "Kernel to load: %s" % kernelurl
else:
kernelurl = installer + "/netboot/xen/vmlinuz"
-
+
if xm_vars.env.get('install-ramdisk'):
- ramdiskurl = xm_vars.env['install-ramdisk']
+# ramdiskurl = xm_vars.env['install-ramdisk']
+ ramdiskurl = installer + "/netboot/xen/initrd.gz"
+ print "Ramdisk to load: %s" % ramdiskurl
else:
ramdiskurl = installer + "/netboot/xen/initrd.gz"
@@ -244,7 +248,7 @@
disk.insert(0, 'file:%s,%s:cdrom,r' % (xm_vars.env['install-media'],
xm_vars.env['install-cdrom-device']))
- bootloader="pygrub"
+ bootloader="/usr/lib64/xen/bin/pygrub"
bootargs="--kernel=%s --ramdisk=%s" % (kernelpath, ramdiskpath)
print "From CD"
else:
# xm create -f xm-debian1.cfg -c install=true \
install-kernel="vmlinuz" install-ramdisk="initrd.gz" \
install-mirror="http://ca.archive.ubuntu.com/ubuntu" \
install-arch=amd64 install-method=network
Network installation starts :-




Create file for XML PV Guest definition
# cat OneiricPVD.xml
<domain type='xen' id='7'>
<name>OneiricPVD</name>
<description></description>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader>/usr/lib64/xen/bin/pygrub</bootloader>
<bootloader_args>-q</bootloader_args>
<os>
<type>linux</type>
<kernel></kernel>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/sda7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:63:7d:40'/>
<source bridge='br0'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif7.0'/>
</interface>
<console type='pty' tty='/dev/pts/3'>
<source path='/dev/pts/3'/>
<target type='xen' port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes'/>
</devices>
</domain>
# virsh define OneiricPVD.xml


Posted by dbaxps 



















