VMware Communities
Gecko29
Contributor
Contributor
Jump to solution

Run external ubuntu ssd as a virtual machine?

Just started using ubuntu having installed it on an external ssd which can be booted by restarting the machine and selecting the drive to boot from. Is it possible using Fusion to run ubuntu from the external ssd while within Mac OS? Apologies if this has already been asked before.

Many Thanks for your help!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
bluefirestorm
Champion
Champion
Jump to solution

You specify "create a new virtual disk" and then choose "Customize Settings" (so that it does not power up) and also allows you to change the memory and processor settings. Effectively, this VM is like a shell (again very much similar to how Fusion handles Bootcamp partitions). You don't need to change disk size/allocation as this new virtual disk will be ignored with the edit of the vmx configuration file.

If you open up vmx configuration file of this newly-created custom VM (assuming that you didn't change the "Bus type"), you will see the lines.

scsi0:0.present = "TRUE"

scsi0:0.fileName = "Virtual Disk.vmdk"

What you will do after creating the raw disk VMDK is to replace the "Virtual Disk.vmdk" with the "rawDiskFile.vmdk" and add the other lines

scsi0:0.deviceType = "rawDisk"

firmware = "efi"

suspend.disabled = "TRUE"

Have a good read-through/understanding of the KB before doing this. As @dlhotka mentioned, back up the external SSD contents if there are any important files you don't want to lose (in the event this process goes awry).

View solution in original post

0 Kudos
7 Replies
vmxmr
Expert
Expert
Jump to solution

Yes, you can use Fusion to run Ubuntu from an external SSD. There are two ways you can do it:

NOT RECOMMENDED, BUT IT WORKS:

* Put the Ubuntu installer on the external SSD. In VMware Fusion, choose New... to create a new virtual machine. Choose the external SSD as the source, and Ubuntu should boot just as if you booted by restarting your Mac. This method lets you run Ubuntu in a "trial mode" but you can't do much with it. It is intended for you to install Ubuntu elsewhere, such as in a VMware Fusion virtual machine.

RECOMMENDED METHOD:

* Create an Ubuntu virtual machine in VMware Fusion, and store the virtual machine file on the external SSD. Run the virtual machine file from the external SSD.

0 Kudos
parmarr
VMware Employee
VMware Employee
Jump to solution

I don't think it can't be done. According to KB Creating a VMware Fusion virtual machine using a bootable USB drive. (1028741), Fusion's BIOS does not allow you to boot a virtual machine even from a USB drive. In VMware Workstation, there is an option within VM Settings > Options > Advanced and select Boot with EFI instead of BIOS, but even this is not guaranteed to make it work.

Sincerely, Rahul Parmar VMware Support Moderator
0 Kudos
bluefirestorm
Champion
Champion
Jump to solution

There is a third way to try to do it; that is to create a raw disk VMDK based on the USB SSD. This would be akin to how Bootcamp Partitions are handled.

You create a custom virtual machine specifying Ubuntu 64-bit.

You then create a raw disk VMDK and edit the vmx following this KB as a reference. https://kb.vmware.com/kb/2097401

I would think you should just change the references to ide to scsi since scsi is the default when you create an Ubuntu 64-bit VM. For simplicity specify "fulldevice" in the step 3 of the KB article (assuming that the external SSD only has Ubuntu and nothing else).

Also add the line as part of step 4.

firmware = "efi"

This makes the VM work with EFI virtual firmware as BIOS cannot boot with USB disks.

EDIT: The virtual firmware has to be EFI because the external SSD was created with EFI.

99.99% chance this will work. The 0.01% chance it will not work is whether Ubuntu 16.04 will be able to handle the change in hardware (especially the video drivers) as it will change from the physical hardware of the Mac hardware to virtual ones of the VM; so the xorg desktop configuration might get messed up; unless it handles it all automatically and it should boot up fine.


Similarly, this method (raw disk VMDK) can also be used to install a fresh Ubuntu VM into the external SSD as a raw disk instead of being stored as VMDK files. It would be like a bootcamp partition with Ubuntu on an external USB SSD.

So yes, it is possible to boot a VM from a raw disk VMDK from USB drive.

0 Kudos
Gecko29
Contributor
Contributor
Jump to solution

Many thanks for trying to help me with this.

Following your advice but I am a little confused with "creating a raw disk VMDK" and editing the vmx".

I create a custom virtual machine but which option do I choose - either create a new virtual disk or use an existing virtual disk?

0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

Whatever you do, make a good backup first.  This is way outside of anything that's supported.

0 Kudos
bluefirestorm
Champion
Champion
Jump to solution

You specify "create a new virtual disk" and then choose "Customize Settings" (so that it does not power up) and also allows you to change the memory and processor settings. Effectively, this VM is like a shell (again very much similar to how Fusion handles Bootcamp partitions). You don't need to change disk size/allocation as this new virtual disk will be ignored with the edit of the vmx configuration file.

If you open up vmx configuration file of this newly-created custom VM (assuming that you didn't change the "Bus type"), you will see the lines.

scsi0:0.present = "TRUE"

scsi0:0.fileName = "Virtual Disk.vmdk"

What you will do after creating the raw disk VMDK is to replace the "Virtual Disk.vmdk" with the "rawDiskFile.vmdk" and add the other lines

scsi0:0.deviceType = "rawDisk"

firmware = "efi"

suspend.disabled = "TRUE"

Have a good read-through/understanding of the KB before doing this. As @dlhotka mentioned, back up the external SSD contents if there are any important files you don't want to lose (in the event this process goes awry).

0 Kudos
Gecko29
Contributor
Contributor
Jump to solution

Works perfectly - many thanks!

0 Kudos