Hi, All  

I found that sometimes there is a 'disconnect' between information in SQL 
database and actual state of 'available' computers.

If VCL has a bunch of availabe computers preloaded with an image and I then 
update that image (new image revision), computers are not automatically 
reloaded with newer image revision.  
New reservation will have new image revision, but those available computer will 
still have older image revision and it would be reloaded only if a user makes 
reservation.  
At that time it will take longer to load (ie. ~10min vs <1min for preloaded 
available computer).  

Also in cases when I need to reboot ESXi hosts, all the VMs are not loaded 
automatically. In this case database lists those VMs as available, but they are 
off-line.  

I would like to share the small tool (a .pl script), which syncs available 
computers with actual state of computers (VMs).

I've used peaces of code from utils.php to write it. The script creates reload 
requests for all available computers using the current image and latest image 
revision.
VCLD then caries out requests and reloads computers which are either have older 
image revision or cannot be contacted via SSH (ie. after ESXi reboot).  

I plan to run the script weekly via cron on vcld server to make sure all is in 
sync, as well as after image updates.  
I've tested it and it works fine. .pl is attached.

(I have hardcoded $managementnodeid value in reloadComputer(). Yours could be 
different)

Thanks. ‚Äč
--
Dmitri Chebotarov
Virtual Computing Lab Systems Engineer, TSD - Ent Servers & Messaging
223 Aquia Building, Ffx, MSN: 1B5
Phone: (703) 993-6175
Fax: (703) 993-3404

Attachment: imageReload.pl
Description: Binary data

Reply via email to