Click or drag to resize

IWsEndUserSetEnqueueVirtualDiskExport 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]
WsResult SetEnqueueVirtualDiskExport(
	ExportVirtualDisk disk
)

Parameters

disk
Type: Aruba.Cloud.Provisioning.EntitiesExportVirtualDisk
ExportVirtualDisk Value Type. This parameter is disk to export. This parameter contains Server ID and Disk Type. For more information consults ExportVirtualDisk class

Return Value

Type: WsResult
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