Interface VirtualMachine.UpdateStages.WithOSDisk
- All Known Subinterfaces:
VirtualMachine.Update, VirtualMachine.UpdateStages.WithSystemAssignedIdentityBasedAccessOrUpdate
- Enclosing interface:
VirtualMachine.UpdateStages
-
Method Summary
Modifier and TypeMethodDescriptionwithOSDisk(Disk disk) Swaps the OS disk of the virtual machine for the specified managed disk.withOSDisk(String diskId) Swaps the OS disk of the virtual machine for the specified managed disk.
-
Method Details
-
withOSDisk
Swaps the OS disk of the virtual machine for the specified managed disk.Note:
- Both the original OS disk and the disk to swap for have to be managed disks.
- You cannot switch the OS Type of the VM (i.e. Swap an OS Disk with Linux for an OS Disk with Windows).
- Make sure that the VM size and storage type are compatible with the disk you want to attach. For example, if the disk you want to use is in Premium Storage, then the VM needs to be capable of Premium Storage (like a DS-series size).
- Parameters:
diskId- id of the managed disk to swap OS disk for- Returns:
- the next stage of the update
-
withOSDisk
Swaps the OS disk of the virtual machine for the specified managed disk.Note:
- Both the original OS disk and the disk to swap for have to be managed disks.
- You cannot switch the OS Type of the VM (i.e. Swap an OS Disk with Linux for an OS Disk with Windows).
- Make sure that the VM size and storage type are compatible with the disk you want to attach. For example, if the disk you want to use is in Premium Storage, then the VM needs to be capable of Premium Storage (like a DS-series size).
- Parameters:
disk- the managed disk to swap OS disk for- Returns:
- the next stage of the update
-