[Re-sent from my list subscribed email address, sorry]

I've got a Fedora 17 dom0, running under Xen 4.2 (thanks to the Pasi's
archive of Michael's test SRPM at

Since there's no libvirt support in that build, I had to uninstall the
existing virt-* tools too, therefore no helpers to create a new domU.
However, a link on LWN reminded me of http://boot.fedoraproject.org/
and I wondered if I could use that to get a new domU installed.

I downloaded the boot CD image (only 1MB)

# wget http://dl.fedoraproject.org/pub/alt/bfo/bfo.iso

Created a new logical volume to hold the domU disk on my vg0 volume group

# lvcreate --size=8G --name=mytest vg0

Zeroed the boot sector (especially as I had to have a few attempts to
get it right)

# dd if=/dev/zero of=/dev/mapper/vg0-mytest count=1

Created a config file for the domU

memory = 1024
name = 'mytest'
vif = [ bridge=virbr0' ]
disk = [ 'phy:/dev/mapper/vg0-mytest,
xvda,w', 'file:/root/bfo.iso,hdc:cdrom,r' ]
boot = 'd'
builder = 'hvm'
vcpus = 1
on_reboot = 'restart'
on_crash = 'restart'
vnc = 1
vnclisten = ''
vncdisplay = 0
stdvga= 1
usb = 1
usbdevice = 'tablet'

Since I'm SSH'ed into the dom0 and want to use VNC from a laptop, I
needed the vnc session to listen on the dom0's IP address not just
localhost, alternatively I could have tunnelled inside the SSH
session, so adjust IP address to suit.

Start the domU

# xl create mytest.cfg

Started VNC viewer to watch bfo booting up, getting IP address via
DHCP, fetching kernel/initramfs/squashfs from the internet, after a
few minutes Anaconda boots into graphical mode and you can perform the

After installation completed, I edited the .cfg file to change the
domU from a HVM to a PV, give it a persistent MAC address, steal some
memory from it and remove the CD drive

memory = 512
name = 'mytest'
vif = [ 'mac=00:16:3e:74:56:59, bridge=virbr0' ]
disk = [ 'phy:/dev/mapper/vg0-mytest,xvda,w' ]
bootloader = 'pygrub'
vcpus = 1
on_reboot = 'restart'
on_crash = 'restart'

re-start the domU with that configuration

# xl create mytest.cfg -c

and the job is done, very neat thanks to all the useful stuff out there.
xen mailing list

Reply via email to