Build XENBUS_PATH from domain and device ids if its empty.
CA-86756: attempt to return Unix signal names rather than ocaml signal numbers

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-86756: avoid spinning if the fork/exec daemon isn't available

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Fix xe-edit-bootloader script to match new sm backend scheme.

Old XCP use /dev/xvd* devices when done vbd-plug to dom0.
xe-edit-bootloader adds parition number to it:

-p0 -> /dev/xvda0, -p1 -> /dev/xvda1, etc.

New SM backend scheme use kpartx to get partitions from devices like this:

/dev/sm/backend/b9b15e78-c79b-f9b7-4238-d36be14b8075/a5711219-c54f-4d14-ad1e-a0ac36d16232p1
/dev/sm/backend/b9b15e78-c79b-f9b7-4238-d36be14b8075/a5711219-c54f-4d14-ad1e-a0ac36d16232p2

This fix replace old dev+part_num scheme with new: dev+'p'+part_num scheme.

Note: Partition numbers are shifting (was: 0,1,2,3,4,5...; become: 1,2,3,4,5,6...)
Remove redundant checks from VM.set_is_a_template.

These checks are not needed as these cases are already handled by the
allowed_operations code.

Signed-off-by: John Else <john.else@citrix.com>
Proper CLI printing for error vm_assigned_to_protection_policy.

Signed-off-by: John Else <john.else@citrix.com>
CA-85231: Allow cross-pool migration only if VM has less than one snapshot and no checkpoints.

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>
Improved updating of PIF metrics.

This fixes a bug where PIF metrics for the management interface would not be
updated for the management interface right after the first boot.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Committed-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-80695: Remove setting of MTU in vif frontend area as Boston windows PV
          drivers interpret it as maximum frame size.
CA-86139: memory-actual still zero 2 mins after host became enabled

When master restarts, VM metrics for VMs on the slaves need to be updated.

This was one of the functionalities that the RRD code that was party of xapi
was previously performing in a fairly convoluted way. During the RRD code
refactoring, this functionality was lost. It is now implemented with a simple
cache-clear operation on the slave.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Committed-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Fix logging.

Signed-off-by: John Else <john.else@citrix.com>
CA-81449: Take VCPUs_at_startup into account when starting a guest.

Previously we were creating all the CPU devices as online.

n.b. adding the "online" option to Device.Vcpu.add means it's
functionally identical to Device.Vcpu.set

Signed-off-by: John Else <john.else@citrix.com>
Added monitor_dbcalls.mli to promote encapsulation.

Included OCaml docs.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Added monitor_master.mli and its documentation.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
[WHITESPACE] monitor_master.ml

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Removed legacy code from Monitor_dbcalls.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Merge commit 'ce39cace9eec611db0087ab790bf8a10fc31d09c'
Merge commit 'a1387d25bc3c26a3b0836ba87cb7dea0a267fa09'
Merge commit '07701ffd1b6a139b4a932910cbe8bcd015b9fbad'
Merge commit '073e05e3a485bd2b11d56db229d414a9ff35d11f'