Virtualbox VMs on separate physical drive are inaccessible [solved]

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.
Locked
Netherprovinc3
Level 4
Level 4
Posts: 456
Joined: Mon Feb 04, 2019 9:29 pm

Virtualbox VMs on separate physical drive are inaccessible [solved]

Post by Netherprovinc3 »

Host: Linux Mint 19.1 Cinnamon
Virtualbox 6.1.18 r142142

I have 2 sata SSD drives in my computer.
On SSD 1, I have all of the host operating system files. Also, I have a few VMs on the drive.
On SSD 2, I have 2 VMs (Linux Mint Mate 20.1 and Windows 8.1) and some other files (2 partitions total, actually).

Almost all of the time, the 2 VMs that are on SSD 2 show as inaccessible. I think the pattern of them being accessible is for a brief period after I boot up the computer. Edit: actually, they seem to be accessible only after I unmount and then mount them again.

Code: Select all

Runtime error opening 'media/netherprovinc3/2015CmpXtraSpace/Windows 8.1 Pro 64 bit VM/Windows 8 Pro 64 bit/Windows 8 Pro 64 bit.vbox' for reading -102 (File not found)
/home/vbox/vbox-6.1.18/src/VBox/Main/src-server/MachineImpl.cpp[754] (nsresult Machine::i_registeredInit()).
Result code: NSS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
One fix to this problem that I have used is to unmount the drive in Nemo GUI and then mount it again. But, I imagine there is an easier way.

This has happened consistently for a long time--ever since I started using the second drive for virtual machines. In time, it has been maybe a year, over multiple versions of Virtualbox.

Edit: More info
If I navigate to the partition in Nemo, here is the error message that Nemo gives.
Nemo message.png
It doesn't give the error for the other partition on the same drive (said partition is not used by our virtual machines).
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 6 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
RIH
Level 9
Level 9
Posts: 2892
Joined: Sat Aug 22, 2015 3:47 am

Re: Virtualbox VMs on separate physical drive are inaccessible

Post by RIH »

Can't you just open the settings on that guest & re-route path to the file??
VB.png
Image
Netherprovinc3
Level 4
Level 4
Posts: 456
Joined: Mon Feb 04, 2019 9:29 pm

Re: Virtualbox VMs on separate physical drive are inaccessible

Post by Netherprovinc3 »

RIH wrote: Thu Apr 08, 2021 2:37 am Can't you just open the settings on that guest & re-route path to the file??

VB.png
I am unclear as to the technical reason (even in a very general sense) why this is a solution. In other words, I don't understand what we are changing here. But, I suppose I can live with that :lol:

Should I choose
Choose/Create a Virtual Hard Disk...
or
Choose a disk file
?
User avatar
spamegg
Level 14
Level 14
Posts: 5084
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Virtualbox VMs on separate physical drive are inaccessible

Post by spamegg »

It says "/media/root/..." so it seems like you are mounting them as root user.
Are you also running Virtualbox as root user too?
Your drives should be mounted at "/media/yourusername/..."

Can you show us the output of the terminal command

Code: Select all

cat /etc/fstab
Netherprovinc3
Level 4
Level 4
Posts: 456
Joined: Mon Feb 04, 2019 9:29 pm

Re: Virtualbox VMs on separate physical drive are inaccessible

Post by Netherprovinc3 »

spamegg wrote: Thu Apr 08, 2021 2:58 am It says "/media/root/..." so it seems like you are mounting them as root user.
Are you also running Virtualbox as root user too?
Your drives should be mounted at "/media/yourusername/..."

Can you show us the output of the terminal command

Code: Select all

cat /etc/fstab
When I run Virtualbox, the OS does not prompt me for the root/admin password. So, that should mean that Virtualbox is not running as root.

I checked just now and my internal drives are not mounted at the location that you specified. I do see all of the external partitions mounted there, though.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=3f755a3d-81dc-1sg2-92a8-a9d670b2b122 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=19B3-a1D2  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
User avatar
AndyMH
Level 21
Level 21
Posts: 13736
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Virtualbox VMs on separate physical drive are inaccessible

Post by AndyMH »

One fix to this problem that I have used is to unmount the drive in Nemo GUI and then mount it again. But, I imagine there is an easier way.
Sounds like the partition is not mounting at boot, mount it via fstab.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Netherprovinc3
Level 4
Level 4
Posts: 456
Joined: Mon Feb 04, 2019 9:29 pm

Re: Virtualbox VMs on separate physical drive are inaccessible

Post by Netherprovinc3 »

AndyMH wrote: Fri Apr 09, 2021 5:46 am
One fix to this problem that I have used is to unmount the drive in Nemo GUI and then mount it again. But, I imagine there is an easier way.
Sounds like the partition is not mounting at boot, mount it via fstab.
Thanks. After some struggle, I was able to change fstab like you recommended.
However, I am not able to run the 2 VMs on the 2nd hard drive at all now.
I am thinking that I need to change the directory that Virtual Box tries to access the virtual machine at. But, doesn't seem to let me change the setting. Instead, VirtualBox is just concluding "inaccessible."

Edit:
I figured it out.
select the machine. Menu at the top - > Machine -> remove
click on "tools" in the upper left. Then, "add" to add it back using the correct directory location.
Locked

Return to “Virtual Machines”