mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-22 22:03:55 +03:00
add qemu_block_resize
this call storage plugin resize first. storage plugin will return undef if we don't need to call qmp block_resize or return 1 if we need to call qmp block_resize Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
af990afe34
commit
c1175c9264
@ -2547,6 +2547,19 @@ sub qemu_block_set_io_throttle {
|
||||
|
||||
}
|
||||
|
||||
sub qemu_block_resize {
|
||||
my ($vmid, $deviceid, $storecfg, $volid, $size) = @_;
|
||||
|
||||
my $running = PVE::QemuServer::check_running($vmid);
|
||||
|
||||
return if !PVE::Storage::volume_resize($storecfg, $volid, $size, $running);
|
||||
|
||||
return if !$running;
|
||||
|
||||
vm_mon_cmd($vmid, "block_resize", device => $deviceid, size => int($size));
|
||||
|
||||
}
|
||||
|
||||
sub vm_start {
|
||||
my ($storecfg, $vmid, $statefile, $skiplock) = @_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user