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

then prepare your guest machine,

ksh
guest=GUESTNAME
cd /data/guests/
mkdir $guest
cd $guest
#qemu-img-xen create -f qcow2 $guest.qcow2 4G
dd if=/dev/zero of=$guest.raw count=0 bs=1G seek=4
ls -l /data/ISO-IMAGES/install63.iso
cat > $guest <<-EOF
type = "hvm"
#sdl = 1
vnc = 1
vnclisten = "0.0.0.0"
vncpasswd = "PASSWORD"
#spice = 1
#spiceport = XXXX
#spicepasswd = "PASSWORD"
#vnc=0
#nographics=1
#serial='pty'

name = "$guest"
memory = 256
vcups = 2
disk = ['tap:tapdisk:aio:/data/guests/$guest/$guest.raw,xvda,w',
        'file:/data/ISO-IMAGES/install63.iso,hdc:cdrom,r']
#disk = ['tap:qcow2:/data/guests/$guest/$guest.qcow2,xvda,w',
vif = [ 'vifname=$guest.0' ]
EOF
vi $guest

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

#xen4.9
builder = "hvm"

ready to go,

xl create $guest -c

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

nographics=1
serial='pty'

additional notes

other options,

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

references

troubleshooting

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

==> enable VT…


Last update: 2018-09-23 | home | html | css