( takemeaw | 2009. 06. 04., cs – 10:43 )

Create a Blank Disk Image to install
#cd /var/lib/xen/images
#dd if=/dev/zero of=windisk.img bs=1k seek=4096k count=1
#dd if=/dev/zero of=windisk.img bs=1k count=1 conv=notrunc
(The third command line seems not absolutely required)

Edit Configuration File
Edit /etc/xen/examples/xmexample.hvm to make two types of configuration file. One for booting from CD at the first seup, and booting from HDD afterwards.

myxm.hvm(for CD boot)
Modify following lines and leave the rest as default.

# Initial memory allocation (in megabytes) for the new domain.
memory = 384
disk = [ 'file:/var/lib/xen/images/windisk.img,ioemu:hda,w' ]
on_poweroff = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
# Disk image or device which appears as a CD drive to the guest
# !! this parameter is no longer supported in versions > 3.0.2 of Xen
cdrom='/dev/sr0' #set proper device name for your own environment!
Later versions of Xen do not support the cdrom parameter any more but integrate it into the disk = statement.

You can either specify an ISO image like this

# This is for Xen 3.0.3 or later
disk = [ 'file:/var/lib/xen/images/windisk.img,ioemu:hda,w', 'file:/tmp/install-image.iso,hdc:cdrom,r' ]
(hdc means master drive on secondary IDE channel)

or map the physical CD drive of your system to the guest

# This is for Xen 3.0.3 or later
disk = [ 'file:/var/lib/xen/images/windisk.img,ioemu:hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ]
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# the drive letters are allocated dynamically by Windows
boot='d'
# enable SDL library for graphics, default = 0
sdl=1
# enable VNC library for graphics, default = 1
vnc=0
# enable spawning vncviewer(only valid when vnc=1), default = 1
vncviewer=0
myxmhdd.hvm(for HDD boot)
Save myxm.hvm as myxmhdd.hvm and edit only boot description.

# boot on floppy (a), hard disk (c) or CD-ROM (d)
boot='c'
Full description of an example of hvm file is shown in the discussion page.

Locate myxm.hvm and myxmhdd.hvm in /etc/xen/vm.

--
.