Improve resize2fs call for root.img resize
1. Do not start GUI session - to reduce startup time 2. Use user="root" instead of sudo - not all templates have sudo installed (for example fedora-21-minimal) 3. Add missing wait=True - otherwise VM may be shutdown during the operation. QubesOS/qubes-issues#1268
This commit is contained in:
parent
cfe782f04a
commit
cf6c6baded
@ -58,8 +58,9 @@ class QubesResizableVmWithResize2fs(QubesResizableVm):
|
|||||||
|
|
||||||
def resize_root_img(self, size):
|
def resize_root_img(self, size):
|
||||||
super(QubesResizableVmWithResize2fs, self).resize_root_img(size)
|
super(QubesResizableVmWithResize2fs, self).resize_root_img(size)
|
||||||
self.start()
|
self.start(start_guid=False)
|
||||||
self.run("sudo resize2fs /dev/mapper/dmroot")
|
self.run("resize2fs /dev/mapper/dmroot", user="root", wait=True,
|
||||||
|
gui=False)
|
||||||
self.shutdown()
|
self.shutdown()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user