qvm-remove: undefine libvirt domain even when not removing files
Fixes QubesOS/qubes-issues#2112
This commit is contained in:
		
							parent
							
								
									748a3a90a2
								
							
						
					
					
						commit
						13f832645a
					
				@ -79,6 +79,10 @@ def main():
 | 
				
			|||||||
            exit (1)
 | 
					            exit (1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
 | 
					        if options.remove_from_db_only:
 | 
				
			||||||
 | 
					            # normally it is done by vm.remove_from_disk(), but it isn't
 | 
				
			||||||
 | 
					            # called in this case
 | 
				
			||||||
 | 
					            vm.libvirt_domain.undefine()
 | 
				
			||||||
        if vm.installed_by_rpm:
 | 
					        if vm.installed_by_rpm:
 | 
				
			||||||
            if options.verbose:
 | 
					            if options.verbose:
 | 
				
			||||||
                print >> sys.stderr, "--> VM installed by RPM, leaving all the files on disk"
 | 
					                print >> sys.stderr, "--> VM installed by RPM, leaving all the files on disk"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user