Running a HVM/PVHVM guest

check that VMX/SVM is enabled,

xl dmesg | grep VMX

get SPICE or VNC up and running,

apt install tightvncserver

#slackpkg search vnc
#slackpkg install tigervnc #extra

no need to run the freaking daemon,

ps auxw | grep vnc

then prepare your guest machine,


mkdir -p /data/guests/$guest/
cd /data/guests/$guest/
#qemu-img-xen create -f qcow2 $guest.qcow2 4G
dd if=/dev/zero of=$guest.raw count=0 bs=1G seek=4
#dd if=/dev/zero of=$guest.raw count=0 bs=1G seek=50
ls -lkF /data/ISO-IMAGES/install63.iso
ls -lkF /data/ISO-IMAGES/netbsd.iso
cat > $guest <<-EOF
#XEN 4.10+
type = "hvm"
#XEN 4.9-
#builder = "hvm"

#on_reboot = "preserve"
#on_crash = "preserve"

sdl = 1

#vnc = 1
#vnclisten = ""
#vncpasswd = "PASSWORD"

#spice = 1
#spiceport = XXXX
#spicepasswd = "PASSWORD"


name = "$guest"
memory = 512
vcups = 4
disk = ['tap:tapdisk:aio:/data/guests/$guest/$guest.raw,xvda,w',
#       'file:/data/ISO-IMAGES/install63.iso,hdc:cdrom,r']
#       'tap:tapdisk:aio:/data/ISO-IMAGES/ms/win7sp1u.iso,xvdb:cdrom,r']
#disk = ['tap:qcow2:/data/guests/$guest/$guest.qcow2,xvda,w',
vif = [ 'bridge=xenbr0, vifname=$guest.0' ]
vi $guest

note. this is XEN 4.10+. If running 4.9-, revert back to builder = instead of type =

ready to go,

xl create $guest -c

and eventually remotely,

#vncviewer x.x.x.x:5900

when finished, you might want to switch back to serial console,


additional notes

other options,

arch = 'x86_64'
maxmem = 1024
maxcups = 2
boot = "cd"
hap = 1
acpi = 1
usb = 1
usbdevice = "tablet"
shadow_memory = 16



libxl__domain_make: domain creation fail: Invalid argument
initiate_domain_create: cannot make domain: -3

==> enable VT…

libxl: error: libxl_dm.c:2339:device_model_spawn_outcome: Domain 4:domain 4 device model: spawn failed (rc=-3)
libxl: error: libxl_create.c:1501:domcreate_devmodel_started: Domain 4:device model did not start: -3
libxl: error: libxl_dm.c:2453:kill_device_model: Device Model already exited
libxl: error: libxl_domain.c:1003:libxl__destroy_domid: Domain 4:Non-existant domain
libxl: error: libxl_domain.c:962:domain_destroy_callback: Domain 4:Unable to destroy guest
libxl: error: libxl_domain.c:889:domain_destroy_cb: Domain 4:Destruction of domain failed

==> watch /var/log/xen/qemu-dm-bsd2.log and see Could not open '/data/ISO-IMAGES/netbsd.iso': No such file or directory

Nethence | Doc | Pub | Lab | Pbraun | SNE Russia | xhtml