I never been much of a scripter before. Well I decided to change that. I know most of you are not unix people but, I just had to share my latest creation. First a bit of info. So I work testing network equipment. We have racks of computer in a lab. We also use vmware. I wanted a way to slap a unix OS on these machines. A while ago I found away to have the machines boot over the network and start installing a OS. I can do this both for windows and linux. The only thing I need to do is change some entries in the MS DHCP server we have and then tell the client to PXE boot. Well we use VMware as well. Usually I
1. Ghost a linux image that has VMware already running
2. Modify the image
3. Then create the VMs
4. Boot the VMs to give them they're MAC address
5. Add the MAC address to the MS DHCP server with the right options
6. Reboot the VMs
So I wanted to script as much as this as possible. So my script requires a file with a lit of IPs for the machine. What the script does
1. Create 16 Debian VMs
2. Power the VMs on (to generate the MAC address)
3. Power off the VMs
4. Upgrade the VM config file
5. Get all of the MAC addresses and create a batch file that has the proper netsh.exe command to update the DHCP Server (I have to copy this to the DHCP Server and run it)
6.Get a list of the VMIDs (internal reference number for the VM)
7.Make it so all the VMs start on a reboot of the vmware server
8.Create a power on/off all vm script
So I would then copy the bat file to the MS DHCP server and run it. Then run the poweron all script. The Linux OS installs over the network from a local mirror in about 15 minutes for all VMs. I then run the poweroff script andthen the poweron script again. Presto I have 16 Debian Linux Virtual Machines. I'll post the script in a follow up post
3.
1. Ghost a linux image that has VMware already running
2. Modify the image
3. Then create the VMs
4. Boot the VMs to give them they're MAC address
5. Add the MAC address to the MS DHCP server with the right options
6. Reboot the VMs
So I wanted to script as much as this as possible. So my script requires a file with a lit of IPs for the machine. What the script does
1. Create 16 Debian VMs
2. Power the VMs on (to generate the MAC address)
3. Power off the VMs
4. Upgrade the VM config file
5. Get all of the MAC addresses and create a batch file that has the proper netsh.exe command to update the DHCP Server (I have to copy this to the DHCP Server and run it)
6.Get a list of the VMIDs (internal reference number for the VM)
7.Make it so all the VMs start on a reboot of the vmware server
8.Create a power on/off all vm script
So I would then copy the bat file to the MS DHCP server and run it. Then run the poweron all script. The Linux OS installs over the network from a local mirror in about 15 minutes for all VMs. I then run the poweroff script andthen the poweron script again. Presto I have 16 Debian Linux Virtual Machines. I'll post the script in a follow up post
3.
Comment