[pve-devel] [PATCH] forbid online resize a virtio windows bootdisk

Alexandre Derumier aderumier at odiso.com
Sat Feb 23 10:25:52 CET 2013


Currently is give us bsod, it's a windows virtio-blk driver bug.

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Qemu.pm |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index ee02467..1597e68 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1937,6 +1937,9 @@ __PACKAGE__->register_method({
 
 	    die "you can't resize a cdrom\n" if PVE::QemuServer::drive_is_cdrom($drive);
 
+	    die "you can't online resize a virtio windows bootdisk\n" 
+		if PVE::QemuServer::check_running($vmid) && $conf->{bootdisk} eq $disk && $conf->{ostype} =~ m/^w/ && $disk =~ m/^virtio/;
+
 	    my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
 
 	    $rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
-- 
1.7.10.4




More information about the pve-devel mailing list