diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 323ca6ec..18789a87 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -225,7 +225,8 @@ class QubesVm(object): assert self.name is not None if not self.verify_name(self.name): - raise QubesException("Invalid characters in VM name") + raise QubesException("Invalid VM name (invalid characters, " + "or one of 'none', 'true', 'false')") if self.netvm is not None: self.netvm.connected_vms[self.qid] = self @@ -407,6 +408,8 @@ class QubesVm(object): return False def verify_name(self, name): + if not isinstance(self.__basic_parse_xml_attr(name), str): + return False return re.match(r"^[a-zA-Z][a-zA-Z0-9_-]*$", name) is not None def pre_rename(self, new_name):