Add, expand or delete a disk
A virtual machine (VM) has up to five disks, and all of them are stored in the storage pool of the VM. You can add and expand a disk on a running VM too; you can delete a disk only on a powered-off VM.
Before you begin
- You need the VDC admin or Vm Developer role in this VDC (virtual data center), or the Cluster master role.
- If the VDC has a storage quota, its remainder covers the new disk or the size increase — Set VDC quotas.
- The VM is not locked and is not being moved to another node or pool.
- To delete a disk, the VM is powered off: its status is Offline or Created — Start, stop and restart a VM.
1. Add a disk
- In the left menu, select Virtual Data Centers → the VDC → Virtual Machines → the VM. The VM page opens.
- Click Add disk in the header of the Disks section. The section expands, and a Disk N block appears in it. The button is not shown if the VM already has five disks.
- Enter the size in gigabytes in the Disk size field. The minimum is 1 GB; the maximum is shown in the field hint.
- Click Save disk.
2. Expand a disk
- On the VM page, expand the Disks section.
- Click the disk row. The disk panel opens on the right.
- Enter the new size in gigabytes in the Disk size (GB) field. The new size must be larger than the current one: you cannot shrink a disk.
- Click Save.
Center expands only the disk itself. Extend the partition and the file system inside the guest OS with the guest OS tools.
If the guest OS does not see the new size, restart the VM.
Check the result
- After you add a disk, the web interface shows the notification Disk <ID> was successfully added!, and a row of the new disk appears in the Disks section.
- After you expand a disk, the web interface shows Disk <ID> got new volume: <size> GB, and the Disk size (GB) column shows the new size.
If Center rejects the operation, the web interface shows a notification with the error, for example, when the VDC storage quota is used up.
Delete a disk
If the VM has no snapshots, the disk data is lost permanently. You cannot delete the disk in slot 1.
- On the page of the powered-off VM, expand the Disks section.
- Click the ⋯ button in the disk row and select Remove. The disk in slot 1 does not have this item.
- Click Remove in the Are you sure want to remove <disk name>? window.
If the VM has snapshots, a rollback to a snapshot taken before the deletion returns the disk — Create a VM snapshot and roll back to it. The space of such a disk stays used in the pool and in the VDC storage quota. To free the space immediately, delete the VM snapshots first, and then the disk.
More
- Name (the Disk N block) — the disk label in the web interface. Later you can change it in the disk panel, which opens when you click the disk row.
- Slot — the sequence number of the device in the guest OS. By default, the first free one.
- Sector size — 512 or 4096 bytes. You cannot change it after the disk is added.
- IOps limit and MBps limit — the speed limits of the disk. An empty field and 0 mean the same thing: no limit. Later you can change them in the disk panel, including for a running VM; this is available to users with the VDC admin, VDC user and Cluster master roles.
- Filesystems in the ⋯ menu of the disk row — shows the file systems on the disk. The item is available if the cluster supports this function.
Next
- Create a VM snapshot and roll back to it
- Move VM disks to another pool
- Cluster storage (SDS) — where VM disks are stored.
API methods: vms-add-disk, vms-disk-resize, vm-remove-disk, vm-disk-set-label, vm-ratelimit-disk — in the API reference.