VMware vSphere

 View Only
  • 1.  Delete VM from Data Store

    Posted Aug 12, 2011 06:48 AM

    Hi All

              I am working in ESXi 4.1. Can you provide commands to delete the VM from a ESXi ?I tried some commands , it is deleting the VM but it s not removing from inventory.

    -venkat



  • 2.  RE: Delete VM from Data Store

    Posted Aug 12, 2011 06:52 AM

    What exactly are you looking for? Commands on the Command line, vCLI, PowerCLI?

    To delete a VM, you usually right click a VM in the inventory (vSphere Client) and select "Delete from disk" when asked.

    André



  • 3.  RE: Delete VM from Data Store

    Posted Aug 12, 2011 06:57 AM

    HI André

                  I am looking for command Line

    -venkat



  • 4.  RE: Delete VM from Data Store

    Posted Aug 12, 2011 08:34 AM

    delete usign

    rm -rf /vmfs/volumes/<datastore name>/<vmname>/*



  • 5.  RE: Delete VM from Data Store

    Posted Aug 12, 2011 08:51 AM

    $vim-cmd vmsvc/getallvms

    $vim-cmd vmsvc/unregister vmid



  • 6.  RE: Delete VM from Data Store

    Posted Aug 12, 2011 09:57 AM

    Thanks very much,one more clarification;

    I am using one datastore namely linuxds, after removing the datatore i am trying to add the datastore from the same lun. now the datastore name will be linuxds(1). I tried to rename , but it is failed. any idea ?

    -venkat