Quick user test machines with VMware Fusion

With a new version of Office to deploy to the end users at my org I found myself needing to rebuild the customized Docks that go along with the imaging configurations. Back in the early days of using the Casper Suite here I would use a physical machine, image it, throw in all the software I would need, then create unique docks for each configuration. Because that's kind of an annoying process, and because disposable VMs are much better for this kind of thing, I tried to think up a way to get VMs I could spin up, create a dock, then trash to quickly make the individual docks. 

Since I already had a NetBoot server set up with AutoCasperNBI I figured I could find a way to create quick VMs of the different configurations, then have the JSS throw VMware Tools and Composer on the VM so that as soon as I log in I'm ready to build the dock and capture it with Composer. It's actually pretty simple if you have the right things in place.

  • VMware Fusion of some flavor on your machine (or workstation of choice) 
  • A NetBoot server set up and scoped to the IP range that your host machine resides on 
  • Imaging configurations of some variety in your JSS

  • Create policies in JSS to deploy VMware Tools and Composer to machines that are a VM model. Alternately, create Imaging Configurations that include those installers meant to build your user test VMs.
  • Create custom VM in VMware Fusion that boots to the network for Netboot, then build VM.
  • Once VM is created, use pre-installed Composer to build Dock (or whatever else you need to build), with VMware Tools already in place for window adjustment, drag-and-drop with host machine, etc.


(I'm getting kind of stuffy with this walkthrough, aren't I? Don't worry, I'll touch on getting your prereqs and working them into this workflow in a logical order.)

Creating a VMware Tools and utilities installers for your NetBooted Test VM

1. Assuming VMware Fusion is on your machine, create a new VM for yourself. Or if you already have a Mac OS X VM, boot into it. Or even NetBoot (instructions below). Either way you get there, get a VM up and going. Then, have it prompt to install VMware Tools. This will mount a disc image to your VM with a VMware Tools installer inside.

Grab the Install VMware Tools installer and save a copy somewhere handy. I usually drag it to my host machine.

2. On your saved Install VMware Tools installer, right-click and Show Contents. Go into the Resources folder and you'll find something called VMware Tools.pkg. This is the actual VMware Tools installer.

Take that installer and drag it into Casper Admin to upload it to your JSS.

3. Next, create an installer for Composer (or whatever else you need in the testing VM for your purposes) and upload it. I created this Composer installer just by dragging Composer into Packages.

4. Now that you have your helper apps, scope them to machines in your imaging workflow. If you use a standard workflow, you'll want to throw them in an imaging configuration designed specifically for your VMs. If you do something a bit more modular/thin (we do policy-based imaging) then create policies that follow your workflow that are scoped to a Smart Group made up of only VMware VMs (or whatever other scope makes the most sense for your imaging).

Our imaging workflow is policy-based, so these are what install the packages on the VM during imaging.

Using your NetBoot to make a test VM

1. Open up VMware Fusion and create a new Custom VM.

2. Pick an OS (this is more for show than anything else, but you gotta do what you gotta do).

3. Give it a useful name.

4. When you get to the final dialogue, make sure to select Customize Settings, so that you can configure RAM, HD, and for NetBooting in particular, the internet connection and startup disk.

5. Once the VM file is created, the Settings dialogue should open up. Of key interest in this case (at least because of how my environment is) are the Network Adapter settings and Startup Disk settings. You may also want to increase the RAM and HD size, depending on what you are planning on doing with the VM. Since lately it's been dock building for me, I tend to keep the VM pretty small.

Depending on your host, your Network Adapter settings might vary. I work off of a display, so I use the display ethernet.

To NetBoot the VM, you'll need to select the Ethernet/Adapter as the startup disk.

6. Now you can boot into your NetBoot and start building your VM. Once you turn on the VM, you should see it boot on the network.

It'll log into your NetBoot, and if you use AutoCasperNBI you should go right into Casper Imaging and get your VM built.

7. While it does the block copy, go back into the VM's settings and change the Startup Disk back to the main HD. If you don't do this, you'll just keep rebooting into your NetBoot over and over again. Not ideal.

If you do that, once Casper Imaging is done cleaning house it'll reboot to the VM to finish the imaging process.

7. The beautiful thing about installing VMware Tools in advance is once your VM is finished building and ready to log into, you can adjust the screen size and stuff. You'll also be able to drag and drop between you VM and host, making it easy to build what you need and copy it to your host to upload to Casper Admin or do whatever else.

8. You can then test or build whatever you need to on that test user machine. In this case, I'm taking the default dock shown above and building a custom dock for the users that would get this build.

You can wash-rinse-repeat with the help of VMware. It's quick, hands-off, and a handy way to get a user environment created that you can use for developing, testing, and poking at with a stick. You know how it goes.

Did you find this post useful? Leave me a tip!


Post a Comment

Thanks for commenting! Don't forget to follow along on Bloglovin and on Twitter at @emilyooo!