Use SMAPIv2 VDI.stat for XenAPI VDI.update rather than SMAPIv1 vdi_update

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Update in_product_since for assigned_ips

assigned_ips has been backported to creedence.

Signed-off-by: John Else <john.else@citrix.com>
Remove Re_str

Signed-off-by: John Else <john.else@citrix.com>
Remove xiu branch of vncterm-wrapper

xiu has been gone a long time.

Signed-off-by: John Else <john.else@citrix.com>
Fix vncterm path for buildroot

Signed-off-by: John Else <john.else@citrix.com>
Fix vncterm path for 64-bit XenServer

Signed-off-by: John Else <john.else@citrix.com>
Annotate the startup tasks with the current operation

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Make more dbsync things switched

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

There seems to be a race in OUnit. Serialising the tests adds less than
a second to the run time, which I think we can live with for now.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1872 from johnelse/serialise-tests

Serialise unit tests
CP-8888: Add diagnostic stats reporting

Signed-off-by: John Else <john.else@citrix.com>
CP-8888: Stop stats reporter before exiting

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1868 from johnelse/fix-vncterm-wrapper

CA-141578: Fix paths in vncterm-wrapper
Merge pull request #1840 from johnelse/vhd-tool-update-fallout

vhd-tool update fallout
CA-108189: Prevent timeouts when collecting bugtools

Prevent timeouts when collecting bugtools by increasing the timeout for
the xenopsd bugtool plugin from 60 seconds to 600 seconds.  Since it
took about 200 seconds for 460 VMs, 600 seconds should be enough for
very large hosts.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
CA-141474: Don't retry migrate if VM didn't acknowledge shutdown

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Merge pull request #1879 from euanh/CA141474-trunk

CA-141474: Don't retry migrate if VM didn't acknowledge shutdown
CA-143838: let network configure all physical and bond interfaces on startup

If a VLAN is used for storage and is configured to use jumbo frames (MTU =
9000), then XS does not immediately enable jumbo frames on the interface at
boot time. Specifically, if HA is enabled, the HA daemon is unable to access
the storage device, and blocks the host's startup process for a long time.

Networkd can be told to bring up interfaces and bridges at boot time, which is
before xapi is started, and before anything else may need the network. This is
done by marking the interface/bridge as "persistent". Currently, all
interfaces/bridges with an IP address in dom0 are made persistent. This
includes VLAN bridges, but not the interface that the VLAN is based on, which
is what caused the bug.

To simplify, this patch makes all physical and bond interfaces/bridge
persistent, besides all other interface/bridges that have an IP address.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CP-9366: Use HVM feature-flags instead of checking PV drivers.

Changes:
* xapi_vm_lifecycle check_operation_error uses the flags to check
  whether we can perform a given operation.
* In xapi_host.ml the pre-evacuation check no longer checks for PV
  drivers to learn whether a VM can be migrated.  It was already
  calling Xapi_vm_lifecycle.check_operation_error.
* Appropriate errors are defined: one for each of three features.
* Datamodel refers to a new error instead of vm_missing_pv_drivers.

Related work not done:
* Datamodel has some operations that should mention the new errors.
  They should have mentioned vm_missing_pv_drivers in the past, so
  even now we are no worse off than before.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>

Conflicts:
	ocaml/xapi/xapi_vm_lifecycle.ml
CP-9366: Update VM-metrics "other"

Now when qemu writes a feature-flag into the control node, xapi will
notice and so will trigger the existing code that can copy those entries
into the "other" vm guest metrics parameter.

To make that work, when checking whether the guest metrics should really
be updated, now we go ahead even if only the "other" map has changed.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>

Conflicts:
	ocaml/xenops/xenops_server_xen.ml