[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to change a block device virtual-size on a running VM?
From: |
Ilya Yakushin |
Subject: |
How to change a block device virtual-size on a running VM? |
Date: |
Wed, 19 Oct 2022 17:57:32 +0300 |
Hello!
I'm trying to reszie a disk on a working VM using the qemu monitor.
```
# zfs set volsize=2571108352 fastpool/vm/vm-9008-disk-0
# qm monitor 9008
Entering Qemu Monitor for VM 9008 - type 'help' for help
qm> info block -v
drive-scsi0 (#block178): /dev/zvol/fastpool/vm/vm-9008-disk-0 (raw)
Attached to: scsi0
Cache mode: writeback, direct
Detect zeroes: on
Images:
image: /dev/zvol/fastpool/vm/vm-9008-disk-0
file format: raw
virtual size: 2.3 GiB (2466250752 bytes)
disk size: 0 B
qm> block_resize drive-scsi0 2654994432
Error: Cannot grow device files
```
As I can see, the qemu monitor sending to a socket json like this:
```
{
"id": "2737013:2",
"arguments": {
"command-line": "block_resize drive-scsi0 2654994432"
},
"execute": "human-monitor-command"
}
```
and the socket returns back error message:
"Error: Cannot grow device files"
Maybe I should use different command in the qemu-monitor to change virtual size
of a VM?
I'm using the Proxmox, which sending to a qemu socket different json:
{
"id": "1889371:2",
"arguments": {
"size": 2571108352,
"device": "drive-scsi0"
},
"execute": "block_resize"
}
This json successfully change virtual block size of a block device.
Regards,
Ilya Yakushin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to change a block device virtual-size on a running VM?,
Ilya Yakushin <=