Instant Windows—Recipe for Running Windows as a Guest on Solaris xVM
Requirements
Use this guide to quickly set up a Windows domU on Solaris xVM.Note that Windows HVM domains are susceptible to viruses and worms, so make sure you comply with your site's security policies, keep the firewall enabled, install virus software, and do all that is necessary to keep your network secure.
To run Windows as a guest on Solaris xVM, you will need:
-
An HVM-capable machine running Solaris xVM dom0.
A machine is HVM-capable if it is has an AMD Opteron Rev F or later, or an Intel CPU with VT extensions.
-
A Windows install disk .iso image.
-
qemu.
qemu is needed for the qemu-img utility used to create the file-based disk. qemu can be obtained from Blastwave.
Steps to Create the Domain
-
Create the domain's disk:
qemu-img create -f raw winxp-disk.raw 15G
-
Update the text in Configuration File, below, with the correct paths to
the .iso image and the disk image you just created, and put it in a
file called, for example, winxp.hvm.
-
Create the guest domain:
xm create winxp.hvm
-
Connect to the console:
vncviewer :0
Assuming you have $DISPLAY set up properly, the VNC viewer will appear with the contents of the virtual machine's console. Mouse tracking will improve once Windows is booted and installs its driver for qemu's emulated graphics tablet-style mouse.
NOTE: To use a CD instead of a .iso image, change the file:/ link to be a phy:/ link that points to the CD-ROM drive, for example, phy:/dev/dsk/c0t1d0s2,hda:cdrom,r.
Configuration File
disk = [ 'file:/export/winxp/winxp-disk.raw,hdc,w',
'file:/export/winxp/winxp.iso,hda:cdrom,r' ]
memory = 512
name = "winxp"
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
vif = [ 'type=ioemu' ]
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'preserve'
boot='d'
vnc=1
vnclisten="0.0.0.0"
vncpasswd=''
serial='null'
usb=1
usbdevice="tablet"
import os, re
arch = os.uname()[4]
if re.search('64', arch):
arch_libdir = 'lib64'
else:
arch_libdir = 'lib'
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
For More Information
For more information on Windows domains, see How to Set Up an HVM DomU. For additional information on VNC (Virtual Network Computing), visit this site.