Hi, I am following instructions on moving an existing VM in Azure to a Different Subnet as indicated at the url
After adding my account, selecting scription and do Get-AzureVM, I get the following error
[blockquote]Update-AzureVM : BadRequest: The virtual network ID cannot be null or empty.
[blockquote]Get-AzureVM –ServiceName TestVMCloud –Name TestVM | Set-AzureSubnet –SubnetNames Subnet-2 | Update-AzureVM
was using variables when getting the mentioned error like this
[blockquote]Get-AzureVM-ServiceName $cloudServiceName -Name $vmName | Set-AzureSubnet -SubnetNames $subnetname | Update-AzureVM
[blockquote]Get-AzureVM -ServiceName myservice -Name MyAVM2 | Set-AzureSubnet -SubnetNames mysubnet | Update-AzureVM
[blockquote]Get-AzureVM -ServiceName 'myservice' -Name 'MyAVM2' | Set-AzureSubnet -SubnetNames 'mysubnet' | Update-AzureVM [/blockquote]
I opened a thread on MS forums, they request to open a ticket and my subscription is an MSDN related subscription which has no technical support
Are you sure the subnet you are referencing is correct? It looks like there is a Get-AzureVnetSite cmdlet that lists the available subnets, so can you do Get-AzureVnetSite -VnetName mysubnet and access the subnet? My guess is that Set-AzureSubnet is doing a similar look up and cannot find the subnet with that name, so it's null.
Dear Rob, executing only Get-AzureVnetSite or Get-AzureVnetSite -VNetName myNetwork
when I run
You must be logged in to reply to this topic.