Skip to content

Commit

Permalink
Remove unknown shutdown kwarg in call to vmops._destroy
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Johannes Erdfelt committed Jun 25, 2012
1 parent fcd2dad commit 75546da
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/xenserver/vm_vdi_cleaner.py
Expand Up @@ -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):
Expand Down

0 comments on commit 75546da

Please sign in to comment.