pysphere
pysphere copied to clipboard
Delete a VM
Being able to delete a VM would be extremely useful. Is this a limitation on
the vSphere SDK or on pysphere. If its pysphere I would be more than happy to
write the module for it.
Original issue reported on code.google.com by [email protected]
on 5 Apr 2012 at 12:52
Check this thread from the discussion group:
http://groups.google.com/group/pysphere/browse_thread/thread/be1d6c1af114160d#
It is explained there how to unregister a VM and later how to remove its files
from the datastore.
But I agree with you that a simpler interface should be added (probably to the
VIServer class).
Something like: "delete_vm_by_path(path, remove_files=True)".
I'm leaving this issue opened. But I'll change the type label from Defect to
Enhancement.
Thanks for your contribution!
Original comment by [email protected]
on 5 Apr 2012 at 3:15
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
i've implemented the 'delete_vm_by_path(path, remove_files=True)'
function, how can i submit my code to this project?
Original comment by [email protected]
on 1 Feb 2013 at 5:54
in addition i've implemented 'delete_vm_by_name(name, remove_files=True)'
Original comment by [email protected]
on 2 Feb 2013 at 1:36
attached patch file for:
delete_vm_by_path
delete_vm_by_name
Original comment by [email protected]
on 26 Mar 2013 at 11:22
Attachments:
Thanks, this is extremely useful.
Until you submit the code, how can we use it in my code?
I'm new to python and can't seem to get around the @/+/- signs in file.
Original comment by [email protected]
on 5 May 2013 at 6:43
[deleted comment]
Thanks for the patch! I've cleaned it up a bit (line endings, raises instead of
prints).
To apply it just use the patch command:
patch <original file> <patch file>
-update 07/17/13: sry, typo-
Original comment by [email protected]
on 17 Jul 2013 at 3:39
Attachments:
guys check out pyvmomi, official vmware python sdk
Original comment by [email protected]
on 9 Oct 2014 at 9:16