Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differencing

Discussions about using Linux guests in VirtualBox.
Post Reply
olegshevtsov1
Posts: 5
Joined: 4. Jun 2022, 10:48

Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differencing

Post by olegshevtsov1 »

Hard disk '/media/dev/ssd2t/home/dev/VirtualBox VMs/FDS/Fds-CR-660/Snapshots/{fc88c3e3-1229-4f76-9d45-6fd985a0fe85}.vdi' with UUID {fc88c3e3-1229-4f76-9d45-6fd985a0fe85} cannot be directly attached to the virtual machine 'Fds-CR-660' ('/media/dev/ssd2t/home/dev/VirtualBox VMs/FDS/Fds-CR-660/Fds-CR-660.vbox') because it has 1 differencing child hard disks.
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
MachineWrap
Interface:
IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

Code: Select all

dev@bonfire:~/VirtualBox VMs/FDS/Fds-CR-660$ ls -l 
total 24
-rw------- 1 dev dev 6504 Jun  3 10:10 Fds-CR-660.vbox
-rw------- 1 dev dev 6447 Jun  3 10:10 Fds-CR-660.vbox-prev
drwx------ 2 dev dev 4096 Jun  3 10:04 Logs
drwx------ 2 dev dev 4096 Jun  3 10:08 Snapshots

Code: Select all

dev@bonfire:~/VirtualBox VMs/FDS/Fds-CR-660$ cd Snapshots/
dev@bonfire:~/VirtualBox VMs/FDS/Fds-CR-660/Snapshots$ ls -l 
total 17576800
-rw------- 1 dev dev  6754750928 Jun  3 10:10 2022-06-03T07-08-07-014100000Z.sav
-rw------- 1 dev dev 11243880448 Jun  3 10:07 {fc88c3e3-1229-4f76-9d45-6fd985a0fe85}.vdi
dev@bonfire:~/VirtualBox VMs/FDS/Fds-CR-660/Snapshots$ 

Code: Select all

dev@bonfire:/$ vboxmanage --version
6.1.26_Ubuntur145957

VM was saved correctrly, and laptop was saspened.
How can I recover my VM? I would ike to find out to get rid of issue in the feature.
Attachments
logs-vbox.zip
(39.02 KiB) Downloaded 5 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by scottgus1 »

I'm not quite sure how to fix this, but I'd recommend you take a complete backup of all files and subfolders in the "/VirtualBox VMs/FDS/Fds-CR-660" folder. That way you can put things back if something goes awry in the fix attempts.

Is this VM a linked clone?

Please provide the output of this terminal command:

vboxmanage showmediuminfo "~/VirtualBox VMs/FDS/Fds-CR-660/Snapshots/{fc88c3e3-1229-4f76-9d45-6fd985a0fe85}.vdi"
olegshevtsov1
Posts: 5
Joined: 4. Jun 2022, 10:48

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by olegshevtsov1 »

Is this VM a linked clone?
yes

Code: Select all

dev@bonfire:~$ vboxmanage showmediuminfo "~/VirtualBox VMs/FDS/Fds-CR-660/Snapshots/{fc88c3e3-1229-4f76-9d45-6fd985a0fe85}.vdi"
VBoxManage: error: Could not find file for the medium '/home/dev/~/VirtualBox VMs/FDS/Fds-CR-660/Snapshots/{fc88c3e3-1229-4f76-9d45-6fd985a0fe85}.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 187 of file VBoxManageDisk.cpp

fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by fth0 »

FWIW, I'm not sure if there are potential problems with mounted home directories. Your home directory seems to be "/media/dev/ssd2t/home/dev/", and in the VBoxManage showmediuminfo command "~" got replaced by "/home/dev/~/". Please try the command again using the absolute path, and elaborate on your potential experiences with the mounted home directory and VirtualBox.
olegshevtsov1
Posts: 5
Joined: 4. Jun 2022, 10:48

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by olegshevtsov1 »

What about that?

Code: Select all

dev@bonfire:~$ vboxmanage showmediuminfo "/media/dev/ssd2t/home/dev/VirtualBox VMs/FDS/Fds-CR-660/Snapshots/{fc88c3e3-1229-4f76-9d45-6fd985a0fe85}.vdi"
UUID:           fc88c3e3-1229-4f76-9d45-6fd985a0fe85
Parent UUID:    24903166-6aee-4bd0-aba6-952d9fdbd160
State:          created
Type:           normal (differencing)
Auto-Reset:     off
Location:       /media/dev/ssd2t/home/dev/VirtualBox VMs/FDS/Fds-CR-660/Snapshots/{fc88c3e3-1229-4f76-9d45-6fd985a0fe85}.vdi
Storage format: VDI
Format variant: differencing default
Capacity:       30720 MBytes
Size on disk:   10723 MBytes
Encryption:     disabled
Property:       AllocationBlockSize=1048576
Child UUIDs:    3163d2b0-70ff-4504-b7d0-40664eb48cd1

other VMs work as the same way
olegshevtsov1
Posts: 5
Joined: 4. Jun 2022, 10:48

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by olegshevtsov1 »

So, what I can do to recover the vm?
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by fth0 »

I'm wondering where "Child UUIDs: 3163d2b0-70ff-4504-b7d0-40664eb48cd1" comes from. Please provide the output of VBoxManage list vms and VBoxManage list hdds. Some background info:

VirtualBox gets the VMs from the MachineRegistry section in the VirtualBox.xml file and then gets the virtual disk images from the MediaRegistry sections in all .vbox files mentioned in the MachineRegistry. The virtual disk images only contain the UUIDs of their parents, but not of their children. Therefore, I think the Child UUIDs come from the MediaRegistry collection.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by mpack »

There are clearly lots of interpendent linked clones involved. I'm thinking that these have recently moved home, e.g. to a new PC. But because of the interdependent nature you have to restore ALL of the VMs from the old PC before you attempt to register or run any, you can't just restore some of them.

I also think that the OP has done something else, perhaps in an attempt to recover the situation. In particular taking the apparent main VDI from linked clone and attempting to create a new VM around it. Parent VDIs are meant to be locked, hence the error message.

Really, mistake #1 was to create that network of interdepencies by using linked clones at all. The only real way to recover that is what I said in the first paragraph: properly restore all of the VMs from the backup or old PC. Then I'd look to make full (independent) clones of the VMs you wish to keep.

Howto: Move a VM.
olegshevtsov1
Posts: 5
Joined: 4. Jun 2022, 10:48

Re: Hard disk with UUID cannot be directly attached to the virtual machine because it has 1 differen

Post by olegshevtsov1 »

I hadn't unable to recover this VM.
But the same trouble no longer happens.
Seems I really did some wrong action, don't suspect about that one.
Post Reply