Forbid renaming of RPM-borne VMs (mainly templates) (#839)

User can still clone VM and remove old via rpm/yum.
This commit is contained in:
Wojciech Zygmunt Porczyk 2014-06-26 13:55:35 +02:00
parent 8ff423dc9a
commit b2162b1af9

View File

@ -506,6 +506,9 @@ class QubesVm(object):
if not self.verify_name(name):
raise QubesException("Invalid characters in VM name")
if self.installed_by_rpm:
raise QubesException("Cannot rename VM installed by RPM -- first clone VM and then use yum to remove package.")
self.pre_rename(name)
new_conf = os.path.join(self.dir_path, name + '.conf')