vncproxy: wait max 10s for the socket if it does not exist

Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
This commit is contained in:
Stefan Priebe 2013-02-25 21:57:23 +01:00 committed by Dietmar Maurer
parent b7b1ac9d04
commit 58504d5edf

View 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];