diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-09-09 18:26:47 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-09-09 18:26:47 +0000 |
| commit | 128294ab9f5c03426ecb2154c48ea98186256d5b (patch) | |
| tree | 9f45a7433f2a2e949b2681b9078b9df7d9a1de0c | |
| parent | 266fe18ef4ec474926908fcd9aeb2d7de4b34447 (diff) | |
| parent | 9dd2d6c49a36c1834d0ef842c47d2ef400642ff2 (diff) | |
| download | nova-128294ab9f5c03426ecb2154c48ea98186256d5b.tar.gz nova-128294ab9f5c03426ecb2154c48ea98186256d5b.tar.xz nova-128294ab9f5c03426ecb2154c48ea98186256d5b.zip | |
Remove the unnecessary sudo from qemu-img as it is unneeded and doesn't work with our current packaging.
| -rw-r--r-- | nova/virt/libvirt/connection.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 363a20ed0..19cef5ad7 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -1696,7 +1696,7 @@ class LibvirtConnection(driver.ComputeDriver): base = os.path.basename(info['path']) # Get image type and create empty disk image. instance_disk = os.path.join(instance_dir, base) - utils.execute('sudo', 'qemu-img', 'create', '-f', info['type'], + utils.execute('qemu-img', 'create', '-f', info['type'], instance_disk, info['local_gb']) # if image has kernel and ramdisk, just download @@ -1788,7 +1788,7 @@ class LibvirtConnection(driver.ComputeDriver): if disk_type == 'raw': size = int(os.path.getsize(path)) else: - out, err = utils.execute('sudo', 'qemu-img', 'info', path) + out, err = utils.execute('qemu-img', 'info', path) size = [i.split('(')[1].split()[0] for i in out.split('\n') if i.strip().find('virtual size') >= 0] size = int(size[0]) |
