Virtual Machine Sizes
This can be useful to keep track of what people are creating. Get an index of the Virtual Machine sizes and the free space in the datastores (very important).
[root@esx007 root]# cat size_servers.sh
#!/bin/sh
date > /root/size_servers.txt
echo ——————– >> /root/size_servers.txt
echo Virtualised Servers and Datastores >> /root/size_servers.txt
echo ——————– >> /root/size_servers.txt
ls -1F /vmfs/volumes/ | grep @ | cut -d @ -f 1 | while read dir; do
ls -lah /vmfs/volumes/${dir}/* >> /root/size_servers.txt
done
echo ——————– >> /root/size_servers.txt
echo “Free Space | Percentage Free | Volume” >> /root/size_servers.txt
echo ——————– >> /root/size_servers.txt
/usr/sbin/vdf -h | grep volumes | grep -v local | grep -v “-” | cut -c 34-40,41-44,59-100 >> /root/size_servers.txt









































