Click or drag to resize

IWsEndUserSetEnqueueUnmountDvdIso Method

By the method one can unmount an ISO image from a virtual machine.

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 SetEnqueueUnmountDvdIso(
	int serverId
)

Parameters

serverId
Type: SystemInt32
Value of type System.Int32 representing the unique identifier of the virtual server to restore.

Return Value

Type: WsResult
The method returns a WsResult object containing information about the result of the method call.
Examples
The following example describes a user-defined method, named UnmountDvdIso(), which performs an unmount of an ISO from a virtual server. By calling the WsEndUser's method SetEnqueueUnmountDvdIso(), the ISO image previously mounted on the server with id 859 will umount.
private static void UnmountDvdIso(WsEndUserClient client)
{
  try
  {
    WsResultOfServerDetails serverDetails = client.GetServerDetails(859);

    if (serverDetails != null && serverDetails.Value.VirtualDVDs.Count() > 0)
    {
      WsResult result = client.SetEnqueueUnmountDvdIso(859);

      if (!result.Success)
      {
        throw new ApplicationException(String.Format(
          "An error has occurred while invoking SetEnqueueUnmountDvdIso(). {0}", result.ResultMessage));
      }
    }
  }
  catch (Exception ex)
  {
    throw new ApplicationException(
      String.Format("An error has occurred while unmounting an ISO image {0}", ex.Message));
  }
}
See Also