Using Console
Using CLI
<resource-group-name>
with the name of the resource group where you want to create the new virtual machine. Replace <new-vm-name>
with the name you want to give to the new virtual machine. Replace <approved-image-name>
with the name of the approved image that you want to use. Replace <admin-username>
and <admin-password>
with the username and password that you want to use to access the new virtual machine. Replace <vm-size>
with the size of the virtual machine that you want to create. Replace <location>
with the location where you want to create the new virtual machine.
<resource-group-name>
with the name of the resource group where the old virtual machine is located. Replace <old-vm-name>
with the name of the old virtual machine that you want to delete.
Using Python
osProfile
property of the virtual machine to get the image reference.begin_update
method of the virtual machine to update the image reference.