Skip to content

issue when creating vm from snapshot #5

Description

@jaskas23

PS C:\Windows\system32> $snapshot = Get-AzureRmSnapshot
PS C:\Windows\system32> $resourceGroupName ='prod'
PS C:\Windows\system32> $snapshotName = 'vm3copy'
PS C:\Windows\system32> $osDiskName = 'myvm3disk'
PS C:\Windows\system32> $virtualNetworkName = 'prod-vnet'
PS C:\Windows\system32> $virtualMachineName = 'myVM3'
PS C:\Windows\system32> $virtualMachineSize = 'Standard_DS3'
PS C:\Windows\system32> $snapshot = Get-AzureRmSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName
PS C:\Windows\system32> $diskConfig = New-AzureRmDiskConfig -AccountType $storageType -Location $snapshot.Location -SourceResourceId $snapshot.Id -CreateOption Copy
PS C:\Windows\system32> $disk = New-AzureRmDisk -Disk $diskConfig -ResourceGroupName $resourceGroupName -DiskName $osDiskName
New-AzureRmDisk : The request content was invalid and could not be deserialized: Required property 'name' not found in 'sku'.
ErrorCode: InvalidRequestContent
ErrorMessage: The request content was invalid and could not be deserialized: Required property 'name' not found in 'sku'.
ErrorTarget:
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 78d284c4-7180-47c0-a808-907519b9827b
At line:1 char:9

  • $disk = New-AzureRmDisk -Disk $diskConfig -ResourceGroupName $resourc ...
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [New-AzureRmDisk], ComputeCloudException
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Automation.NewAzureRmDisk

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions