다음을 통해 공유


VirtualMachine.UpdateStages.WithOSDisk Interface

public static interface VirtualMachine.UpdateStages.WithOSDisk

The stage of the VM update allowing to swap os disk.

Method Summary

Modifier and Type Method and Description
abstract Update withOSDisk(Disk disk)

Swaps the OS disk of the virtual machine for the specified managed disk.

abstract Update withOSDisk(String diskId)

Swaps the OS disk of the virtual machine for the specified managed disk.

Method Details

withOSDisk

public abstract 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

withOSDisk

public abstract 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

Applies to