remove vm from inventory

If a vm is being highlighted in the vpxd logs and the reason for vc to crash then it’s always useful to remove this vm from the database to see if it will allow vc to startup.

This may effect any product on top of VC. eg NSX, VSAN, VRA etc

Backup first.

Shutdown VC

For 6.0
select id from VPX_ENTITY where name=’YM_12_push’;
my VM id was 356
delete from vpx_ds_assignment where entity_id in (356);
delete from vpx_nw_assignment where entity_id in (356);
delete from VPX_COMPUTE_RESOURCE_DAS_VM where VM_ID in (356);
delete from VPX_COMPUTE_RESOURCE_DRS_VM where VM_ID = 356;
delete from VPX_GUEST_DISK where VM_ID in (356);
delete from VPX_VIRTUAL_DEVICE where ID in (356);
delete from VPX_VM_CONFIG_INFO where ID in (356);
delete from VPX_VM_DS_SPACE where VM_ID in (356);
delete from VPX_VM_FILE_LAYOUT_EX where VM_ID in (356);
delete from VPX_VM_FLE_DISK_LAYOUT where VM_ID in (356);
delete from VPX_VM_FLE_FILE_INFO where VM_ID in (356);
delete from VPX_VM_FLE_SNAPSHOT_LAYOUT where VM_ID in (356);
delete from VPX_VM_STATIC_OVERHEAD_MAP where VM_ID in (356);
delete from VPX_VM where ID in (356);
delete from VPX_ENTITY where ID in (356);
delete from vpx_vm where host_id = 356;

 

for 6.5

select id from VPX_ENTITY where name=’YM_12_push’;
my VM id was 356
delete from vpx_ds_assignment where entity_id in (356);
delete from vpx_nw_assignment where entity_id in (356);
delete from VPX_COMPUTE_RESOURCE_DAS_VM where VM_ID in (356);
delete from VPX_COMPUTE_RESOURCE_DRS_VM where VM_ID = 356;
delete from VPX_GUEST_DISK where VM_ID in (356);
delete from VPX_VM_VIRTUAL_DEVICE where ID in (356);
delete from VPX_VM_CONFIG_INFO where ID in (356);
delete from VPX_VM_DS_SPACE where VM_ID in (356);
delete from VPX_VM_FILE_LAYOUT_EX where VM_ID in (356);
delete from VPX_VM_FLE_DISK_LAYOUT where VM_ID in (356);
delete from VPX_VM_FLE_FILE_INFO where VM_ID in (356);
delete from VPX_VM_FLE_SNAPSHOT_LAYOUT where VM_ID in (356);
delete from VPX_VM_STATIC_OVERHEAD_MAP where VM_ID in (356);
delete from VPX_VM where ID in (356);
delete from VPX_ENTITY where ID in (356);
delete from vpx_vm where host_id = 356;

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s