Make snapshots with qemu-img instead of libvirt

* snapshot is only supposed to snapshot the root drive, whereas
   libvirt snapshots snapshot the memory and all attached disks
 * removes silly qemu_img flag
 * fixes bug 946830

Change-Id: I6afc9dbaa855f06864cd5a37f89ad63555e35d23
This commit is contained in:
Vishvananda Ishaya
2012-03-08 16:26:13 -08:00
parent 279173e0f8
commit b5d127fb51
3 changed files with 20 additions and 2 deletions

View File

@@ -179,6 +179,10 @@ filterlist = [
# nova/virt/xenapi/vm_utils.py: 'mkfs'
filters.CommandFilter("/sbin/mkfs", "root"),
# nova/virt/libvirt/utils.py: 'qemu-img'
filters.CommandFilter("/usr/bin/qemu-img", "root"),
# nova/virt/libvirt/connection.py:
filters.ReadFileFilter("/etc/iscsi/initiatorname.iscsi"),
]

View File

@@ -61,6 +61,14 @@ def chown(path, owner):
pass
def create_snapshot(disk_path, snapshot_name):
pass
def delete_snapshot(disk_path, snapshot_name):
pass
def extract_snapshot(disk_path, source_fmt, snapshot_name, out_path, dest_fmt):
files[out_path] = ''

View File

@@ -96,8 +96,14 @@ class FakeVirtDomain(object):
def name(self):
return "fake-domain %s" % self
def snapshotCreateXML(self, *args):
return FakeVirDomainSnapshot(self)
def info(self):
return [power_state.RUNNING, None, None, None, None]
def create(self):
pass
def managedSave(self, *args):
pass
def createWithFlags(self, launch_flags):
pass