]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/API2/Qemu.pm
vncproxy: wait max 10s for the socket if it does not exist
[qemu-server.git] / PVE / API2 / Qemu.pm
index ee02467d166cd067912acc586fd238c68cf41f64..f91716f3e91c670c24961cfeeea6d145f3862f6d 100644 (file)
@@ -1110,6 +1110,9 @@ __PACKAGE__->register_method({
        my $realcmd = sub {
            my $upid = shift;
 
+           my $c = 0;
+           while ( ++$c < 10 && !-e "/var/run/qemu-server/$vmid.vnc" ) { sleep(1); }
+
            syslog('info', "starting vnc proxy $upid\n");
 
            my $qmcmd = [@$remcmd, "/usr/sbin/qm", 'vncproxy', $vmid];
@@ -1937,6 +1940,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']);