「PVE」- 虚拟机 | 磁盘管理 | 虚拟磁盘

Bandwidth

I’m experimenting with the VM Disk Throttle settings. So far here is my understanding:
1)Read limit (MB/s): total read bandwidth per second allowed (I’m using 115 to simulate a HDD)
2)Write limit (MB/s): total write bandwidth per second allowed (I’m using 115 to simulate a HDD)
3)Read limit (ops/s): number of read io operations per second (iops) (I’m using 300 to simulate a HDD doing sequential reads)
4)Read limit (ops/s): number of write io operations per second (iops) (I’m using 100 to simulate a HDD doing sequential writes)

In terms of the Read max burst (MB) (similar theory for Write max burst (MB), Read max burst (ops), Write max burst (ops)). This value refers to a leaky bucket algorithm which I’m assuming works like so:
1)You set it for something equal to or larger than the “Read limit (MB/s)” say 500.
2)This will allow you to burst up to 500MB at the max speed or the storage system.
3)Once you hit that limit you have to wait for the bucket to refill from the value you set for “Read Limit (MB/s)”. So for a value of 115 this would take 4.34s. This is assuming you have no IO happening after the burst otherwise that will delay the refill.

增加磁盘(增)

导入多种磁盘格式

将ova或qcow2导入到PVE虚拟机
qm(1)

qm importdisk  <vmid> <images-name> <storage pool>  --format=<disk-fs>

# 根据文档,--format <qcow2 | raw | vmdk> 

删除磁盘(删)

删除虚拟机磁盘配置

An Example of using unlink – Remove virtual disks

通过命令删除配置(图形化操作超时,命令行将成为替代方法):

# qm config 168010121                                       # cat /etc/pve/nodes/<node-name>/qemu-server/168010121.conf
...
unused0: cop-for-dev:vm-168010121-disk-0
...

# qm unlink 168010121 --idlist unused0

修改磁盘(改)

磁盘扩容

Resize disks – Proxmox VE

qm resize 100 virtio0 +5G                                                       # 将磁盘增加 5G
qm resize 100 virtio0  5G                                                       # 将磁盘设为 5G

参考 Resize disks – Proxmox VE 文档,以获取后续的 磁盘扩容、文件系统扩容 相关内容。

调整磁盘带宽

Disk Throttling Settings and Default Values | Proxmox Support Forum

qm set 168010105 --scsi0 file=local-lvm:vm-168010105-disk-0,iops_rd=180,iops_wr=180,mbps_rd=40,mbps_wr=40

通过 Web 界面,配置磁盘,选择 Bandwidth 选项卡,修改其中的 Read limit、Write limit 字段;

迁移磁盘到其他存储

// qm disk move <vmid> <disk> [<storage>] [OPTIONS]
// qm move_disk
// qm move-disk

qm disk move 168010121 scsi0 SSD-RAID-5 --delete