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>
Merge pull request #966 from jeromemaloberti/CA-94335

CA-94335: Dynamic-(min|max) in Dom0 have the same value as memory-target
Merge pull request #965 from siddharthv/CA-97023

CA-97023: Preserve VM settings (Optimized for Citrix XenApp)
Merge pull request #961 from jeromemaloberti/SCTX-1228

SCTX-1228: VDB.unpluggable must be restored from the DB.
Reduce verbosity of CLI command logging.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #967 from johnelse/cli-logging-change

Reduce verbosity of CLI command logging.
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>
Merge pull request #968 from jonludlam/CA-96872

CA-96872: Fix marshalling of exceptions
CA-97270: Now fix unmarshalling of exceptions...

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #970 from jonludlam/CA-97270

CA-97270: Now fix unmarshalling of exceptions...
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>
Merge pull request #927 from mcclurmc/ca94406-vdi-reset-only-on-epoch-trunk

CA-94406: VDI reset only on epoch begin
XOP-261/CA-96936: Prevent multiple starts of localhost server

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>