Expand Minimize
EN
Dette innholdet er ikke tilgjengelig på ditt språk, men her er den engelske versjonen.
Dette emnet er ennå ikke vurdert - Vurder dette emnet

New-AzureVMConfig

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

New-AzureVMConfig

Creates a new Windows Azure virtual machine configuration object.

 

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

Vurderte du dette som nyttig?
(1500 tegn igjen)
© 2013 Microsoft. Med enerett.
facebook page visit twitter rss feed newsletter