Remove pidfile before starting vm

This commit is contained in:
Tom Marshall 2021-04-26 10:35:39 -07:00
parent dcd19c674c
commit 15078c96e2
1 changed files with 4 additions and 0 deletions

4
vmmd
View File

@ -965,6 +965,10 @@ class VirtualMachine(DbObject):
argv.extend(['-cdrom', self._iso_pathname, '-boot', 'd'])
if resuming:
argv.extend(['-loadvm', 'vmm-suspend'])
try:
os.unlink(self._qemu_pidfile())
except OSError as e:
pass
fork_child(argv)
tries = 0
while tries < 20 and not os.path.exists(self._qemu_pidfile()):