5
0
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:
Alexandre Derumier 2012-08-06 11:56:34 +02:00 committed by Dietmar Maurer
parent af990afe34
commit c1175c9264

View File

@ -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) = @_;