Hard disk vdi has more than one child hard disk

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Smackey's dad
Posts: 127
Joined: 2. Apr 2014, 04:11
Primary OS: Ubuntu 12.04
VBox Version: OSE Debian
Guest OSses: Ubuntu Trusty
Location: Austin, TX
Contact:

Hard disk vdi has more than one child hard disk

Post by Smackey's dad »

I had a hung snapshot creation command. Once I killed that snap shot and then tried to delete the remaining snapshots I get this error:

Seleting snapshot: c6a7d0d4-824d-4ef5-bf25-8677639d2b62 ...
Deleting snapshot 'snapshot01' (c6a7d0d4-824d-4ef5-bf25-8677639d2b62)
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Snapshot operation failed
VBoxManage: error: Hard disk '/../../../disk_boot.vdi' has more than one child hard disk (2)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface IMachine
VBoxManage: error: Context: "RTEXITCODE handleSnapshot(HandlerArg*)" at line 539 of file VBoxManageSnapshot.cpp
Done!

This thread shows the solution to delete the extra child disk using GUI / Virtual Media Manager.

However, I am using a headless mode in Linux. Is there a set of VBoxManage commands I can use to achieve this?

Thanks
Last edited by Smackey's dad on 22. Feb 2024, 15:13, edited 1 time in total.
Smackey's dad
Posts: 127
Joined: 2. Apr 2014, 04:11
Primary OS: Ubuntu 12.04
VBox Version: OSE Debian
Guest OSses: Ubuntu Trusty
Location: Austin, TX
Contact:

Re: Hard disk vdi has more than one child hard disk

Post by Smackey's dad »

I found the command to identify and delete one of the two Child Disks to no luck.

Code: Select all

VBoxManage showmediuminfo /../../disk_boot.vdi
UUID:           8bae511e-0486-4eac-9268-a2d0eea55b7e
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       /../../disk_boot.vdi
Storage format: VDI
Format variant: dynamic default
Capacity:       10500 MBytes
Size on disk:   304 MBytes
Encryption:     disabled
In use by VMs:  VM10 (UUID: 9b4b1bab-1f2a-481a-a8d8-7e833f890277) [snapshot1 (UUID: c5a7d0d4-824d-4ef5-bf25-8677639d2b62)]
Child UUIDs:    1fab30bf-ed33-407c-bee1-78b50c35193f
                94d64fff-84e0-4f4d-b038-cecfac77c305
--------------
Then issued

Code: Select all

VBoxManage showmediuminfo 1fab30bf-ed33-407c-bee1-78b50c35193f
With output
UUID:           1fab30bf-ed33-407c-bee1-78b50c35193f
Parent UUID:    8bae511e-0486-4eac-9268-a2d0eea55b7e
State:          created
Type:           normal (differencing)
Auto-Reset:     off
Location:       /../../Snapshots/{1fab30bf-ed33-407c-bee1-78b50c35193f}.vdi
Storage format: VDI
Format variant: differencing default
Capacity:       10500 MBytes
Size on disk:   2 MBytes
Encryption:     disabled
In use by VMs:  VM10 (UUID: 9b4b1bab-1f2a-481a-a8d8-7e833f890277)
--------------
Again for 2nd child

Code: Select all

VBoxManage showmediuminfo 94d64fff-84e0-4f4d-b038-cecfac77c305
UUID:           94d64fff-84e0-4f4d-b038-cecfac77c305
Parent UUID:    8bae511e-0486-4eac-9268-a2d0eea55b7e
State:          created
Type:           normal (differencing)
Auto-Reset:     off
Location:       /../../Snapshots/{94d64fff-84e0-4f4d-b038-cecfac77c305}.vdi
Storage format: VDI
Format variant: differencing default
Capacity:       10500 MBytes
Size on disk:   6 MBytes
Encryption:     disabled
In use by VMs:  VM10 (UUID: 9b4b1bab-1f2a-481a-a8d8-7e833f890277)
--------------
Tried deleting one of the children

Code: Select all

VBoxManage closemedium disk 1fab30bf-ed33-407c-bee1-78b50c35193f --delete
Received error as below:
VBoxManage: error: Cannot delete storage: medium '/../../Snapshots/{1fab30bf-ed33-407c-bee1-78b50c35193f}.vdi' is still attached to the following 1 virtual machine(s): 9b4b1bab-1f2a-481a-a8d8-7e833f890277
VBoxManage: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "DeleteStorage(pProgress.asOutParam())" at line 1679 of file VBoxManageDisk.cpp
VBoxManage: error: Failed to delete medium. Error code Unknown Status -2135228404 (0x80bb000c)
VBoxManage: error: Medium '/../../Snapshots/{1fab30bf-ed33-407c-bee1-78b50c35193f}.vdi' cannot be closed because it is still attached to 1 virtual machines
VBoxManage: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "Close()" at line 1688 of file VBoxManageDisk.cpp
--------------
Tried deleting the other child disk and received the same error.

The VM works but I cannot get it to be clean anyone and has this snapshot lingering.
Post Reply