CA-94406: VDI reset only on epoch begin

This resolves a bug where VDIs were reset after migration, because the act of
plugging a VBD will reset the VDI. A corresponding change in the storage
managers moves the reset_leaf call (which resets VDIs) to the SR command
"vdi_epoch_begin", which was recently added to Xapi's SMAPIv2.

This commit just adds the plumbing necessary to call epoch_begin and epoch_end
on VDIs in the storage layer. The corresponding commit in sm.hg adds those
commands to the storage layer, and also moves the reset_leaf call into
vdi_epoch_begin.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Remove erroneous extra call to VDI.epoch_end

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
SCTX-1228: VDB.unpluggable must be restored from the DB.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-97023: Preserve VM settings (Optimized for Citrix XenApp)
CA-94335: Dom0 must not change memory-dynamic-(min|max) anymore.

Since Dom0 is no more memory ballooned.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-94335: Dynamic-min and max have the same value as memory-target in Dom0.

Since Dom0 is no more ballooned.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Reduce verbosity of CLI command logging.

Signed-off-by: John Else <john.else@citrix.com>
CA-96872: Fix marshalling of exceptions

Api_errors are of type string * string list, but they are actually
marshalled as just a string list

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-97270: Now fix unmarshalling of exceptions...

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
XOP-261: Reinstate the server on 127.0.0.1 when no management
interface is defined

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-261/CA-96936: Remove Xapi_mgmt_iface.rebind

Since the management interface is listening in IPv6 automatically if
available.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XAPI-261/CA-96936: Make himn_only more general

To also manage the case of a localhost server.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-261/CA-96936: Prevent multiple starts of localhost server

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-261/CA-96936: Issue a warning in case of multiple starts of HIMN server

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-97435: Don't use Record_util code in Storage_access to convert VDI types to strings.

We should only use Record_util for pretty-printing human-readable
values, not for marshalling data for RPC purposes.

Signed-off-by: John Else <john.else@citrix.com>
CA-97354: Preserve VM.snapshot_info across export/import and cross-pool migration.

Signed-off-by: John Else <john.else@citrix.com>
CA-94829: Set the TCP timeout properties on the migration fd

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-74223 : Friendly error message when VDI Copy fails
Remove Whitespace
CA-74223: :Added VDI_COPY_FAILED error to api_errors.ml