Using vfuse to create NetBoot-ready VMware VMs
When building virtual machines for testing, my preferred method is to leverage VMware Fusion’s NetBoot support to NetBoot to a DeployStudio server and run workflows. The process to build a NetBoot-ready VM through VMware Fusion looks like this:
1. Open VMware Fusion
2. In the Select the Installation Method window, choose Create a custom virtual machine and then click the Continue button.
3. In the Choose Operating System window, set OS as appropriate then click the Continue button.
4. In the Finish window, select Customize Settings.
5. Save the VM file in a convenient location.
6. In your VM settings, select Network Adapter.
7. In the Network Adapter settings, select Autodetect under Bridged Networking.
At that point, you can also adjust your RAM and processor settings but that’s up to you.
The VM is now configured to be NetBoot-ready, where it’s set up to run a particular macOS version but has a formatted and completely empty boot drive.
This setup process has been a largely manual process involving a lot of clicking in the VMware Fusion user interface and I’ve wanted to automate this for a while. Thanks to some recent changes which my colleague Joe Chilcote made to his vfuse VM creation tool, it’s now possible to automate the setup of a NetBoot-ready VM in Fusion with the following configurable options:
- OS version
- VM boot drive size
For more details, see below the jump.
When these NetBoot-related values are referenced in a template, it sets up a VM with the following characteristics:
- Formatted and empty boot drive of the specified size
- VM’s OS setting is set to the specified OS version
- VM’s Network Adapter setting is automatically set to Bridged Networking
To run vfuse, have it reference a template and output the new VM to a specific directory, you can run the command shown below with root privileges:
vfuse -t /path/to/vfuse_templates/template_name_here.json -o /path/to/VMware_VM_directory
Once finished, the new VM should be in the specified output directory.
To give an idea what the templates for various versions of OS X and macOS would look like, please see below for 10.7.x – 10.12.x templates:
vfuse template for NetBoot-ready 10.7.x virtual machine
vfuse template for NetBoot-ready 10.8.x virtual machine
vfuse template for NetBoot-ready 10.9.x virtual machine
vfuse template for NetBoot-ready 10.10.x virtual machine
vfuse template for NetBoot-ready 10.11.x virtual machine
vfuse template for NetBoot-ready 10.12.x virtual machine