meta data de esta página
  •  

¡Esta es una revisión vieja del documento!


Recientemente he tenido un problema al intentar eliminar un host del vcenter al que previamente le había cambiado los permisos.

Primero intente eliminar el host desde el PowerCli http://www.vmware.com/support/developer/PowerCLI/index.html ejecutando:

Set-ExecutionPolicy RemoteSigned
Connect-VIServer -Server <ip o nombre del vcenter>  -User <user_name> -Password <password>
Remove-VMHost host.red -Confirm:$false

Como había cambiado los permisos me dio un error por falta de ellos para eliminar la máquina. Ante ello sólo quedaba eliminar el host manualmente de la base de datos del vcenter

Para ello hay que ejecutar los siguientes pasos:

  1. Parar el servicio Vmware VirtualCenter

<code sql> use vim_vcdb select ID from VPX_ENTITY where name ='host.red.local';

delete from vpx_ds_assignment where entity_id in (select id from vpx_vm where host_id = 3761);

delete from vpx_nw_assignment where entity_id in (select id from vpx_vm where host_id = 3761);

select id from vpx_vm where host_id = 3761;

delete from vpx_vm where host_id = 3761;

delete from vpx_entity where id in (724,717,4837,5259);

delete from vpx_host where id = 3761;

delete from vpx_entity where id = 3761;

delete from vpx_entity where parent_id = 3761;

delete from vpx_entity where id = 3761;

select * from VPX_ENTITY where name like '%vpre%';

select * from vpx_vm;

Referencias