Hard disk with UUID can't be directly attached to VM because 1 differencing child hard disks

Discussions about using Linux guests in VirtualBox.
Post Reply
Hawk McDuck
Posts: 4
Joined: 14. Jul 2015, 17:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: Windows, macOS, Linux
Location: Vancouver, BC, Canada

Hard disk with UUID can't be directly attached to VM because 1 differencing child hard disks

Post by Hawk McDuck »

Host: macOS Mojave 10.4.6 with latest OS update / VirtualBox 6.1.16 r140961 / Guest: CentOS 7

I am facing a serious issue after stopping and restarting the host machine. The CentOS 7 guest VM has been running for months and was shut down properly before the Mac host machine was shut down for the latest OS update.

Error message when trying to launch the CentOS VM:
Hard disk '/Volumes/Virtualbox VMs Lacie/CentOS FreePBX 15/Snapshots/{7aacf2fc-aa6b-4756-b143-c818608494db}.vdi' with UUID {7aacf2fc-aa6b-4756-b143-c818608494db} cannot be directly attached to the virtual machine 'CentOS FreePBX 15' ('/Volumes/Virtualbox VMs Lacie/CentOS FreePBX 15/CentOS FreePBX 15.vbox') because it has 1 differencing child hard disks.
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

VM 'CentOS FreePBX 15 'shows as "Inaccessible"

Code: Select all

$ ls -lR
total 37785664


-rw-------  1 stewart  staff        12967 10 Jun 06:11 CentOS FreePBX 15.vbox
-rw-------  1 stewart  staff        12982 10 May 09:03 CentOS FreePBX 15.vbox-prev
-rw-------  1 stewart  staff  19346227200 25 Apr 16:40 CentOS FreePBX 15.vdi
drwx------  6 stewart  staff          204 10 May 09:03 Logs
drwx------  7 stewart  staff          238 10 May 09:02 Snapshots

./Logs:
total 1096
-rw-------  1 stewart  staff  153992 10 Jun 06:11 VBox.log
-rw-------  1 stewart  staff   98896 10 May 09:02 VBox.log.1
-rw-------  1 stewart  staff  154894  8 May 18:23 VBox.log.2
-rw-------  1 stewart  staff  144512 28 Apr 11:05 VBox.log.3

./Snapshots:
total 29389816
-rw-------  1 stewart  staff  2476448098 25 Apr 16:40 2021-04-25T23-40-17-198473000Z.sav
-rw-------  1 stewart  staff  2002534694 10 May 09:01 2021-05-10T16-01-09-041170000Z.sav
-rw-------  1 stewart  staff  3979345920 10 May 09:01 {07d2bfd3-9b96-4be3-b786-72abfb9adb14}.vdi
-rw-------  1 stewart  staff  6587154432 10 Jun 06:11 {7aacf2fc-aa6b-4756-b143-c818608494db}.vdi
-rw-------  1 stewart  staff     2097152 10 May 09:02 {8beef701-72fc-484a-a2c0-0a3e17092743}.vdi
$ 
FYI, I have taken a clone of this VM, but it was done nearly two months ago and numerous changes have been made to the original VM in the meantime.

I'm hoping that with the assistance of knowledgeable VirtualBox users the VM can be recovered. I need to understand how this can be prevented in future.
Attachments
Logs.zip
Logs directory
(112.73 KiB) Downloaded 7 times
CentOS FreePBX 15.vbox.zip
CentOS FreePBX 15.vbox
(2.67 KiB) Downloaded 10 times
Hawk McDuck
Posts: 4
Joined: 14. Jul 2015, 17:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: Windows, macOS, Linux
Location: Vancouver, BC, Canada

Re: Hard disk with UUID can't be directly attached to VM because 1 differencing child hard disks

Post by Hawk McDuck »

FYI, I have copied the VM folder (i.e., .vbox, .vdi, Logs, Snapshots) to another directory in a safe place.

BTW, I don't care at all about saving the snapshot. All I want is to be able to boot the VM with the latest changes.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Hard disk with UUID can't be directly attached to VM because 1 differencing child hard disks

Post by scottgus1 »

Missed this one, sorry about that. It will take some digging into, which may take some time.

Here's the pertinent data from the .vbox file, as I saw it:
<Machine ... name="CentOS FreePBX 15" ... currentSnapshot="{707c274c-52c0-4721-b5de-7343812367cf}"

(1st layer snapshot:)
<Snapshot uuid="{6836480c-e6ed-4e27-b08e-8d4c794fd05b}" name="Snapshot 1" timeStamp="2021-04-25T23:40:17Z" stateFile="Snapshots/2021-04-25T23-40-17-198473000Z.sav">
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{ce6b7072-9c71-4fac-be23-f93c721d79f7}"/>
</AttachedDevice>
</StorageController>

(2nd layer snapshot:)
<Snapshot uuid="{707c274c-52c0-4721-b5de-7343812367cf}" name="Snapshot 2" timeStamp="2021-05-10T16:01:09Z" stateFile="Snapshots/2021-05-10T16-01-09-041170000Z.sav">
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{07d2bfd3-9b96-4be3-b786-72abfb9adb14}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>

(original hardware:)
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{7aacf2fc-aa6b-4756-b143-c818608494db}"/>
</AttachedDevice>
</StorageController>
I'm not really certain what went on. The original hardware has the snapshot file causing the error. Yet according to the Media registry, that snapshot file is part of the chain.

Strangely enough the base disk is loaded in the first snapshot, not as original hardware.

I have no idea how to fix this. But it could be possible to use Mpack's CloneVDI to clone off the snapshotted disks down to a new single disk to be put in a new VM. Follow the instructions to make a clone disk of the chain of snapshots, then ttr the disk in a new VM, see what you get.
Hawk McDuck wrote:I need to understand how this can be prevented in future.
Don't use snapshots, or take good backups. 8) Snapshots aren't backups, and there is tremendous possibility to pebcak oneself into an unusable VM. Instead, make backup copies of the VM folder when it is fully shut down, not save-stated. If different hardware configurations are being tested, which could call for snapshots, be prepared to lose everything due to a mistake (which comes back to having backups.)
Post Reply