qvm-grow-root: wait for VM to shutdown at the end

Otherwise it could lead to some race conditions, for example when the
user tries to start some application there afterwards.

QubesOS/qubes-issues#1268
This commit is contained in:
Marek Marczykowski-Górecki 2015-12-26 04:08:12 +01:00
parent e3e8a55c92
commit 49c1ab2f99
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -31,6 +31,7 @@ from qubes.qubes import (
QubesException,
QubesVm,
)
from time import sleep
class QubesResizableVm(QubesVm):
@ -62,6 +63,8 @@ class QubesResizableVmWithResize2fs(QubesResizableVm):
self.run("resize2fs /dev/mapper/dmroot", user="root", wait=True,
gui=False)
self.shutdown()
while self.is_running():
sleep(1)
register_qubes_vm_class(QubesResizableVm)