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:
parent
e3e8a55c92
commit
49c1ab2f99
@ -31,6 +31,7 @@ from qubes.qubes import (
|
|||||||
QubesException,
|
QubesException,
|
||||||
QubesVm,
|
QubesVm,
|
||||||
)
|
)
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
|
||||||
class QubesResizableVm(QubesVm):
|
class QubesResizableVm(QubesVm):
|
||||||
@ -62,6 +63,8 @@ class QubesResizableVmWithResize2fs(QubesResizableVm):
|
|||||||
self.run("resize2fs /dev/mapper/dmroot", user="root", wait=True,
|
self.run("resize2fs /dev/mapper/dmroot", user="root", wait=True,
|
||||||
gui=False)
|
gui=False)
|
||||||
self.shutdown()
|
self.shutdown()
|
||||||
|
while self.is_running():
|
||||||
|
sleep(1)
|
||||||
|
|
||||||
|
|
||||||
register_qubes_vm_class(QubesResizableVm)
|
register_qubes_vm_class(QubesResizableVm)
|
||||||
|
Loading…
Reference in New Issue
Block a user