From 75546dade88d39469bb3479e80ebd6b4afad36e9 Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Mon, 25 Jun 2012 15:37:50 +0000 Subject: Remove unknown shutdown kwarg in call to vmops._destroy Fixes bug 1017562 Also, _destroy will now intelligently shutdown the VM first, so need to do that in vm_vdi_cleaner.py anymore Change-Id: I8c1e3aa8ecb98ed3c19ab4b8fa072b7fa8e5618f --- tools/xenserver/vm_vdi_cleaner.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/xenserver/vm_vdi_cleaner.py b/tools/xenserver/vm_vdi_cleaner.py index 30643abd3..43f2ad81e 100755 --- a/tools/xenserver/vm_vdi_cleaner.py +++ b/tools/xenserver/vm_vdi_cleaner.py @@ -109,9 +109,7 @@ def find_orphaned_instances(xenapi, verbose=False): def cleanup_instance(xenapi, instance, vm_ref, vm_rec): """Delete orphaned instances.""" - if vm_rec['power_state'] == 'Running': - call_xenapi(xenapi, 'VM.hard_shutdown', vm_ref) - xenapi._vmops._destroy(instance, vm_ref, shutdown=False) + xenapi._vmops._destroy(instance, vm_ref) def _get_applicable_vm_recs(xenapi): -- cgit