Interface VirtualMachine.UpdateStages.WithOSDisk

All Known Subinterfaces:
VirtualMachine.Update, VirtualMachine.UpdateStages.WithSystemAssignedIdentityBasedAccessOrUpdate
Enclosing interface:
VirtualMachine.UpdateStages

public static interface VirtualMachine.UpdateStages.WithOSDisk
The stage of the VM update allowing to swap os disk.
  • Method Details

    • withOSDisk

      VirtualMachine.Update withOSDisk(String diskId)
      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

      VirtualMachine.Update withOSDisk(Disk disk)
      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