VirtualMachineOperationsExtensions.BeginCapturingOSImageAsync Method
The Begin Capturing Role operation creates a copy of the operating system virtual hard disk (VHD) that is deployed in the virtual machine, saves the VHD copy in the same storage location as the operating system VHD, and registers the copy as an image in your image gallery. From the captured image, you can create additional customized virtual machines. For more information about images and disks, see Manage Disks and Images at https://msdn.microsoft.com/library/windowsazure/jj672979.aspx. For more information about capturing images, see How to Capture an Image of a Virtual Machine Running Windows Server 2008 R2 at https://www.windowsazure.com/documentation/articles/virtual-machines-capture-image-windows-server/ or How to Capture an Image of a Virtual Machine Running Linux at https://www.windowsazure.com/documentation/articles/virtual-machines-linux-capture-image/. (see https://msdn.microsoft.com/library/windowsazure/jj157201.aspx for more information)
Namespace: Microsoft.WindowsAzure.Management.Compute
Assembly: Microsoft.WindowsAzure.Management.Compute (in Microsoft.WindowsAzure.Management.Compute.dll)
Usage
'Usage
Dim operations As IVirtualMachineOperations
Dim serviceName As String
Dim deploymentName As String
Dim virtualMachineName As String
Dim parameters As VirtualMachineCaptureOSImageParameters
Dim returnValue As Task(Of AzureOperationResponse)
returnValue = VirtualMachineOperationsExtensions.BeginCapturingOSImageAsync(operations, serviceName, deploymentName, virtualMachineName, parameters)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function BeginCapturingOSImageAsync ( _
operations As IVirtualMachineOperations, _
serviceName As String, _
deploymentName As String, _
virtualMachineName As String, _
parameters As VirtualMachineCaptureOSImageParameters _
) As Task(Of AzureOperationResponse)
[ExtensionAttribute]
public static Task<AzureOperationResponse> BeginCapturingOSImageAsync (
IVirtualMachineOperations operations,
string serviceName,
string deploymentName,
string virtualMachineName,
VirtualMachineCaptureOSImageParameters parameters
)
[ExtensionAttribute]
public:
static Task<AzureOperationResponse^>^ BeginCapturingOSImageAsync (
IVirtualMachineOperations^ operations,
String^ serviceName,
String^ deploymentName,
String^ virtualMachineName,
VirtualMachineCaptureOSImageParameters^ parameters
)
/** @attribute ExtensionAttribute() */
public static Task<AzureOperationResponse> BeginCapturingOSImageAsync (
IVirtualMachineOperations operations,
String serviceName,
String deploymentName,
String virtualMachineName,
VirtualMachineCaptureOSImageParameters parameters
)
ExtensionAttribute
public static function BeginCapturingOSImageAsync (
operations : IVirtualMachineOperations,
serviceName : String,
deploymentName : String,
virtualMachineName : String,
parameters : VirtualMachineCaptureOSImageParameters
) : Task<AzureOperationResponse>
Parameters
- operations
Reference to the Microsoft.WindowsAzure.Management.Compute.IVirtualMachineOperations.
- serviceName
Required. The name of your service.
- deploymentName
Required. The name of your deployment.
- virtualMachineName
Required. The name of the virtual machine to restart.
- parameters
Required. Parameters supplied to the Begin Capturing Virtual Machine operation.
Return Value
A standard service response including an HTTP status code and request ID.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012
Target Platforms
See Also
Reference
VirtualMachineOperationsExtensions Class
VirtualMachineOperationsExtensions Members
Microsoft.WindowsAzure.Management.Compute Namespace