Fusion on macOS Sierra Hosts

In my previous post, I had written a solution to get the new macOS 10.12 Sierra running in a virtual machine on Fusion 8.

In this post, I’ll talk about running a VM with Fusion 8 on a macOS 10.12 host.

This will be a pretty short post, because by and large things work.

My setup:

  • MacBookPro10,1
  • 16GB RAM
  • GeForce GT 650M graphics
  • OS X 10.11 installed, upgraded to macOS 10.12 DP
  • Fusion 8.1.1 installed prior to upgrading host

 

The one exception I’ve found thus far is an ‘Internal Error’ crash of Fusion itself.

It’s kind of a big exception tho since VM’s don’t run… HOWEVER there is a simple (but somewhat unfortunate) fix.

Taking a look at the vmware.log I noticed it crash when trying to run some GPU-specific functions that aren’t being handled properly by Fusion.

2016-06-14T23:19:35.256-08:00| mks| I125: MKS-SWB: Number of MKSWindows changed: 1 rendering MKSWindow(s) of total 2.
2016-06-14T23:19:35.256-08:00| svga| W115: GLHostMacOS: Failed to create IOSurface texture 2D for FBO of MKSWindow, error 0x2718
2016-06-14T23:19:35.266-08:00| svga| W115: GLHostMacOS: Failed to create IOSurface texture 2D for FBO of MKSWindow, error 0x2718
2016-06-14T23:19:35.277-08:00| svga| W115: GLHostMacOS: Failed to create IOSurface texture 2D for FBO of MKSWindow, error 0x2718

To isolate this, I disabled 3D Acceleration in the VM’s settings

3d Acceleration

After doing so, I had no issues booting up my VM’s, regardless of the Guest OS type.

We’ll have to fix this of course, but for now I’m investigating if there’s still a way we can use 3D accelerated graphics with macOS hosts. Stay tuned for that!

 

See? Short and sweet, just like I said 😉

 

Installing the new macOS 10.12 Sierra ‘Developer Preview’ on VMware Fusion 8

 

It’s that time of year again! With #WWDC2016 in full swing, Apple has graced us with an insider look at the next big OS release for the newly renamed macOS, dubbed Sierra.

By default, it doesn’t work in Fusion as a virtual machine the same way users would expect by simply dragging the installer .app onto Fusion. (We’re working on it 😉

Luckily, we can use some tools built into OS X El Capitan (and earlier) to get this working in a VM.

At a high level, we need a blank OS X 10.11 (custom) VM, and we need to leverage command line tools (with links to their respective docs):

  • Apple’s ‘createinstallmedia‘ CLI tool which is bundled with the “Install 10.12 Developer Preview.app”
  • VMware’s ‘vmware-rawdiskCreator‘ tool to create the actual disk where we will be installing to.

First, you’ll need to have a blank, custom VM.

This is straightforward, but I’ll walk through just so you have it.

  • From Fusion go File > New
  • From the ‘New VM’ wizard we would choose ‘Create Custom VM’

new-vm-creation-wiz-custom

  • Choose the OS version OS X 10.11
  • Choose ‘Create New Disk
  • Save the VM wherever you please
  • I customized it to add more RAM, bumping it to 4GB (4096MB) just to be on the safe side.

When you have your new blank VM, we now need to do 3 things:

  1. Create the installation media “sparse image”
  2. Copy contents of the installer into the new installation media sparse image
  3. Create a .vmdk which ‘points’ to the installation media sparse image (now filled with the contents of the installer) that we just created.

So to do that we start with Mac’s Disk Utility app. You’ll find it in your /Applications/Utilities folder (or do like I do and hit cmd-space and search Spotlight for ALL THE THINGS… 😉

In Disk Utility go File > New Image > Blank Image… and use the settings I have in the image below (call the file whatever you like, but make sure it has the following:

disk-util-macOS_10.12

  • Size = 6GB (absolutely not smaller)
  • Format = OS X Extended (Journaled)
  • Encryption = none
  • Partition = Single Partition – GUID Partition Mac
  • Image Format = sparse disk image

This creates the blank slate that we will then copy the contents of the “Install 10.12 Developer Preview.app” into using ‘createinstallimage’ utility.

It should ‘mount’ the new image we just created, but if it’s not there you can mount it with Disk Utility or from the command line. Mine mounted automatically.

Once it’s mounted we can copy the contents of our installation app into the new sparse image.

For this, we jump down to the command line and run some commands.

 

First, let’s create our install media.

Run the following command (all one line):

sudo /Applications/Install\ 10.12\ Developer\ Preview.app/Contents/Resources/createinstallmedia --volume /Volumes/macOS-10.12_DP --applicationpath /Applications/Install\ 10.12\ Developer\ Preview.app

I named the thing I created with Disk Utility ‘macOS-10.12_DP’ as you can see in the ‘Name’ field in the image above.

createinstallmedia image

Easy peasy… contents copied, new installation media is created with the sparse image we just created, filled with the contents of the installer .app we got from Apple.

Now, let’s make sure the host Mac’s disk layout is okay with “diskutil list“:

(for clarity, $ is the prompt at the terminal, you do not need to type it)

$ diskutil list

It outputs something like the image below:

diskutil list

We can see that I have the ‘Install 10.12 Developer Preview’ mounted as /dev/disk2s2. We need this device id because this is the prepared installation media that we’ll be installing from in the blank virtual machine we created earlier, and the disk number may change depending on what you have mounted on your system.

Now we use VMware’s ‘vmware-rawdiskCreator’ tool to create a .vmdk based on the sparse image we created.

The syntax is as follows:

<path to vmware-rawdiskCreator> create <device id> <partition id> <path to where we want the .vmdk to be saved> <bus type>

So a few things about that so we understand what’s happening:

  • vmware-rawdiskCreator is located within the Fusion app bundle itself, so we’ll point to that
  • create is the vmware-rawdiskCreator function that will create a new “raw” disk
  • <device id> is the /dev/disk2 that we saw earlier, yours may be different if you have other disks mounted.
  • <partition id> is 2 because it’s the 3rd partition on the ‘device’, and numbering starts at 0 (so 0 = first, 1 = second…)
  • We tell it where we want it to be saved, and in our case it will be within the VM bundle that we created at the beginning
  • <bus type> we choose lsilogic so that it behaves like a CD-ROM.

So, for me the command is as follows (all one line):

$ /Applications/VMware\ Fusion.app/Contents/Library/vmware-rawdiskCreator create /dev/disk2 2 ~/Documents/Virtual\ Machines.localized/macOS_10.12.vmwarevm/macOS_installationmedia lsilogic

It should take a few seconds to make the new .vmdk.

 

Okay, breathe… we are about to get the actual install started.

Because Fusion doesn’t support mounting raw disks using the UI, we just have to add it to the configuration file manually.

In the Virtual Machine Library window, right-click your newly created OS X 10.11 VM.

If you hold down the ‘Option’ key you’ll notice some options change… including ‘Edit config file in a text editor’ (I couldn’t take a screenshot due to the need for multiple key presses).

With the config file open in TextEdit, paste the following either at the bottom or with the other SATA device to keep them together (if you’re a little ocd about it like I am 😉

sata0:2.present = "TRUE" 
sata0:2.fileName = "macOS_installationmedia.vmdk" 
sata0:2.deviceType = "rawDisk" 
suspend.disabled = "TRUE"

Notice the file we’re pointing at is ‘macOS_installationmedia.vmdk’… that’s the one we just created with our vmware-rawdiskCreator tool, and it’s a relative path meaning it’s in the same folder as the config file (.vmx) itself.

Close the document (if you’re using TextEdit it will save automatically).

Now all that’s left is to press ‘Play’ on the VM and go through the installation!

dp-10.12-installing

 

It’s a bit of hack, but we’re working on making it just as seamless as installing current and earlier versions of OS X on Fusion.

To recap, we did the following:

  1. Downloaded the macOS 10.12 Developer Preview
  2. Created a blank VM with OS X 10.11 as the type
  3. Created a sparse disk for the install media
  4. Copied the install media to the sparse disk
  5. Used vmware-rawdiskCreator to create a .vmdk based on the sparse disk with the installation media
  6. Boot and install

Once the installation is done you can delete the extra hard disk because it’s no longer needed, and you can’t suspend the VM while a raw disk is attached.

Hope that helps folks looking to try the latest that Apple has to offer!

Let me know in the comments how that’s working out for you, if you have any suggestions, or need clarity on anything I’ve written here!

 

 

*** Update***

Thanks commenters for the feedback!

a few things…

Reader nutmeg noted the following, which I totally agree with:

One minor nitpick After installation, one should shut down the VM (via macOS Shutdown option), then re-edit the VM configuration file and remove 4-line entries:

sata0:2.present = “TRUE”
sata0:2.fileName = “macOS_installationmedia.vmdk”
sata0:2.deviceType = “rawDisk”
suspend.disabled = “TRUE”

If you don’t delete these lines you end up with weird ‘bootcamp’ related errors… (we use rawdiskcreator for bootcamp installs, naturally)… And because it’s a raw-disk it can’t be deleted from the UI (because that would break a bootcamp VM so we disallow that).

Reader Leslie notes something that I often take for granted when posting technical instructions about command line operations:

To everyone getting “Unable to copy the source files (…) ” – just look into vmwarevm content and delete macOS_installationmedia (both of them) file from there then try to create raw disk again! And please do not copy paths from here, just drag n’drop files from Finder in order to get it. And it will work for sure. I am living proof 🙂

Thanks for the feedback, friends!

Checking out El Capitan GM Candidate on Fusion 8

Apple today was kind enough to reward it’s loyal beta testers with early access to the GM Candidate build of OS X El Capitan.

El-Cap

In an email, they advise the following to install:

[…] to install the GM Candidate. Go to your Purchased tab in the Mac App Store and click the Download button next to OS X El Capitan GM Candidate. When your download finishes, the installer will automatically launch. Follow the onscreen instructions to complete installation.

And that’s fine and dandy and all if you want to install that on your Mac. But what if you just want to try it out without taking the full plunge on your main machine?

Answer? VMware Fusion 8 and Fusion 8 Pro!

Rather than clicking the ‘Continue’ button and upgrading your host Mac, you can quit the installer from the Menu Bar, or with the keyboard shortcut Command + Q.

Once quit, the installer leaves a just-over-6GB installation file in the /Applications folder.

Before we can install in Fusion however, there’s a bit of a gotcha that Apple surprised us with in regards to their installer.  The installer will hang with a white apple and a black background when the progress bar is almost complete. We’ll be releasing a patch, but for now we have a fix.

This quick workaround comes from one of our lead developers, Michael Udaltsov, mentioned on the forums:

To work around the problem, you have to replace:

“VMware Fusion.app/Contents/Library/Create Mavericks Installer.tool”

with a modified version available here.

Once downloaded, unzip the file and you’re left with a ‘Create Mavericks Installer.tool’ file. We’ll drag that to where it needs to go.

First, we have to get into the VMware Fusion Package Contents by right-clicking (or control+click) the Fusion icon in the /Applications folder and selecting ‘Show Package Contents.

packge contents

It’s a folder like any other, so get into the Contents > Library folder…

fusion-lib-bath

Drag the tool we unzipped over the old one…

create-mavericks-installer

And get some warnings when we do it, naturally since we’re messing around in the /Applications folder…

overwrite-request
Yes, you want to replace!
authenticate
Followed by your password…

And with that done, we can get to installing El Cap!

To begin, in the Virtual Machine Library window, just click the ‘+’ button to add a new VM:

file-new-sm

And then drag the  Installation image from Finder onto Fusion

Fusion-8-Drag-ElCap-install

Once the installer kicks in, it’s pretty much auto-pilot until the standard Apple first boot stuff.

osx-installing

osx-first-boot

Click through the first few steps of the installer and the rest is hands off until you’re asked to sign into iCloud.

If you have your host system backed up with Time Machine somewhere, you could even use that to make a copy of your host Mac into the VM, so you can really check if your apps and workflows are going to continue to hold up with Apple’s new OS.

transfer-from-mac

(Of course, you need sufficient disk space for that, so be mindful!)

When the installation is all done and you’re at the desktop, remember to install VMware Tools for optimal performance.

install-tools-el-cap

Click through the tools installer and reboot the VM.

And there you have it! The latest and greatest from Apple running in the latest and greatest from VMware!

Windows 10 and VMware Fusion

 

You may have caught wind of the news that Windows 10 is here, and for many folks who want to install it in a virtual machine, VMware Fusion is the obvious choice.

I’ve been using it for a few days now, and must admit so far I’m quite pleased with it.  I’ve been even playing with Cortana in the background with my VM just minimized while I work away on the Mac. The ‘Hey Cortana’ feature works flawlessly with Fusion as far as I can test.  I even asked her to sing me a song while I was working away and while her singing voice isn’t bad at all, her choice of Danny Boy is a little odd if you ask me.

I’ve been using the Fusion 2015 Tech Preview lately, but Fusion 7 was working just fine with all the Insider Preview of Windows 10 if you just choose Windows 8.1 as the Guest OS type.

Either way, it’s a really nice OS and it runs at incredibly well in Fusion. I’m using a MacBook Pro mid-2012 model with 16GB of RAM overall and I give it 2 vCPUs and 4GB of RAM, and maybe that’s even overkill for what I use it for. I’d say it feels leaner and more responsive overall than every Microsoft OS since XP and I feel like they finally got rid of all the unnecessary cruft and bloat that was holding them back.

There is however this upgrade problem that a number users are hitting tho which currently affects most hypervisors. Tho I haven’t heard of any users with HyperV having this problem, <sarcasm> I can only presume there are no HyperV users interested in upgrading to Windows 10. </sarcasm> Draw your own conclusions, but it is what it is.

Luckily, there’s actually a REALLY EASY workaround.

Rather than use the upgrade method within the VM, download the .ISO and mount it to Fusion to perform the upgrade.

Straight from the source!

Microsoft makes the Windows 10 ISO file available for the world to download so you can burn to disk or use as a VM. Rather than a single link, they have this process to get the right version, and actually works really well. (From Safari on my Mac, no less).  No funky windows.exe thing to use to download and create the .iso with, this is a full ISO from Microsoft.com with Win10_English_x64.iso as the filename.

Fusion 7 + Windows 8.1 + Windows10.iso = Upgrade!

First things first as always before ding major upgrades, TAKE A SNAPSHOT! This way you make sure to have a safe roll back point in case something goes wrong, you don’t like it, or it breaks all your other Windows apps or something.

Here we go!
Here we go!

After the installation assistant greeted me, things started moving along just fine.

The installation begins!
The installation begins!

The installation proceeds basically unattended, which is nice. Took about 10 minutes on my MacBook Pro (mid-2012).

Upgrading... here we go!
Upgrading… here we go!

 

Once the installation finished, I ran through the personalization walkthrough which I highly recommend to turn off all the ‘send everything I type to Microsoft’ features… yikes.

So that’s it!  You can use that same .iso file from Microsoft to install multiple copies as needed, or just use the clone feature of Fusion Pro to save yourself the hassle.

 

 

 

## Update
I had comments muted for spamming reasons, but I tweaked it and it should be only legit folks… sorry I missed all your comments I’ll try and respond, thanks everyone for reading!

Migrate a VMware Fusion VM to vCloud Hybrid Service

Hiyas!

I thought I’d get creative with my blog here and try and combine 2 worlds that I live in…

By day I am a Technical Marketing Manager for VMware Cloud Services, and by night I’m a VMware Fusion aficionado, among other things.  It just seems natural that I try and bring those two worlds together from time to time.

So, you may have heard that my team at VMware launched this “cloud thing” that we lovingly call ‘vCloud Hybrid Service’… It’s pretty exciting, and the way we built it gives instant value to existing VMware customers by allowing them to easily migrate their VM’s to the cloud without having to completely rebuild them, or learn a whole new paradigm of how to do IT and deliver infrastructure.

In that vein, the service supports any workload that runs on VMware hypervisor technology, from ESXi/vSphere, all the way up to Fusion and Workstation, making it pretty easy to build a VM locally and then ‘push’ that to the Cloud with minimal tweaking.

In this post, what I’ll do is describe the process to migrate a VMware Fusion based Virtual Machine to vCloud Hybrid Service (‘vCHS’ for short).  There are some subtle differences between how a Fusion VM works and how a VM that’s living in vCHS needs to behave.

I’ll probably follow up with how to do this using VMware Workstation, but the process is so simple there it is almost trivial for anyone using Workstation who is familiar with vSphere. (i.e. export as OVF… upload to cloud… and done!)

So, cool… but… Why do this?

There’s several use-cases here.  The first that comes to my mind is to develop an app locally on a VM, then push to the Cloud to make it public… Maybe you want a cloud-backup of an important VM.  Maybe you create a standard template and then just clone it in the Cloud.  There’s many reasons,  but for me it’s good enough to say ‘Because I Can’ =)

So with that said, let’s get started!

To start off I created a VM using Fusion. In this case it was a simple Ubuntu 12.04 LTS VM after a fresh install. (I also installed WordPress using apt-get, just for kicks). I was sure to install VMware Tools while it’s still in Fusion, as Tools is the same regardless of what the host is, just some features are enabled or disabled depending on that host.

FUUUUUUUUUUsionSo, here’s my VM, with Tools installed, running in Fusion… Fancy…

  First thing we do is power the VM off, naturally. Once the VM is powered off, we need to adjust some of it’s settings while it’s still in Fusion to remove the components which won’t work in The Cloud.

56Firstly, let’s turn off the CD drive

53Second, we’ll disable any encryption.  It’s best if the VM was never encrypted in the first place, but if it is encrypted, it will work if you decrypt it.

 

58Turn off 3D Graphics… cuz, well, clouds don’t have that… (whether they should is a different matter!)

59Shared Folders should be disabled as well.  If you used this, be sure to disable it while the VM is running, so it removes the mount points (or network drives for Windows)  

54Of course you want to remove the sound card!

49For the love of Pete get that printer away!

48Make sure to keep the VM at Hardware Version 9. It will also support older versions but I wouldn’t go back beyond version  7

So, with all that done, now we need to convert the VM to the Open Virtualzation Format or OVF so it’s fully compatible with the vCloud environment.  To do this, we use the ‘ovftool’ which comes bundled with VMware Fusion.  The command-line only app lives within the VMware Fusion application itself, so you have to know how to reference it properly and how to tell it what to do. Thankfully, ovftool only does 1 thing by default… Export as OVF.

Console Warriors Unite!

So, the command I had to run is the following (on one line):

/Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool /Users/mike/Documents/Virtual\ Machines.localized/Ubuntu-Fusion.vmwarevm/Ubuntu-WP1.vmx /Users/mike/Documents/Virtual\ Machines.localized/Ubuntu-Fusion-OVF.ovf

To break that down…

<path to ovftool> <path to .vmx> <path to .ovf output>

First part is the path to the tool itself.

/Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool

On a Mac, / denotes a file structure, whereas \ is an escape character needed in front of spaces in a file path (since Unix command line interfaces don’t handle spaces the same way that the fancy UI of Mac OS X does…). So, it’s actually:

Applications > VMware Fusion.app > Contents > Library > VMware OVF Tool > ovftool

Second part is the path to the .vmx file.  Terminal supports this really neat feature where you can drag a file onto it and it will spit out that file’s path.  So, I typed in the path to the ovftool, then just dragged my .vmx from Finder into Terminal. I got to the VMX by right-clicking the VM in Fusion and clicking ‘Show in Finder’.  Then I right-clicked the VM in Finder and clicked ‘Show Package Contents’.  From there I just dragged the .vmx file into Terminal and it spit out the path.  Make sure you have a space after the ofvtool string tho 😉 Then it’s just a matter of spitting out the location where you want the ovf and other files to end up.  I made a folder and used that.

If the VM is on an SSD this goes pretty quick.  

Once the conversion is done, you’re left with a few files… The OVF file, the .vmdk (virtual disk) and a .mf file (which is just checksum data to ensure the integrity of the files)

ofvtool output

Now we should have our OVF package ready to upload to vCHS.  To do this, we need to get to the vCloud Director interface of vCHS, and specifically the Catalog Management area.

72From the Portal there’s a handy button to get right to vCD… There’s got to be a ‘now you’re thinking in portals’ joke here somewhere…

76

The Java-based upload tool is what we’ll use to actually upload our .ovf

When we use this tool, it asks us permission to run the Java applet… so we say ‘Yes’ and then choose our .ovf file

Pick the .ovf file… magic ensues…

Give it a description so you know what this is… I mean, or don’t, it’s your life!

Progress indicators, indicating progress!

After upload, Importing to the Catalog…

Once complete, the VM should now live as a ‘Template’ in our ‘Catalog’.  From here, standard vCD operations begin… We want to ‘Add’ the VM to ‘My Cloud’ to deploy it.

Time to Cloud!

This process starts a workflow/dialog that we need to step through so the VM lands safely in your “My Cloud” (your my? oh my…)

No, NAT… No…

We can step through the first screen, or change the resources.  On Networking however, we have to change the NIC to Network mapping… Since ‘Cloud’ doesn’t have the VMware Fusion ‘NAT’ network, we have to pick one that exists int his environment.

In this case I’m picking my default routed network.

Step through the confirmation screen and click ‘Finish’ to kick it off.

Deploying a Fusion VM in the Cloud… SOOOO Meta!!

When the Deployment / Creation finishes you are in business!

One thing to note is that thanks to VMware Tools being installed, the new cloud environment forces a password change, so make sure you know where to get that so you can log into the VM! (Hint: It’s in the VM Properties > Guest OS Customization screen, and also in the vCHS Portal itself on the VM’s Settings page)

My password ink was wet and it smeared all over the place…

So, once logged in, I like to make sure networking works before calling it a day…

To Ping or not to Ping…

And there you have it!

In a few steps we took a VM in Fusion… exported it using OVFTool, uploaded it using the Java Upload tool directly into our vCD Catalog in vCHS, and deployed it.

Cool stuff, right?  Right.  That, my friends, is how we Cloud =)

Getting Started with VMware Fusion: Get your copy today!

I’m proud to say that my first book has finally been published!

In it, I pulled from the experiences I had  during my days leading the Fusion support team, taking years of experience and bringing to readers some of the best tips and tricks I learned along the way.

This short eBook, Getting Started with VMware Fusion,  helps users get the most out of their VMware Fusion investment.  We get started by learning how to install Windows 8 from scratch without needing any physical media.

We then talk a bit about how to import a physical PC, and also importantly, how to take care of a new Virtual Machine to keep it safe.

I even do a fun bit about snapshots, explaining their great uses and how they work under the hood so users know how handle them properly, and also some tricks for using Linked Clones in VMware Fusion Professional.

Getting Started with VMware Fusion will help readers to get started running Windows on their Mac the right way by providing practical examples of how to keep a Virtual Machine secure, backed up, and running smoothly.

I’m fortunate to have had the help of a great support and release team at Packt Publishing, putting up with my busy schedule!

Download your copy today using the link below!

 

http://www.packtpub.com/getting-started-with-vmware-fusion/book

Getting Started with VMware Fusion
Getting Started with VMware Fusion