Solved

Orphaned vmdisks


Badge +3
Hi all,

Recently I discovered a vm placed in the wrong storage container. It was incorrectly placed in the "NutanixManagementShare" container. So I did an image of the vm and placed it in the right container using this KB: https://portal.nutanix.com/#/page/kbs/details?targetId=kA032000000TTqoCAG

Using $ nfs_ls /NutanixManagementShare/.acropolis/vmdisk/, I saw another vmdisks in the NutanixManagementShare, but I cannot correlate them with the vms.

So I ran this script to get all containers used by vm disks:

for vm_name in `acli vm.list | grep -v 'VM' | awk '{print $1}'`;
do
echo $vm_name;
acli vm.disk_get $vm_name | grep container_uuid
done

I see that all vm disks are using the right container, except that vm I alredy knew (it should be deleted). But what about the "orphaned" vmdisks into /NutanixManagementShare/.acropolis/vmdisk? Can they be securelly deleted?
icon

Best answer by DASR 18 September 2018, 19:38

Command to see all vmdisc in a container:
$ vdisk_config_printer -container_id=container_id

View original
This topic has been closed for comments

2 replies

Badge +3
Command to see all vmdisc in a container:
$ vdisk_config_printer -container_id=container_id
Userlevel 7
Badge +35
Thanks for sharing @DASR 👍