Ejemplo n.º 1
0
 def save_to_file(self, path):
     """
     Override BaseVM save_to_file method
     """
     state = virsh.domstate(self.name)
     if state not in ("paused",):
         raise virt_vm.VMStatusError("Cannot save a VM that is %s" % state)
     logging.debug("Saving VM %s to %s" % (self.name, path))
     virsh.save(self.name, path, uri=self.connect_uri)
     state = virsh.domstate(self.name)
     if state not in ("shut off",):
         raise virt_vm.VMStatusError("VM not shut off after save")
Ejemplo n.º 2
0
 def save_to_file(self, path):
     """
     Override BaseVM save_to_file method
     """
     state = virsh.domstate(self.name)
     if state not in ('paused',):
         raise virt_vm.VMStatusError("Cannot save a VM that is %s" % state)
     logging.debug("Saving VM %s to %s" %(self.name, path))
     virsh.save(self.name, path, uri=self.connect_uri)
     state = virsh.domstate(self.name)
     if state not in ('shut off',):
         raise virt_vm.VMStatusError("VM not shut off after save")
Ejemplo n.º 3
0
 def save_to_file(self, path):
     """
     Override BaseVM save_to_file method
     """
     virsh.save(self.name, path, uri=self.connect_uri)
Ejemplo n.º 4
0
 def save_to_file(self, path):
     """
     Override BaseVM save_to_file method
     """
     virsh.save(self.name, path, uri=self.connect_uri)