Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions Commands/disk/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,94 @@ Create a managed disk.
```bash
disk create -g MyResourceGroup -n MyDisk --upload-size-bytes 20972032 --upload-type UploadWithSecurityData --security-type TrustedLaunch --hyper-v-generation V2
```

### [2025-01-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2Rpc2tzL3t9/2025-01-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{} 2025-01-02 -->

#### examples

- Create a managed disk by importing from a blob uri.
```bash
disk create -g MyResourceGroup -n MyDisk --source https://vhd1234.blob.core.windows.net/vhds/osdisk1234.vhd
```

- Create an empty managed disk.
```bash
disk create -g MyResourceGroup -n MyDisk --size-gb 10
```

- Create an empty managed disk with bursting enabled.
```bash
disk create -g MyResourceGroup -n MyDisk --size-gb 1024 --location centraluseuap --enable-bursting
```

- Create a managed disk by copying an existing disk or snapshot.
```bash
disk create -g MyResourceGroup -n MyDisk2 --source MyDisk
```

- Create a disk in an availability zone in the region of "East US 2".
```bash
disk create -g MyResourceGroup -n MyDisk --size-gb 10 --location eastus2 --zone 1
```

- Create a disk from image.
```bash
disk create -g MyResourceGroup -n MyDisk --image-reference Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:latest
```

- Create a disk from the OS Disk of a compute gallery image version.
```bash
disk create -g MyResourceGroup -n MyDisk --gallery-image-reference /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage/versions/1.0.0
```

- Create a disk from the OS Disk of the latest version in a compute gallery image.
```bash
disk create -g MyResourceGroup -n MyDisk --gallery-image-reference /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage
```

- Create a disk from the OS Disk of a shared gallery image version.
```bash
disk create -g MyResourceGroup -n MyDisk --gallery-image-reference /SharedGalleries/sharedGalleryUniqueName/Images/imageName/Versions/1.0.0
```

- Create a disk from the OS Disk of a community gallery image version.
```bash
disk create -g MyResourceGroup -n MyDisk --gallery-image-reference /CommunityGalleries/communityGalleryPublicGalleryName/Images/imageName/Versions/1.0.0
```

- Create a disk from the Data Disk of a gallery image.
```bash
disk create -g MyResourceGroup -n MyDisk --gallery-image-reference /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage/versions/1.0.0 --gallery-image-reference-lun 0
```

- Create a disk with total number of IOPS and total throughput (MBps) limitation.
```bash
disk create -g MyResourceGroup -n MyDisk --size-gb 10 --sku UltraSSD_LRS --disk-iops-read-only 200 --disk-mbps-read-only 30
```

- Create a disk and specify maximum number of VMs that can attach to the disk at the same time.
```bash
disk create -g MyResourceGroup -n MyDisk --size-gb 256 --max-shares 2 -l centraluseuap
```

- Create a disk and associate it with a disk access resource.
```bash
disk create -g MyResourceGroup -n MyDisk --size-gb 10 --network-access-policy AllowPrivate --disk-access MyDiskAccessID
```

- Create a disk from the blob URI for VM guest state VHD.
```bash
disk create -g MyResourceGroup -n MyDisk --size-gb 10 --security-data-uri GuestStateDiskVhdUri --security-type TrustedLaunch --hyper-v-generation V2
```

- Create a standard disk for uploading blobs.
```bash
disk create -g MyResourceGroup -n MyDisk --upload-size-bytes 20972032 --upload-type Upload
```

- Create an OS disk for uploading along with VM guest state.
```bash
disk create -g MyResourceGroup -n MyDisk --upload-size-bytes 20972032 --upload-type UploadWithSecurityData --security-type TrustedLaunch --hyper-v-generation V2
```
11 changes: 11 additions & 0 deletions Commands/disk/_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,14 @@ Delete a managed disk.
```bash
disk delete --name MyManagedDisk --resource-group MyResourceGroup
```

### [2025-01-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2Rpc2tzL3t9/2025-01-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{} 2025-01-02 -->

#### examples

- Delete a managed disk.
```bash
disk delete --name MyManagedDisk --resource-group MyResourceGroup
```
16 changes: 16 additions & 0 deletions Commands/disk/_grant-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,19 @@ Grant a resource access to a managed disk.
```bash
disk grant-access --access-level Read --duration-in-seconds 3600 --name MyDisk --resource-group MyResourceGroup --secure-vm-guest-state-sas
```

### [2025-01-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2Rpc2tzL3t9L2JlZ2luZ2V0YWNjZXNz/2025-01-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{}/begingetaccess 2025-01-02 -->

#### examples

- Grant a resource read access to a managed disk.
```bash
disk grant-access --access-level Read --duration-in-seconds 3600 --name MyManagedDisk --resource-group MyResourceGroup
```

- Grant a resource read access to a disk to generate access SAS and security data access SAS
```bash
disk grant-access --access-level Read --duration-in-seconds 3600 --name MyDisk --resource-group MyResourceGroup --secure-vm-guest-state-sas
```
4 changes: 4 additions & 0 deletions Commands/disk/_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ Get information about a disk.
### [2023-04-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2Rpc2tzL3t9/2023-04-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{} 2023-04-02 -->

### [2025-01-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2Rpc2tzL3t9/2025-01-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{} 2025-01-02 -->
16 changes: 16 additions & 0 deletions Commands/disk/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,19 @@ Update a managed disk.
```bash
disk update --name MyManagedDisk --resource-group MyResourceGroup --size-gb 20
```

### [2025-01-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2Rpc2tzL3t9/2025-01-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/disks/{} 2025-01-02 -->

#### examples

- Update a managed disk and associate it with a disk access resource.
```bash
disk update --name MyManagedDisk --resource-group MyResourceGroup --network-access-policy AllowPrivate --disk-access MyDiskAccessID
```

- Update a managed disk.
```bash
disk update --name MyManagedDisk --resource-group MyResourceGroup --size-gb 20
```

Large diffs are not rendered by default.

Loading