Click or drag to resize

IJsonpWsEndUserSetEnqueueVirtualDiskExport Method

This method execute export of virtual disk. By SetEnqueueVirtualDiskExport() method it’s possible add Export virtual disk operation (Job) in authenticated account’s FTP space. Path is of type: Export\<Nome_Server_Virtuale>\.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueVirtualDiskExport/{jsonp}/{userName}/{token}/{serverId}/{virtualDiskType}")]
Stream SetEnqueueVirtualDiskExport(
	string jsonp,
	string userName,
	string token,
	string serverId,
	string virtualDiskType
)

Parameters

jsonp
Type: SystemString
userName
Type: SystemString
token
Type: SystemString
serverId
Type: SystemString
virtualDiskType
Type: SystemString

Return Value

Type: Stream
WsResult contain call information. For more information consult WsResult
Remarks
Operation is allow only on powered off virtual machine. Then operations added it’s not possible add other operation on choice virtual machine until this operation is not in completed status.

In accord with hypervisor type export way change. For details see follow table:

HypervisorDisk Mode
Hyper-VThin
VMWareFixed

Hypervisor type change way to export in FTP. For details see follow table:

HypervisorDisk Mode
Hyper-V\Export\<Nome VM>\<HdX>_<data_operazione>.vhd
VMWare (file flat)\Export\<Nome VM>\<HdX>_<data_operazione>-flat.vmdk
VMWare (file header)\Export\<Nome VM>\<HdX>_<data_operazione>.vmdk
Examples
In this example ExportVirtualDisk() method execute export of primary virtual disk of server 859
private static void ExportVirtualDisk()
{
  try
  {
    ExportVirtualDisk diskToExport = new ExportVirtualDisk()
    {
      ServerId = 859,
      VirtualDiskType = VirtualDiskTypes.PrimaryVirtualDisk
    };

    WsResult result = client.SetEnqueueVirtualDiskExport(diskToExport);

    if (!result.Success)
    {
      throw new ApplicationException(String.Format(
        "An error has occurred while invoking SetEnqueueVirtualDiskExport(). {0}", result.ResultMessage));
    }
  }
  catch (Exception ex)
  {
    throw new ApplicationException(String.Format("An error has occurred while exporting a virtual disk {0}", ex.Message));
  }
}
See Also