Home > Command Line > Virtual Machine Creation

Virtual Machine Creation

January 20th, 2009

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

VN:F [1.9.11_1134]
Rate this post:
Rating: 0.0/10 (0 votes cast)
Virtual Machine Creation, 10.0 out of 10 based on 1 rating

Command Line ,

  1. No comments yet.
  1. No trackbacks yet.



This site is not affiliated or sponsored in anyway by NetApp or any other company mentioned within.

Bad Behavior has blocked 1184 access attempts in the last 7 days.

© 2009-2012 Chris Kranz All Rights Reserved
This site is not affiliated or sponsored in anyway by NetApp or any other company mentioned within.