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 auxww | grep vnc

then prepare your guest machine,


mkdir -p /data/guests/$guest/
cd /data/guests/$guest/
dd if=/dev/zero of=$guest.raw bs=1G count=0 seek=50
cat > $guest <<-EOF
#XEN 4.10+
type = "hvm"
#XEN 4.9-
#builder = "hvm"

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',
vif = [ 'bridge=xenbr0, vifname=$guest.0' ]
on_crash = "preserve"
#on_reboot = "preserve"
#on_poweroff = "preserve"
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


Spice Graphics Support

Xen Feature Detection

Xen Linux PV on HVM drivers