How to share VM between Windows and Linux dual boot?

This is for discussing general topics about how to use VirtualBox.

How to share VM between Windows and Linux dual boot?

Postby Shmu26 » 8. May 2019, 16:34

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
Shmu26
 
Posts: 37
Joined: 21. Dec 2017, 15:32

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

Postby Dave B » 9. May 2019, 19:11

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
Dave B
 
Posts: 40
Joined: 29. Nov 2018, 18:24

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

Postby NoNoNo » 16. May 2019, 21:45

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.
NoNoNo
 
Posts: 51
Joined: 16. Apr 2015, 17:35
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP(32bit) / Debian 8.x / Debian 7.x / Windows 7(32bit)

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

Postby Shmu26 » 17. May 2019, 05:24

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?
Last edited by socratis on 17. May 2019, 14:56, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Shmu26
 
Posts: 37
Joined: 21. Dec 2017, 15:32


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 18 guests