diff --git a/dom0/aux-tools/remove_appvm_appmenus.sh b/dom0/aux-tools/remove_appvm_appmenus.sh index 748132e3..a05e491f 100755 --- a/dom0/aux-tools/remove_appvm_appmenus.sh +++ b/dom0/aux-tools/remove_appvm_appmenus.sh @@ -1,6 +1,10 @@ #!/bin/sh VMNAME=$1 -VMDIR=/var/lib/qubes/appvms/$VMNAME +VMTYPE=$2 +if [ -z "$VMTYPE" ]; then + VMTYPE=appvms +fi +VMDIR=/var/lib/qubes/$VMTYPE/$VMNAME APPSDIR=$VMDIR/apps if [ $# != 1 ]; then diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 1eac9008..c080231b 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -1174,6 +1174,13 @@ class QubesTemplateVm(QubesVm): except subprocess.CalledProcessError: print "Ooops, there was a problem creating appmenus for {0} VM!".format (self.name) + def remove_from_disk(self): + if dry_run: + return + + subprocess.check_call ([qubes_appmenu_remove_cmd, self.name, "vm-templates"]) + super(QubesTemplateVm, self).remove_from_disk() + def verify_files(self): if dry_run: return