This change allows systems like Pacemaker to manually manage VM shutdown upon dom0 shutdown.
It adds a new 'auto_poweroff' flag to block automatic VM shutdown within the shutdown.py script.

e.g. to set this on a VM:
xe vm-param-set other-config:auto_poweroff=false uuid=$UUID

This flag is complementary to the existing 'auto_poweron' flag.
CA-87552: add "Network.other_config:assume_network_is_shared=true" to override internal network checks

Normally we block VM.start, migrate etc if a VIF is on an "internal"
network which is already in use on another host. In the longer term we
should just tunnel, but in the short term we allow clients to specify
whether they want to allow the operations instead, per Network.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
networkd: set the broadcast address when configuring an IPv4 address

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Allow CLI lookup of PBDs by SR.name_label and host.name_label

The equivalent is already implemented for the other connector types
(VIFs, VBDs and PIFs).

Signed-off-by: John Else <john.else@citrix.com>
CA-88388: Clean up VIF mapping keys after an interpool metadata transfer.

Signed-off-by: John Else <john.else@citrix.com>
Remove unnecessary checks before removing VDI mapping keys.

It's safe to call remove_from_other_config even if the key isn't
present.

Signed-off-by: John Else <john.else@citrix.com>
Add VDI and VIF metadata mapping keys as part of inter_pool_metadata_transfer.

This makes more sense as this function cleans them up after the transfer
and is the only point they're needed.

This also means that the VIF map is usable by assert_can_migrate.

Signed-off-by: John Else <john.else@citrix.com>
CA-88388: Clean up the cross-pool migration VIF mapping keys before importing a VIF.

Signed-off-by: John Else <john.else@citrix.com>
Add some comments to the VIF import code.

Signed-off-by: John Else <john.else@citrix.com>
Fix tab completion for VDI/VIF maps.

Signed-off-by: John Else <john.else@citrix.com>
Re-add xapi API methods related to cooperativeness.

This is done in order to prevent breaking compatibility. The implementations
are dummy, and are marked as such. The API methods are marked as deprecated.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
CA-88361: Clear the appliance field when importing a VM.

Signed-off-by: John Else <john.else@citrix.com>
CA-85776: Improve parsing of bootloader errors.

eliloader should now always throw a RuntimeError in line with pygrub,
so we now look for that in the stacktrace and raise the rest of the
stacktrace as an error message.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #827 from johnelse/ca-88361
Merge pull request #826 from rokstrnisa/re-add-cooperativeness
Merge pull request #802 from johnelse/pbd-select-by-name-label
Merge pull request #800 from robhoes/broadcast
Merge pull request #821 from johnelse/ca-88388
CP-3625: Implemented metrics pif_aggr_tx and pif_aggr_rx for aggregated rx/tx traffic across all PIFs

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>
CP-3622: Implemented a new metric for average pCPU utilisation

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>