Archive

Archive for the ‘VMware’ Category

Setting a macOS VM to automatically boot to Recovery HD using VMware Fusion

August 1, 2017 Leave a comment

When testing various security functions, like System Integrity Protection or High Sierra’s new kernel extension functionality, it’s often useful to be able to boot a macOS virtual machine (VM) into the Recovery environment. However, it can be challenging to select the VM and hold down Command+R in time to boot to the Recovery environment. This can result in having to try several or more times before you can successfully boot the VM to Recovery HD.

Fortunately, VMware has a setting that enables a forced boot to Recovery HD. For more details, please see below the jump.

Read more…

VMware Fusion 8.5.8 adds Apple File System (APFS) support

June 27, 2017 3 comments

VMware recently released VMware Fusion 8.5.8, which according to the release notes includes the following:

Screen Shot 2017 06 26 at 10 40 28 PM

Another improvement which is not mentioned in the release notes is that VMware Fusion now includes support for the following:

  • Using the macOS High Sierra beta installer as a valid installation source
  • Booting macOS VMs from Apple File System (APFS) formatted drives.

For more details, see below the jump.

Read more…

Building VMs on ESXi using esxi_macos_vm_creation.sh

April 11, 2017 1 comment

As part of my testing workflow, I’ve been using VMs running on a ESXi server running ESXi 6.5. To help me quickly build those VMs, I have been using a script named esxi_macos_vm_creation.sh for building VMs. This script is forked from Tamas Piros’s auto-create script for standing up Linux VMs on free ESXi:

https://github.com/tpiros/auto-create

My fork of the auto-create script is designed to create and configure virtual machines with Apple operating systems as the guest OS, hosted on a VMware ESXi server running on Apple hardware. The script assumes that the virtual machines are built using copied VMDK disk files, where the VMDK files are generated by AutoDMG and vfuse. For more details, see below the jump.

Read more…

Expanding partition size in an ESXi-hosted macOS VM

April 9, 2017 Leave a comment

As part of working on a project recently, I ran into an unexpected problem with ESXi-hosted Mac VMs. For these VMs, I was creating VMDK files from AutoDMG-generated disk images, using vfuse to convert the disk image into a VM with ESXi-compatible VMDK disk image files.

My workflow looked like this:

1. Create disk image using AutoDMG.
2. Use vfuse to create VMDK files using a command similar to the one shown below:

sudo vfuse -i /path/to/autodmg_created_disk_image_here --esx

Screen Shot 2017 04 09 at 12 08 22 PM

3. Upload the VMDK files to a convenient location on my ESXi server
4. Set up a new VM, using copies of uploaded VMDK files for the VM boot disk.
5. Resize the new VM to the desired size using VMware’s vmkfstools utility.
6. Start up the VM.

After logging in, I ran the following command to enable macOS to recognize and use the unallocated space from the VM resizing:

diskutil resizeVolume / R

Normally, this command is able to do a live re-sizing of the boot partition to use all available unallocated space. However, this time the re-sizing process failed and the following error was displayed:

Screen Shot 2017 04 09 at 10 20 53 AM

Screen Shot 2017 04 09 at 10 21 37 AM

How to fix this? For more details, see below the jump.

Read more…

Creating macOS installer disk images for VMware Fusion and ESXi with create_macos_vm_install_dmg

March 30, 2017 Leave a comment

I’ve had a tool available for a while named create_vmware_osx_install_dmg, but it looks like it has reached the end of the road with macOS 10.12.3. The reason for this is because macOS 10.12.4 has introduced a change that prevents the addition of third-party packages to the OS installer. create_vmware_osx_install_dmg uses the addition of a third-party installer package, so unfortunately this tool cannot be used to generate 10.12.4 or later OS installers.

That said, I still want to be able to create macOS installer disk images for VMware Fusion and ESXi, so I’ve forked create_vmware_osx_install_dmg into a new script named create_macos_vm_install_dmg. create_macos_vm_install_dmg will generate stock OS installer disk images for the following OS versions:

  • Mac OS X 10.7.x
  • OS X 10.8.x
  • OS X 10.9.x
  • OS X 10.10.x
  • OS X 10.11.x
  • OS X 10.12.x

This script does not use a third-party package, so it is able to build a macOS 10.12.4 installer disk image. For more details, see below the jump.

Read more…

Resizing a virtual machine’s boot drive to use all available space

March 3, 2017 2 comments

Every so often, it’s necessary to resize the boot drive of an existing virtual machine. The process of resizing the VM’s boot disk from outside the VM is usually pretty straightforward:

1. Shut down the VM
2. Go into the VM’s drive settings

Screen Shot 2017 03 02 at 5 02 10 PM

3. Resize it to the desired size

Screen Shot 2017 03 02 at 5 02 23 PM

Screen Shot 2017 03 02 at 5 05 45 PM

4. Power on the VM.

However, when the VM boots up, the disk space used by the OS won’t have changed.

Screen Shot 2017 03 02 at 5 07 55 PM

However, the OS can detect that there is available unallocated disk space that it isn’t using.

Screen Shot 2017 03 02 at 5 08 58 PM

Fortunately, this is a correctable condition and the fix can be applied without needing to shut down the VM or boot from another drive. For more details, see below the jump.

Read more…

Downloading older OS installers on incompatible hardware using VMs

February 21, 2017 2 comments

A lot of Mac admins need to test software in their environment against both the shipping version of macOS and older versions of OS X. However, getting older OS installers from the Mac App Store (MAS) can be problematic if the Mac you’re using isn’t able to run the older OS as its own operating system. If the Mac you’re using isn’t itself able to run the older OS, a request to download the OS installer from the MAS will result in an error message like the one shown below.

Screen Shot 2017 02 21 at 1 01 14 PM

If you’re in this situation, but also have VMware Fusion or a similar virtualization solution available, there is a way to download the desired older OS installer using a VM running the shipping version of macOS. For more details, see below the jump.

Read more…

Categories: Mac OS X, macOS, VMware
%d bloggers like this: