diff options
| author | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2011-03-23 12:39:14 +0000 |
|---|---|---|
| committer | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2011-03-23 12:39:14 +0000 |
| commit | 72c5735e1f77c764fc96e063ea848bac8e1ab810 (patch) | |
| tree | 4aa9f0d80e29091a1d1b104cc16a43e76197efd2 /nova/virt | |
| parent | abe147f756f13d4f968aa075d709e5c6643d310a (diff) | |
Executing parted with sudo in _write_partition
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/xenapi/vm_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 7dbca321f..66618963a 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -991,8 +991,8 @@ def _write_partition(virtual_size, dev): def execute(*cmd, **kwargs): return utils.execute(*cmd, **kwargs) - execute('parted', '--script', dest, 'mklabel', 'msdos') - execute('parted', '--script', dest, 'mkpart', 'primary', + execute('sudo', 'parted', '--script', dest, 'mklabel', 'msdos') + execute('sudo', 'parted', '--script', dest, 'mkpart', 'primary', '%ds' % primary_first, '%ds' % primary_last) |
