Page 1 of 1

How to share VM between Windows and Linux dual boot?

Posted: 8. May 2019, 16:34
by Shmu26
When I create a VM in Windows 10, and fully shut it down after running it, I often cannot open it in my Linux Mint installation. And vice versa.
If I create a new and separate VM for the other OS, I can't add the hard disk to it, as it is still associated with the first VM. The only thing that works is to delete the VM and make a new one with the existing virtual hard disk.

I store my VMs in a NTFS partition on a second hard disk. This hard disk has no OS on it.
In Linux, I mount the partition, but I still have the above-mentioned problem.
So what's the secret to happily sharing VMs between different OSes?
VB 6.0.6 on both OSes

Re: How to share VM between Windows and Linux dual boot?

Posted: 9. May 2019, 19:11
by Dave B
Hi Shmu26,

Please post the Linux Mint fstab entry for your NTFS partition, UUID can be omitted if preferred. Thanks.

My understanding is best not create a separate VM on the second host OS then try adding a hard drive from an existing VM from the first host OS. When switching between host OS you should be able to add the NTFS partition containing the 'VirtualBox VMs' folder in preferences **, then using Ctrl+A locate and add the relevant .vbox file.

While I use the above method on one system, I just tested (using nested virtualization)

Tips:
  • While basic snapshot functions work as expected for a shared host setup, they need to used with great care, or not at all. One possible scenario example, an attached ISO added in one host OS could be locked in a snapshot and prevent use of the VM on the other host OS.
  • Shared folders are another issue, since Windows and Linux have drive path differences.

** this may need to be updated on Mint if fstab entry is modified

Re: How to share VM between Windows and Linux dual boot?

Posted: 16. May 2019, 21:45
by NoNoNo
Hi, I also setup dualboot and share VMs, although my VMs store in ext3 filesystem.
Shmu26 wrote:So what's the secret to happily sharing VMs between different OSes?
My tip is: do not use same VMname.vbox file.
I separate 2 HOST, it mean I create one VM and duplicate vbox file like VMname-linux.vbox and VMname-windows.vbox
Than I ensure add VMname-linux.vbox in Linux HOST, add VMname-windows.vbox in Windows HOST.
While VM setting is separated, you just access same Virtual HD(vdi) at different time. You can target the same folder as your shared folder even if path is different between 2 OS.

I don't think it can guarantee snapshot/saved-state work, so it is a drawback.

Re: How to share VM between Windows and Linux dual boot?

Posted: 17. May 2019, 05:24
by Shmu26
Thanks for the idea. Sounds good.

If your VMs are on an ext3 partition, how can Windows see them? Or maybe you don't have a Windows boot?