pysphere icon indicating copy to clipboard operation
pysphere copied to clipboard

Delete a VM

Open GoogleCodeExporter opened this issue 9 years ago • 10 comments

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

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

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

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

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

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

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

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

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:

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

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

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

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:

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

When will this be implemented? 

Original comment by [email protected] on 26 Dec 2013 at 10:50

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

bump

Original comment by [email protected] on 9 Oct 2014 at 6:08

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter

guys check out pyvmomi, official vmware python sdk

Original comment by [email protected] on 9 Oct 2014 at 9:16

GoogleCodeExporter avatar Apr 14 '15 07:04 GoogleCodeExporter