[SOLVED] How to run existing VBox VM on shared data drive from new OS partition

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
Frankus333
Level 3
Level 3
Posts: 193
Joined: Mon Jan 06, 2014 10:33 pm
Location: Brisbane Australia

[SOLVED] How to run existing VBox VM on shared data drive from new OS partition

Post by Frankus333 »

G'day folks

On and off for a while now I have been playing around with, and gradually building up a little understanding of, the magic of VMs with Virtualbox, in my LM XFCE installatiions. These are low powered machines with only dual core processors and 4GB of RAM (see signature below), but they run Win 10 22H2 in a VM well enough to allow me to do the small number of things that LM can't, without my having to boot into their bare metal Win 10 or MacOS partitions. These days that involves managing backups and podcast collecting, via iTunes, for my Apple iPhone and iPod respectively.

On my main machine, I have two LM21.3 XFCE partitions on the single main hard disk. The Win10 22H2 Virtual Box VM was created by one of these partitions and resides on a third shared NTFS Data partition. My aim is to be able to run this VM from the second LM21.3 XFCE fresh installation on its separate partition.

My searches brought up two or three ways of transferring a VB guest installation to work on another machine, but nothing about working on another OS partition on the same machine. My hunch is that this should be possible, and even easy, but I don't know enough about the technical intricacies to play around with it and risk messing it up.

If it makes any difference, the Win10 VM was created when the OS on the first partition was LM21.2 XFCE. It has recently been upgraded to the current LM21.3 XFCE, and the VBox installation has been upgraded to the latest version 7.0_7.0.14. The second OS partition is a fresh new installation of LM21.3 XFCE, and original installation of the latest VBox 7.0.14 software, with no VMs so far created.

Ideally, it would be great to be able to have both partitions able to run the VM in turn whenever they are booted into, but my guess is that would not be possible. My understanding is that some information about the OS (e.g; about UUIDs) is required to be written into the VM, and this would not be able to be done easily at each boot of an OS partition.

My question is: How do I tweak the new VBox installation software on the second fresh partition so that it will recognise and run the VM on the shared NTFS Data partition?
Last edited by Frankus333 on Thu Mar 07, 2024 7:12 am, edited 1 time in total.
LM21.3XFCE; Intel NUC8i3BEH, 4GB RAM, CPU Dual Core i3-8109U Kaby Lake 3.6GHz, 1TB HDD (triple boot Win 10 Home, LM21.3XFCE). LM20.3XFCE; MacBook Air6,1 4GB RAM, CPU Dual Core i5-4250U 2.6GHz, 233GB SSD (dual boot MacOS El Capitan).
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to run existing VBox VM on shared data drive from new OS partition

Post by AndyMH »

Assuming you have VB installed in the second OS, just open up the file manager, navigate to the folder with your VM and double click on the .vbox file. This will add it to the list in VB.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Frankus333
Level 3
Level 3
Posts: 193
Joined: Mon Jan 06, 2014 10:33 pm
Location: Brisbane Australia

Re: How to run existing VBox VM on shared data drive from new OS partition

Post by Frankus333 »

Wow! Thanks AndyMH; that worked like a charm. I can now run the VM from either partition. This is better than I thought was possible.

I tried the same fix for a related situation on my MacBook Pro8,2. The identical VM folders are on two separate shared Data drives, one formatted NTFS and the other ext4. (I copied the VM folder from the NTFS drive to the ext4 drive to see if it was faster/more efficient.) The VM wouldn't load from the ext4 drive, the VB error messages saying it has the same UUID as another machine, which of course it does.

I took the plunge and used "Remove" to delete the NTFS resident VM from the VB list. Then the above process worked, and the VM copy in the ext4 drive loaded normally into the VB installation.

I was also able to transfer a copy of the VM folder of my most up to date VM (on my MacBook Air6,1) to another, faster machine, as well as to my MacBook Pro, via an external USB drive. Both were added to VB using the above procedure. I was able to beef up the parameters for the VM on the faster machine to take advantage of the better hardware properties.

A very successful day of experimental learnings. Many thanks. I will mark this as solved.
LM21.3XFCE; Intel NUC8i3BEH, 4GB RAM, CPU Dual Core i3-8109U Kaby Lake 3.6GHz, 1TB HDD (triple boot Win 10 Home, LM21.3XFCE). LM20.3XFCE; MacBook Air6,1 4GB RAM, CPU Dual Core i5-4250U 2.6GHz, 233GB SSD (dual boot MacOS El Capitan).
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: [SOLVED] How to run existing VBox VM on shared data drive from new OS partition

Post by AndyMH »

The message is that VMs are portable. I've got the same win7 VM running on all my PCs. You can either do what I do - manually copy the files from one machine to another (or one folder to another); or there is an export/import function in VB. Not done export/import, suspect it will take longer.

The things you need to check/change moving a VM to a new machine are:
  • how many CPU cores to allocate - I always allocate half.
  • hom much memory - I allocate half my total memory.
  • shared folders - will need to be setup on the new machine.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Post Reply

Return to “Virtual Machines”