CA-137467: Move get_private_path into shared location

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-137467: Move cancel paths into private XenStore tree

Move all of the xenopsd paths out of the paths used by the XenBus protocol
(/local/domain/<backend-domid>/<device-kind>/<frontend-domid>/...) and into the
already-existing private subtree it maintains.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-138303: Don't ask fe to syslog for qemu/demu.

Not to be merged until demu gains a syslog facility.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
SCTX-1817: Check host memory before executing vdi-pool-migrate.

Ensure that the host has sufficient memory to accomodate 2x the VM
memory during a vdi-pool-migrate operation.

Signed-off-by: Akshay <akshay.ramani@citrix.com>
CA-124378: Default acpi_s{3,4} to 0 in platformdata

Backport of patch xenopsd.git#acd1002b736414

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
CA-138930:Xapi should not call domain_set_memmap_limit for HVM
domains.

Since Xen 4.2 the hypercall behind xc_domain_set_memmap_limit() is not
permitted for HVM domains. Xapi should only call this for PV domains.

Signed-off-by: Akshay <akshay.ramani@citrix.com>
Don't let naughty dhcp servers trick us into setting default routes.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
CA-137892
Commit 60bcfef60947abf5980ed46c415f0a4d6c264db4 from xcp-networkd
backported to the xs64bit-ring3 branch of xen-api.
Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Merge pull request #1807 from akshayramani/CA-137275

(XS64BIT) SCTX-1817: Check host memory before executing vdi-pool-migrate.
CA-86869: Don't list snapshots when listing custom templates.

print-custom-templates is used by xe-backup-metadata so that it can then
backup metadata of all custom templates. xapi explicitly blocks exporting
the metadata of snapshots, so there's no reason for
print-custom-templates to include snapshots.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1815 from euanh/CA86869

CA-86869: Don't list snapshots when listing custom templates.
CA-70188: Remove invalid pool patches from the database at xapi startup.

A pool_patch is valid if either:

- It has been applied to at least one host, or
- Its file exists on the master filesystem.

It neither of these is true, we can delete the pool_patch object.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1817 from johnelse/ca-70188-xs64bit

CA-70188: Remove invalid pool patches from the database at xapi startup.
CA-139894: Fix waiting for VM.remove

Due to a change in semantics of UPDATES.get, task_wait would
occasionally not wait.

This also adds back in error handling into the VM.remove path.

This is a backport of commit 3eb967b7a62ceaa7257b2a7a8b1ee0c0170ca418
from xenopsd.git

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Merge pull request #1819 from jonludlam/CA-139894

CA-139894: Fix waiting for VM.remove
Merge pull request #1810 from jonludlam/CA-124378-creedence

CA-124378: Default acpi_s{3,4} to 0 in platformdata
Merge pull request #1813 from thomassa/xs64bit-ca-137892-dhclient

(XS64BIT) Don't let naughty dhcp servers trick us into setting default routes.
Merge pull request #1806 from jonludlam/qemu-fe-syslog

CA-138303: Don't ask fe to syslog for qemu/demu.
Merge pull request #1812 from akshayramani/CA-138930

CA-138930: Xapi should not call domain_set_memmap_limit for HVM
Merge pull request #1822 from simonjbeaumont/xenops-paths-cr3

[xs64bit] Move Xenops related data into private XenStore subtree
CA-138749: Cause the qemu-dm-wrapper script to exit once it has forked qemu

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>