Пример #1
0
 def create(self):
     LOG.debug("Virtman: start VM instance %s according origin_path %s" %
               (self.instance_name, self.origin_path))
     snapshot_path = self._create_snap_dev()
     self.instance_path = dmsetup.snapshot(self.origin_path,
                                           self.snapshot_dev_name, snapshot_path)
     LOG.debug("Virtman: success! instance_path = %s" % self.instance_path)
     return self.instance_path
Пример #2
0
 def create(self):
     LOG.debug("Virtman: start VM instance %s according origin_path %s" %(self.instance_name, self.origin_path))
     snapshot_path, self.snapshot_link = self.snapshot.create_snapshot()
     self.instance_path = dmsetup.snapshot(self.origin_path, self.snapshot_name, snapshot_path)
     #change link for OpenStack
     commands.unlink(self.snapshot_link)
     if not os.path.exists(self.snapshot_link):
         commands.link(self.instance_path, self.snapshot_link)
     LOG.debug("Virtman: success! snapshot_link = %s" % self.snapshot_link)
     return self.snapshot_link