Virtual Machine Creation
This script can help track when a VM was created. I’m not sure if it’s technical correct however as it works on the create time of a .vmsd file. Anyway, the principles are there, and should do the job.
[root@esx007 root]# cat vm_creation.sh
#!/bin/sh
date > /root/vm_creation.txt
echo ——————– >> /root/vm_creation.txt
echo Virtualised Server Creation >> /root/vm_creation.txt
echo ——————– >> /root/vm_creation.txt
ls -1F /vmfs/volumes/ | grep @ | cut -d @ -f 1 | while read dir; do
find /vmfs/volumes/${dir}/ -name “*.vmsd” | grep -v “.snapshot” | while read var; do
ls -la “$var” | cut -c 43-50,71-180 >> /root/vm_creation.txt
done;
done









































