Implement VM analyzer for looking up duplicated, misplaced and lost VMs
RELATED-PROD: PROD-35666
Change-Id: Ie0063bd7a6bbd2c8e276c2bdbd95be1cf1eeddcf
diff --git a/scripts/vm_tracker/collect_data.sh b/scripts/vm_tracker/collect_data.sh
new file mode 100644
index 0000000..59566d5
--- /dev/null
+++ b/scripts/vm_tracker/collect_data.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "Gathering the nova data, this may take a while"
+sudo salt -C "ctl01*" cmd.run ". /root/keystonercv3; nova --debug list --all --limit -1" > nova_vms
+echo "Gathering the virsh data, this may take even longer"
+sudo salt -t 10 -C "cmp*" cmd.run 'bash -c "paste <(virsh list --all --uuid) <(virsh list --all | grep instance)"' > virsh_vms