From 3074a4064ca5b1776826ddf400e2e755217f1d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 26 Jun 2017 02:00:45 +0200 Subject: [PATCH] vm/qubesvm: forbid changing VM name We've decided to make VM name immutable. This is especially important for Admin API, where some parts (especially policy) are sticked to the VM name. Now, to rename the VM, one need to clone it under new name (thanks to LVM, this is very quick action), then remove the old one. Fixes QubesOS/qubes-issues#2868 --- qubes/vm/qubesvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index ac5d12c2..f9e84660 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -372,7 +372,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): doc='''Internal, persistent identificator of particular domain. Note this is different from Xen domid.''') - name = qubes.property('name', type=str, + name = qubes.property('name', type=str, write_once=True, clone=False, doc='User-specified name of the domain.')