vncproxy: add check if VM is running

To provide better eror message for console task.
This commit is contained in:
Dietmar Maurer 2014-06-25 07:20:23 +02:00
parent 6e0d60e4e0
commit 7786f1b0b4

View File

@ -1348,6 +1348,8 @@ __PACKAGE__->register_method({
$cmd = ['/bin/nc', '-l', '-p', $port, '-w', $timeout, '-c', "$qmstr 2>/dev/null"];
}
die "VM $vmid not running\n" if !PVE::QemuServer::check_running($vmid);
PVE::Tools::run_command($cmd);
return;