xapi-project/xen-api — pull request #1885 by thomassa (2014-08-15 19:31:37+00:00)
Title: CP-9366: Use HVM feature-flags instead of checking PV drivers.

Three commits.
#### First: Use HVM feature-flags instead of checking PV drivers.
* 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.

#### Second: Watch the "control" xenstore node, and 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.

#### Third: Allow vCPU hotplug for HVM (if feature-vcpu-hotplug is set).
Removed code that raises an Unimplemented exception unconditionally
for hvm guests when attempting vCPU hotplug.
This allows the existing code that decides based on the feature-flag
to work properly.