Hi all,
I'm a little bit disappointed with my big mistake : I've deleted the LUN mapped to our ESX 4.0 infra.
"fortunaly", there was only 1 usefull VM.
The issue is tha Datastore is still in Datastore list, VMs are still in running status and it block the Datastore Management (can't delete Datastore in cause of Vm status).
LUN mapping from Netapp can't be done because LUN has been deleted on Netapp infra
I want to setVMs as status "powerred off"to be able to remove Datastore.
I've tried several things.
root@blvsrvesx38 ~]# vim-cmd vmsvc/power.getstate 704
Retrieved runtime info
Powered on
[root@blvsrvesx38 ~]# vim-cmd vmsvc/power.off 704
Powering off VM:
(vim.fault.TaskInProgress) {
dynamicType = <unset>,
faultCause = (vmodl.MethodFault) null,
task = 'vim.Task:haTask-704-vim.VirtualMachine.powerOff-5320446',
msg = "Another task is already in progress.",
}
THEN
[root@blvsrvesx38 ~]# vim-cmd vmsvc/unregister 704
(vim.fault.InvalidPowerState) {
dynamicType = <unset>,
faultCause = (vmodl.MethodFault) null,
requestedState = "poweredOff",
existingState = "poweredOn",
msg = "The attempted operation cannot be performed in the current state (Powered On).",
}
Also via sql request following this KB: VMware KB: Unable to remove a datastore from the vCenter Server 4.x / 5.x inventory
select ID from VPX_ENTITY where name ='Datastore44';
returns no result
Is there an other way to remove VMs and Datastore Enty ? Thanks for you help !