Skip to main content

Convert Parallels Disk to VirtualBox VDI

I used to use the free Parallels Desktop Lite on the Mac App Store to host various Linux virtual machines for software testing purposes. Although I'd heard things about the company's business practices, I thought it was a pretty fair deal allowing people to run free OS's for free - you only had to pay to run Windows.

However about a year ago they introduced a mandatory subscription (at £74 per annum) even to run Linux, in the guise of a normal software update. None of this was mentioned in the update info - Nice 😡

No worries I thought (this is the polite version) - I'll just restore the previous version from Time Machine and Bob was indeed my uncle.

This plan worked fine until I upgraded to Catalina and sure enough Parallels would no longer run. Rather than pay the Parallels ransom, I decided to investigate the alternatives.

After some research I settled on VirtualBox, a free open-source VM from Oracle.

VirtualBox was surprisingly easy (for an open-source product) to install and make work on the Mac, the only problem was how to convert my existing VM disks to VirtualBox format. I had a large number of these and didn't fancy recreating them from scratch.

Unfortunately I couldn't find any information on how to do this conversion for Parallels expandable disks (only for the old fixed-disks). I figured out how to do it after some trial and error and here are the steps:

Step 1: Convert Parallels Disk to a format VirtualBox can read

  • Remove Parallels Tools from within VM (otherwise it won’t boot in VirtualBox):
$ sudo /usr/lib/parallels-tools/install -r

As my copy of Parallels Desktop Lite would no longer run, I had to download a trial copy of the full Parallels Desktop. Happily this also helped with the prl_disk_tool step, which isn't installed with the Lite version.
  • Show Package contents of Parallels .pvm file.
  • Copy .hdd file to a temp directory.
  • Convert .hdd from the expandable to the fixed format .hds with the Parallels prl_disk_tool:
$ /Applications/Parallels\ Desktop.app/Contents/MacOS/prl_disk_tool convert --hdd <your disk>.hdd --plain
  • Rename .hds to .hdd and copy to VirtualBox VM directory
  • Uninstall all version of Parallels when you're done 😉

Step 2: Add .hdd to virtual machine using the GUI

  • The VM can now be started from this disk.
  • The only problem is this is a fixed-size disk (in my case 64Gb).
  • The following steps convert the fixed disk to an expandable .vdi disk.

Step 3: Convert Fixed-size Disk to expandable VDI

  • Find out the identity & guid of the existing disk:
$ vboxmanage list hdd
  • Convert to dynamic VDI:
$ vboxmanage clonemedium disk <your disk>.vdi  --format VDI --variant Standard
  • Remove old disk from VM (using the GUI).
  • Delete the original fixed-size disk:
$ vboxmanage closemedium  <guid from above> --delete
  • Attach new disk to VM (using the GUI).
  • Start the VM and enjoy!

Comments

Popular posts from this blog

Renaming Files in Git

Renaming Files I recently had to rename a lot of files in brf-mode for submission into MELPA . These files have 10+ years of version control history I wanted to keep. In the process I realised retaining all that history in Git isn't as simple as I thought 😀 I thought it was as simple as using git mv rather than filesystem  mv and Git would know everything had been renamed. It turns out I was wrong and I should have known that from my knowledge of how Git works 😖 In reality, Git works by storing snapshots rather than file or directory metadata and git mv is just a convenience shortcut for typing: $ mv <old name> <new name> $ git rm <old name> $ git add <new name> That's all there is to it! Now the "magic" happens when you git log or git blame a file and Git works out the file was renamed by diffing the contents.  If files have the same contents (within a certain threshold %) it thinks a rename happened. See here in the  Gi

Setting Environment Variables and the PATH on MacOS

Time Was setting environment variables and the PATH on a Mac running OSX was just like any other *IX.  However with successive OS releases Apple have changed how this works (more than once) and generally made it more difficult 😢  This article discusses how I go about setting environment variables on Mojave and Catalina. Why does this matter? MacOS doesn't add  /usr/local/bin to the PATH by default, which is unfortunate as most *IX-style programs you build yourself will be installed in there. If you only ever launch stuff from Terminal, all you have to do is set environment variables and the path from Shell startup files in the time immemorial fashion. However, this doesn't help with native Mac Apps like Emacs, which aren't launched from a shell and where you may still want to access custom environment variables and programs in /usr/local/bin . Setting the PATH In the past you could add to the path via /etc/paths (or paths.d ), however this no longer works i

More Axe Birdwatching

We went back to the Seaton bird hide the next day, there were plenty of birds but the weather was poor. Cold and very dark and not at all suited to photography. Here's the best I managed (a ll taken with Nikon D700, 70-200 f/2.8G VR II and TC-2E III converter (400mm focal length equivalent): Male Pheasant Enjoying Leftovers from Bird Feeder Little Grebe  (I got quite close to this, but it's a very small bird!) Cormorants Flying along the Axe