Can I use one virtualbox disk for multiple machines?

Yes, you can share the VDI file as you're doing because you've only got one instance of VirtualBox accessing the VDI file at a time.

However, there is another caveat that you should take into consideration - you cannot share VDI files once you create a snapshot.

Even though this thread is a little old, it should give you a reasonable understanding of why you cannot share a VDI file once you've created a snapshot.

So, avoid snapshots and you should be able to share your VDI file between your Windows and Linux installations.


To correct some of the miss information on this post.

  • You can share a single VDI (Virtual Disk Image) between multiple machines.
  • These machines can ALL be running at the same time, with divergent changes.
  • Also, they can all take advantage of Snapshotting.
  • Even after a snapshot has been taken, you can branch and spawn new machines from any point in a machines history.

I wrote a post a while back just for this...

http://blog.mrverrall.co.uk/2010/06/spawning-many-virtualbox-machines-from.html

Also see the previous post on "Cloning VMs with Multiple Snapshots in VirtualBox" Which would have got around the original posters main issue... i.e. moving a machine, snapshots and all to a new OS.

:)


To amplify what Convict said, don't use snapshots, just close the VM and "Save state". That saves all changes back into the VDI file itself.

If you need to perform the equivalent of snapshotting, you can make an actual copy of the VDI file. Takes up some disk space of course, but disk is cheap.