diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index b5eae453..773719f1 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -548,6 +548,7 @@ class QubesVm(object): self.pre_rename(name) self.libvirt_domain.undefine() + self._libvirt_domain = None new_conf = os.path.join(self.dir_path, name + '.conf') if os.path.exists(self.conf_file): @@ -652,6 +653,8 @@ class QubesVm(object): def _update_libvirt_domain(self): domain_config = self.create_config_file() + if self._libvirt_domain: + self._libvirt_domain.undefine() self._libvirt_domain = vmm.libvirt_conn.defineXML(domain_config) self.uuid = uuid.UUID(bytes=self._libvirt_domain.UUID())