xenlight: Create the /vm/<uuid>/domains/0 entry for domain 0

Otherwise the backend cannot figure out the relevant domain id given
a uuid, causing a failure to find a storage driver domain (ie domain 0)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add a separate vif script for xenlight backend for now.

We should be able to converge the 'classic' with the 'xenlight' one.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: use upstream qemu by default

There's no need to hardcode the path.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: when using upstream qemu, we must use SEABIOS

Previously we hard-coded ROMBIOS, which causes libxl to fail silently.
Instead we let libxl choose the default for us.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Tell upstream qemu to export consoles over Unix domain sockets

The filesystem namespace is easier to manage -- we can use the
domain uuid to guarantee path uniqueness. We can also rely on
filesystem-level access control to prevent non-root processes
from connecting.

Fixes #24

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update to 0.9.9

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Allow the xl-specific vif script to be configured in the global config file.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vif-xl: if we don't know the network mode, assume bridge.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: allow VMs to boot with empty CDROMs

Fixes #26

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: enable emulated NICs (as well as PV)

libxl wants us to say NIC_TYPE_VIF_IOEMU to request both a VIF and
an emulated interface, rather than only NIC_TYPE_VIF.

Simplify the hotplug scripts: now that we're using the VM's uuid
it's easier to find the xenopsd state on disk -- there's no need
for a separate 'Interface' link table.

Fixes #25

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Bump version to 0.9.12
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Share the Bootloader module across multiple backends

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: PV NICs should be NIC_TYPE_VIF; HVM NICs should be NIC_TYPE_VIF_IOEMU

It's an error to request a NIC_TYPE_VIF_IOEMU for PV domains.
We want HVM domains always to have an emulated NIC in case the VM has
no PV drivers.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: use eliloader to install PV guests

Since eliloader uses a different argument passing convention to
pygrub, we simply run it first and then tell libxl that we have
a kernel and ramdisk in our hand.

Fixes #21

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: fix deadlock in VM clean shutdown

Instead of calling down into libxl to perform a blocking wait (which
causes a deadlock with the background event thread) we block on
a condition variable in xenopsd itself, and have the existing background
shutdown event thread wake us up.

Fixes #27

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update to 0.9.13

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xenlight: suspend and resume now work.

Note the bugfix to the ShutdownWatchers: we need to check whether
the domain has already shutdown before we block (forever)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update to 0.9.14

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add a hacky workaround to choose between libxl disk types

We need to use PHY for things which really are block devices but
we can't tell. For now we assume 'xenstore_data=[]' implies block
device.

We need to use QDISK for things which are virtual network block
device things.

Proper fix depends on issue xcp-idl#8

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Attack a frontend to dom0 for pygrub to use

Unfortunately pvgrub seems to be grub1 only, making it hard to use.

Fixes #29

Signed-off-by: David Scott <dave.scott@eu.citrix.com>