CA-66403: Host evacuate checks HVM guests for PV drivers

An incorrect patch (sha 42914ac) caused host_evacuate to check the PV drivers
for PV guests, but not for HVM guests. This causes a rolling pool upgrade to
fail when it tries to migrate HVM guests which don't have PV drivers installed.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Merge pull request #355 from mcclurmc/boston-lcm

CA-67728: merge request for resolving CA-66403, for HFX-225
CA-66947: PIF_metrics.carrier should not depend on PIF.currently_attached

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

HFX-229
ER-41: Add Windows Server 2003 PAE template.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #453 from johnelse/boston-lcm

ER-41: Add Windows Server 2003 PAE template.
ER-40: Add a w2k3 PAE template with cores-per-socket=4

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #465 from johnelse/boston-lcm-er-40

ER-40: Add a w2k3 PAE template with cores-per-socket=4
CA-73099: revert CA-14804: we nolonger delete the xenstore error node on device unplug failure

We now let multiple VBD.unplugs fail. When the guest finally lets the
disk go, it will be handled asynchronously.

Copied from xen-api/master
commit:77fca7c4e74a4a0634163097ff0542d5fd7a27f7

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #491 from johnelse/hfx-252

CA-73099: revert CA-14804: we nolonger delete the xenstore error node on device unplug failure
CA-73047: Validate vncterm commandline args when checking whether it's running.

In addition to calling kill -0 on the vncterm pid, we now also look up
its command line args in procfs and check that they contain both the
vncterm path and the xenstore console path for the relevant domid.

Signed-off-by: John Else <john.else@citrix.com>
CA-73047: fix a file descriptor leak in is_cmdline_valid

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-77439: When moving a VLAN on Bond.create, explicitly remove the old instance

This is needed on the Linux bridge backend to ensure the old VLAN interfaces
(ethx.y) are cleaned up. It is not an issue on the OVS, since there are no
VLAN interfaces.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-75708: Remove the 16MB limit on DB RPC responses.

Check the content length of responses to requests made by the database
RPC client; if the content length is greater than the maximum string
length then read the response into a Bigbuffer instead.

Signed-off-by: John Else <john.else@citrix.com>
CA-75710: check for more recent PV tools isos on-demand, rather than relying on the startup sequence

Unfortunately the startup-sequence was populating the cached version *after* all the running VMs were checked to see if they had up-to-date drivers.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-81599: Allow TSC emulation mode to be set from xapi

Adding the platform flag tsc_mode={0|1|2|3} will set the required TSC emulation mode before building the VM's domain.

For more information on TSC emulation modes, see http://xenbits.xen.org/hg/xen-unstable.hg/file/d7318231cfe3/docs/misc/tscmode.txt

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-81599: Filter out invalid TSC modes from platform dictionary.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-81599: Set tsc_mode before creating domain.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Merge pull request #883 from jeromemaloberti/HFX-377
CA-89978: Fix restoration of database from temporary restore file.

- Delete the temporary restore file after using it to populate the
  database - if we don't do this then xapi will use the restore file
  again the next time it starts up.

- Perform the initial database flush to the global list of database
  connections in all cases; don't flush to the restore database file
  if it's being used.

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