Fix for bug #740947
Executing parted with sudo in _write_partition (vm_utils.py)
This commit is contained in:
commit
8c76aa7cd5
@ -991,8 +991,8 @@ def _write_partition(virtual_size, dev):
|
|||||||
def execute(*cmd, **kwargs):
|
def execute(*cmd, **kwargs):
|
||||||
return utils.execute(*cmd, **kwargs)
|
return utils.execute(*cmd, **kwargs)
|
||||||
|
|
||||||
execute('parted', '--script', dest, 'mklabel', 'msdos')
|
execute('sudo', 'parted', '--script', dest, 'mklabel', 'msdos')
|
||||||
execute('parted', '--script', dest, 'mkpart', 'primary',
|
execute('sudo', 'parted', '--script', dest, 'mkpart', 'primary',
|
||||||
'%ds' % primary_first,
|
'%ds' % primary_first,
|
||||||
'%ds' % primary_last)
|
'%ds' % primary_last)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user