Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Apptool is an OVF (open virtualization format) import tool. More info at http://wiki.cam.xci-test.com/index.php/Ovf  <<< TODO that is a bad link - maybe make the page public?

XenVM cont.

There is some more documentation buried in the toolstack repository. I added it - for convenience purposes - here.

Xenvm is a single VM monitor. it's a single process that follow the life of a VM, and open a command socket where you can send command, just like xm to xend.

xenvm expose the uuid of the domain to outside world, so instead of having to refer to the domid of the domain, all outside command use the uuid. the uuid beeing stable, all command will use the same uuid after reboot/suspend/resume cycle.

Config file

you can put the following parameters in your config file:

(common options)

key nametypedescription
hvmscommand line given to the kernel
startupsspecify what to do with the domain at startup possibles value: started, paused, shutdown or restore
debugblogs all operations to /tmp/xenvm-debug-%uuid
uuidsspecify the domain uuid (default to autogeneration)
on_crashsspecify the action to be taken after notifying a
on_haltscrash/halt/reboot. possible values:
on_rebootspreserve, reboot, destroy
kernelsspecify where to find the kernel to boot (can be empty for hvm. default to hvmloader)
memoryispecify the memory given to the guest in megabytes
vcpusinumber of vcpus available to the guest
disksadd a virtual disk.
  format: physpath:phystype:virtpath:mode:devty[:k=v...]
  - physpath: path to the disk image, raw device, ..
  - phystype: phy
  - virtpath: hd(a-d)
  - mode: r
  - devtype = cdrom
  - extra k=v arguments (cipher, key-size, key-file)
nicsadd a virtual nic.
  format: key=value,key=value,... (can be empty)
  supported key: bridge, mac, id
  examples:
  "nic = bridge=xen-br0,mac=ab:ef:fe:dc:ba:ab"
  "nic = mac=ab:ef:fe:dc:ba:ab"
  "nic = "
pcisadd a pci device.
  format: devid,bind,domainImage Addeddevice.function
serialsredirect serial to device or network tcp:ip:port
  ex: "pty" or "tcp:1.2.3.4:1234"
displaysdetails the type of display available for the guest
  format: :key[=value],key[=value],...
  possible values:
  - none
  - vnc (keys allowed: use-port-unused, keymap, port)
  - sdl
  - intel

(the following are just useful for pv)

key nametypedescription
cmdlinescommand line given to the kernel
initrdsspecify the initrd use, leave empty for none

(the following are just useful for hvm)

key nametypedescription
paebspecify that the guest is using PAE
acpibspecify that the guest is using ACPI
apicbspecify that the guest is using APIC
nxbspecify that the guest is using NX
smbios-ptbspecify that the guest is using smbios pass-through
smbios-oem-type-ptitables number to passthrough
acpi-ptbspecify that the guest is using ACPI pass-through
diskinfo-ptbspecify the guest is using SCSI diskinfo pass-through
bootsspecify the qemu boot string
extra-hvmk=vspecify extra arguments passthrough to qemu as -k v
power-managementispecify the power management passthrough mode
  - 1 : pass-through mode (limited scope)
  - 2 : non pass-through mode (in doubt use this)
oem-featuresispecify whether or not to pass through oem features.
  Note: At the moment any integer value can be passed
  but this is likely to change in future especially if
  we decide to pass through a subset of oem features
  and let user configure that subset.
timer-modeispecify the timer mode used.
timeoffsetsspecify the time offset (i.e. timezone) used.
pci-msitranslateispecify whether to use MSI-INTx translation for guest.
pci-power-managementispecify whether or not to enable Dx power management
  for passthrough devices.
inject-sciispecify whether or not to inject SCIs like lid close,
  power button press to guest. (Default: no injection)

Sending command to the monitor

xenvm bind a unix socket to the uuid specified/generated You can easily send command to the monitor with xenvm-cmd using the simple syntax:

xenvm-cmd

The following command are supported:

  • help
  • pause
  • unpause
  • destroy
  • start
  • suspend file=
  • suspend file= live=true
  • restore file=
  • checkpoint
  • shutdown
  • restart
  • quit (quit the monitor leaving the vm untouched)

Running with xen-unstable

It's possible to run with xen-unstable directly, but you need the qemu-dm-wrapper script and xenguest binary in /usr/bin/. They are available in xenguest/xenguest and scripts/qemu-dm-wrapper in the toolstack.git repository.

And you need to replace your udev rules by the one available in scripts/xen-backend.rules and scripts/xen-frontend.rules and add the scripts/tap scripts/block scripts/block-front scripts/vif into /etc/xensource/scripts/

Also note that since xen-unstable doesn't have the dm-ready patch, hvm domain takes unfortunately a substantial time (around 20s.) to start.

Example of config

PV config with one LVM disk called 'test' and one VIF :

Code Block
languagetext
uuid = 00000000-0000-0000-0000-000000000001 hvm = false kernel = /boot/vmlinuz-2.6.18-xenU cmdline = root=/dev/sda1 ro memory = 64 disk = /dev/vg/test:phy:sda:w:disk vif =

HVM config for installing a windows 2k3 from iso on a LVM disk called 'testhvm':

Code Block
languagetext
uuid = 00000000-0000-0000-0000-000000000002 hvm = true memory = 256 disk = /dev/vg/testhvm:phy:hda:w:disk disk = /var/opt/xen/iso_import/w2k3eesp2.iso:file:hdd:r:cdrom boot = dc pae = trueacpi = true apic = true