New-AzureVMConfig
New-AzureVMConfig
Parameter Set: ImageName New-AzureVMConfig [-Name] <String> [-InstanceSize] <String> [-ImageName] <String> [[-MediaLocation] <String> ] [[-DiskLabel] <String> ] [-AvailabilitySetName <String> ] [-HostCaching <String> ] [-Label <String> ] [ <CommonParameters>] Parameter Set: DiskName New-AzureVMConfig [-Name] <String> [-InstanceSize] <String> [-DiskName] <String> [-AvailabilitySetName <String> ] [-HostCaching <String> ] [-Label <String> ] [ <CommonParameters>]
The New-AzureVMConfig cmdlet creates a new virtual machine configuration object. This object can then be used to perform a new deployment, as well as to add a new virtual machine to an existing deployment.
-AvailabilitySetName<String>
Specifies the name of the availability set.
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-DiskLabel<String>
Specifies a label for the operating system disk.
Aliases | none |
Required? | false |
Position? | 4 |
Default Value | none |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-DiskName<String>
Specifies a name for the operating system disk.
Aliases | none |
Required? | true |
Position? | 3 |
Default Value | none |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-HostCaching<String>
Specifies the host caching mode for the operating system disk. Supported values are: "ReadOnly" and "ReadWrite".
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-ImageName<String>
Specifies the name of the virtual machine image to use for the operating system disk.
Aliases | none |
Required? | true |
Position? | 3 |
Default Value | none |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-InstanceSize<String>
Specifies the size of the virtual machine. Supported values are: "ExtraSmall", "Small", "Medium", "Large", "ExtraLarge".
Aliases | none |
Required? | true |
Position? | 2 |
Default Value | none |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Label<String>
Specifies a label to assign to the virtual machine.
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | true (ByPropertyName) |
Accept Wildcard Characters? | false |
-MediaLocation<String>
Specifies the Windows Azure storage location for the new virtual machine disk.
Aliases | none |
Required? | false |
Position? | 3 |
Default Value | none |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Name<String>
Specifies the name of the virtual machine.
Aliases | none |
Required? | true |
Position? | 1 |
Default Value | none |
Accept Pipeline Input? | true (ByPropertyName) |
Accept Wildcard Characters? | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
-------------- Example 1 --------------
Creates a new Windows virtual machine configuration with operating system disk, data disk and provisioning configuration. This configuration is then used to create a new virtual machine.
C:\PS> $image = (Get-AzureVMImage)[4].ImageName C:\PS>New-AzureVMConfig -Name "MyVM1" -InstanceSize ExtraSmall -ImageName $image ` | Add-AzureProvisioningConfig -Windows -Password $adminPassword ` | Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel 'datadisk1' -LUN 0 ` | New-AzureVM –ServiceName "MySvc1"
-------------- Example 2 --------------
Creates a new Linux virtual machine configuration with operating system disk, data disk and provisioning configuration. This configuration is then used to create a new virtual machine.
C:\PS> $image = (Get-AzureVMImage)[7].ImageName C:\PS>New-AzureVMConfig -Name "MyVM1" -InstanceSize ExtraSmall -ImageName $image ` | Add-AzureProvisioningConfig –Linux –LinuxUser $linuxUser -Password $adminPassword ` | Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel 'datadisk1' -LUN 0 ` | New-AzureVM –ServiceName "MySvc1"
Related topics
Add-AzureDataDisk
Add-AzureProvisioningConfig
Get-AzureVM
Remove-AzureVM
Update-AzureVM
Create or Delete Virtual Machines Using Windows Azure Cmdlets
Manage Certificates and SSH keys Using Windows Azure Cmdlets
Manage Virtual Machines Using Windows Azure Cmdlets
Manage Images and Disks Using Windows Azure Cmdlets
Set Up and Manage Virtual Networks Using Windows Azure Cmdlets
Set Up Communication for Virtual Machines Using Windows Azure Cmdlets