CP-5970: Move xenops' cancellable watch paths

Having these paths created were interferring with devices since they were being
recreated once the device had beeen destroyed in the case of VBDs. Now we'll
keep track of the cancellable watch paths in a separate subtree of XenStore and
also tie them to their Xenops task IDs to aid debugging. Also, the semantics of
how to cancel the task have been added (removing the key).

Old path: /local/domain/0/backend/vbd/<domid>/<devid>/tools/xenops/cancel

New path: /xenops/task/<task-id>/remove-to-cancel

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Use singleton usbdevice_list instead of usbdevice

This is a workaround since the default value of [] for usbdevice_list is
interpreted as a specified option in libxl and libxl disallows specifying both
the usbdevice and usbdevice_list options.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Ignore build output

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Don't exit when encountering exception from Domain.create_new

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Only export VNC over Unix sockets for upstream qemu

This special cases the change made by 4ca23dbe52a26e377131b626049fc4104c998530.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #21 from simonjbeaumont/cp-6238

Fix HVM domain creation using libxl
CA-116819: xenlight: don't attach storage during VM_restore

When migration a VM, its VBDs need to be attached after VM_restore, during the
VM_restore_devices operation.  This is the case in classic xenopsd, and must
also be the case in the xenlight version, because the sender host in a
migration detaches itself from the storage only after sending the memory image
across.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Don't reopen already open module

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-116814: Correctly calculate shahow_memkb

There was a typo in the divisor and also the units were not converted from MB
to kB.

These values are used for machines without HAP.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #22 from robhoes/ca116819

CA-116819: xenlight: don't attach storage during VM_restore
Merge pull request #23 from simonjbeaumont/cp-6238

Fix computation of shadow_memkb for HVM domains without HAP
CA-117402: fix cd-eject for HVM guests

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #24 from robhoes/cd-eject

CA-117402: fix cd-eject for HVM guests
xenlight: use PHY backend when adding an empty CD-ROM and not using qdisk

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
xenlight: add block-xl script

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #25 from robhoes/master

CA-117409: xenopsd: fix CD-ROM handling
Add udev rules for libxl backend

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #26 from robhoes/master

Add udev rules for libxl backend
Add some debugging for the TypedTable module

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
xenlight: explicitly set run_hotplug_scripts when starting a VM

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>