Could not find an open hard disk with UUID

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Susu19
Posts: 5
Joined: 3. Jan 2018, 17:40

Could not find an open hard disk with UUID

Post by Susu19 »

I'm trying to open / register an existing VM, but all I get is Could not find an open hard disk with UUID:

Code: Select all

$ VBoxManage registervm /home/susu/VirtualBox VMs/W10/W10.vbox-prev
VBoxManage: error: Could not find an open hard disk with UUID {7610546f-7140-4d7c-bb04-0ee669708885}
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "OpenMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 87 of file VBoxManageMisc.cpp
However, the harddisk (Snapshot) exists:

Code: Select all

$ VBoxManage showhdinfo /home/susu/VirtualBox VMs/W10/Snapshots/{7610546f-7140-4d7c-bb04-0ee669708885}.vdi
UUID:           7610546f-7140-4d7c-bb04-0ee669708885
Parent UUID:    5b0753af-a3ba-49ac-8745-5e1d8ed73dbc
State:          created
Type:           normal (differencing)
Auto-Reset:     off
Location:       /home/susu/VirtualBox VMs/W10/Snapshots/{7610546f-7140-4d7c-bb04-0ee669708885}.vdi
Storage format: VDI
Format variant: differencing default
Capacity:       500000000 MBytes
Size on disk:   1909 MBytes
Encryption:     disabled
So I thought I just register the harddisk (.vdi) first before I register the VM (.vbox). Unfortunately, there seems to be no vbox command to open / register a harddisk?! (it seems there is a command called closemedium to remove / close a harddrive but no command called openmedium ?!)

Any advise would be appreciated.

Vbox version: 5.2.4
OS: Ubuntu 16.04.3 LTS
Kernel: 4.4.0-104-generic
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Could not find an open hard disk with UUID

Post by mpack »

A "vbox-prev" is a backup file. Never try to register a backup file! If you don't have the correct (.vbox) file then rename the backup to <vmname>".vbox".

A missing file is just that - a missing file. Perhaps the VM you're trying to register is a linked clone, in which case the parent VM has to be registered first.
Susu19
Posts: 5
Joined: 3. Jan 2018, 17:40

Re: Could not find an open hard disk with UUID

Post by Susu19 »

mpack wrote:A "vbox-prev" is a backup file. Never try to register a backup file!
Allright, but the I'm having the same problem with .vbox:

Code: Select all

$ VBoxManage registervm /home/susu/VirtualBox VMs/W10/W10.vbox
VBoxManage: error: Could not find an open hard disk with UUID {c3a8c01f-80c0-4619-ab28-1f0ea8074a56}
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
And again, the snapshot / disk exists.
mpack wrote:A missing file is just that - a missing file!
Can you elaborate? As outlined before, the file is clearly there:

Code: Select all

$ ls -lah "/home/susu/VirtualBox VMs/W10/Snapshots/{c3a8c01f-80c0-4619-ab28-1f0ea8074a56}.vdi"
-rw------- 1 susu susu 1.9G Dez 14 09:10 /home/susu/VirtualBox VMs/W10/Snapshots/{c3a8c01f-80c0-4619-ab28-1f0ea8074a56}.vdi
... so I seriously have no idea why and what vbox is complaining about.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Could not find an open hard disk with UUID

Post by socratis »

Post the following:
  • A ZIPPED copy of the "W10.vbox" file.
  • The output of the command:
    • ls -alR "/home/susu/VirtualBox VMs/W10"
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Susu19
Posts: 5
Joined: 3. Jan 2018, 17:40

Re: Could not find an open hard disk with UUID

Post by Susu19 »

socratis wrote:Post the following:
  • A ZIPPED copy of the "W10.vbox" file.
  • The output of the command:
    • ls -alR "/home/susu/VirtualBox VMs/W10"
Attached.

Code: Select all

$ ls -alR /home/susu/VirtualBox\ VMs/W10
/home/s/VirtualBox VMs/W10:
total 52
drwx------  4 susu susu 4096 Jan  3 15:31 .
drwx------ 24 susu susu 4096 Okt 17 13:34 ..
-rw-------  1 susu susu 9380 Dez 14 09:10 W10.vbox
-rw-------  1 susu susu 9380 Dez 18 14:40 W10.vbox-prev
-rw-------  1 susu susu 9294 Dez 18 14:39 W10.vbox-prev-prev
drwx------  2 susu susu 4096 Dez 18 14:28 Logs
drwx------  2 susu susu 4096 Dez 18 14:40 Snapshots

/home/susu/VirtualBox VMs/W10/Logs:
total 624
drwx------ 2 susu susu   4096 Dez 18 14:28 .
drwx------ 4 susu susu   4096 Jan  3 15:31 ..
-rw------- 1 susu susu 152874 Dez 18 14:39 VBox.log
-rw------- 1 susu susu 152966 Dez 18 14:25 VBox.log.1
-rw------- 1 susu susu 152933 Dez 18 14:15 VBox.log.2
-rw------- 1 susu susu 159777 Dez 18 14:05 VBox.log.3

/home/susu/VirtualBox VMs/W10/Snapshots:
total 6771388
drwx------ 2 susu susu       4096 Dez 18 14:40 .
drwx------ 4 susu susu       4096 Jan  3 15:31 ..
-rw------- 1 susu susu  530153221 Jan  6  2017 2017-01-06T15-40-53-853540000Z.sav
-rw------- 1 susu susu 2403336192 Jan  6  2017 {5b0753af-a3ba-49ac-8745-5e1d8ed73dbc}.vdi
-rw------- 1 susu susu 2003828736 Jan  3 16:11 {7610546f-7140-4d7c-bb04-0ee669708885}.vdi
-rw------- 1 susu susu 2001731584 Dez 14 09:10 {c3a8c01f-80c0-4619-ab28-1f0ea8074a56}.vdi
Attachments
W10.zip
(1.97 KiB) Downloaded 172 times
Last edited by Susu19 on 4. Jan 2018, 12:07, edited 1 time in total.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Could not find an open hard disk with UUID

Post by socratis »

How did you manage to get that .vbox file? There's a whole section missing from the beginning, the "<MediaRegistry>" one, plus the "<Display> one. Could you clarify what you did?

Also, post the output of the commands:
  • VBoxManage showmediuminfo {c3a8c01f-80c0-4619-ab28-1f0ea8074a56}
    VBoxManage showmediuminfo {7610546f-7140-4d7c-bb04-0ee669708885}
    VBoxManage showmediuminfo {5b0753af-a3ba-49ac-8745-5e1d8ed73dbc}
    
And please explain to me why I don't see a "/home/susu/VirtualBox VMs/W10/W10.vdi". Again, please explain what did you do. In full detail, I don't feel like becoming a Sherlock Holmes...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Susu19
Posts: 5
Joined: 3. Jan 2018, 17:40

Re: Could not find an open hard disk with UUID

Post by Susu19 »

socratis wrote:How did you manage to get that .vbox file?

Code: Select all

$ cd /home/susu/VirtualBox VMs/W10/
zip W10.zip W10.vbox
socratis wrote:There's a whole section missing from the beginning, the "<MediaRegistry>" one, plus the "<Display> one.
No idea. I'm not a vbox expert :-) What I can tell is that the other VMs do not have such a section either and they all just run fine. So IMO, that can't be the culprit.
socratis wrote:Could you clarify what you did?
The VM freezed. So I've restarted the VM service and now the VM does no longer boot.
socratis wrote:Also, post the output of the commands:
Sure

Code: Select all

$ VBoxManage showmediuminfo {c3a8c01f-80c0-4619-ab28-1f0ea8074a56}
UUID:           c3a8c01f-80c0-4619-ab28-1f0ea8074a56
Parent UUID:    5b0753af-a3ba-49ac-8745-5e1d8ed73dbc
State:          created
Type:           normal (differencing)
Auto-Reset:     off
Location:       /home/susu/VirtualBox VMs/W10/Snapshots/{c3a8c01f-80c0-4619-ab28-1f0ea8074a56}.vdi
Storage format: VDI
Format variant: differencing default
Capacity:       500000000 MBytes
Size on disk:   1909 MBytes
Encryption:     disabled

$ VBoxManage showmediuminfo {7610546f-7140-4d7c-bb04-0ee669708885}
VBoxManage: error: The given path '{7610546f-7140-4d7c-bb04-0ee669708885}' is not fully qualified
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 179 of file VBoxManageDisk.cpp

$ VBoxManage showmediuminfo {5b0753af-a3ba-49ac-8745-5e1d8ed73dbc}
UUID:           5b0753af-a3ba-49ac-8745-5e1d8ed73dbc
Parent UUID:    4a4dcb3a-9827-4962-b1b6-c6be448d6e39
State:          created
Type:           normal (differencing)
Auto-Reset:     on
Location:       /home/susu/VirtualBox VMs/W10/Snapshots/{5b0753af-a3ba-49ac-8745-5e1d8ed73dbc}.vdi
Storage format: VDI
Format variant: differencing default
Capacity:       500000000 MBytes
Size on disk:   2292 MBytes
Encryption:     disabled
Child UUIDs:    70ced5db-510a-47d1-97de-5d68e148e8b1
                f3aad71d-1de4-4ee7-a02d-f2466006dd28
                c3a8c01f-80c0-4619-ab28-1f0ea8074a56
socratis wrote:And please explain to me why I don't see a "/home/susu/VirtualBox VMs/W10/W10.vdi"
No idea either. I suspect it's because I've created the VM initially with --mtype immutable. Anyway, I see that the other vms do not have such a VDI file either and they all just run fine. So IMO, that can't be the culprit.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Could not find an open hard disk with UUID

Post by socratis »

Susu19 wrote:the other VMs do not have such a section either and they all just run fine. So IMO, that can't be the culprit.
Susu19 wrote:I see that the other vms do not have such a VDI file either and they all just run fine. So IMO, that can't be the culprit.
You seem to know quite a few things about what's supposed to be there and what's not supposed to be there. What *I* don't know is exactly how you created the VM. I didn't want the "cd" and "zip" instructions, but how you created and maintained this VM. Full details, reproducible details.
Susu19 wrote:I've restarted the VM service and now the VM does no longer boot.
What do you mean the "VM Service"? Which VM service would that be? And why did it need a restart?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Could not find an open hard disk with UUID

Post by mpack »

To clarify, the "missing file" is missing from the media registry. That fact that it's present on the disk is not relevant. The problem is that VirtualBox has nothing which says that its part of the VM.

The only reason I can think of for a VM to be lacking a media registry is because it doesn't have any media, because it's using media registered by another VM, but not in a legitimate way, i.e. not using a linked clone. In the past I've seen this happen when people dragged VDI files into the global media registry - which doesn't really exist any more , so it isn't persistent. But in that case the VM will not boot after the manager is shut down.
Susu19
Posts: 5
Joined: 3. Jan 2018, 17:40

Re: Could not find an open hard disk with UUID

Post by Susu19 »

socratis wrote:What *I* don't know is exactly how you created the VM.
Allright, here's what I did:

Code: Select all

VBoxManage createvm --name "W10" --ostype Windows10_64 --register
VBoxManage modifyvm "W10" --memory 4096 --acpi on --cpus 4 --hwvirtex on --boot1 dvd --nic1 bridged --bridgeadapter1 br0 --mouse usb --keyboard usb
VBoxManage modifyvm "W10" --nic2 hostonly --hostonlyadapter2 "vboxnet0"
VBoxManage storagectl "W10" --name "SATA Controller" --add sata --controller IntelAHCI --portcount 4"
VBoxManage storageattach "W10" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "/home/susu/org/init.vdi" --mtype immutable --nonrotational on
VBoxManage storageattach "W10" --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium emptydrive
VBoxManage modifyvm "W10" --nictrace1 on
VBoxManage modifyvm "W10" --nictracefile1 "/tmp/dump.pcap"
VBoxManage modifyvm "W10" --vrde on --vrdeport 5533 --vrdeaddress 192.168.1.55
Afterwards I've configured the guest (Windows) and created a snapshot using:

Code: Select all

VBoxManage snapshot W10 take 'v01' --pause
socratis wrote:I didn't want the "cd" and "zip" instructions, but how you created and maintained this VM
I maintaing the VM using the vbox CLI:

Code: Select all

VBoxManage startvm W10 --type headless
VBoxManage snapshot W10 take 'v01' --pause
VBoxManage controlvm W10 poweroff
VBoxManage snapshot W10 restorecurrent
socratis wrote:And why did it need a restart?
Because all vbox VMs freez regurarely, see Ticket #17057.
mpack wrote:In the past I've seen this happen when people dragged VDI files into the global media registry
I don't have a GUI, I use the vbox CLI :)
TDSKen
Posts: 10
Joined: 5. Dec 2018, 11:49

Re: Could not find an open hard disk with UUID

Post by TDSKen »

Your Hard Disk UUID and the storage medium Hard Disk Image UUID must match.

<HardDisk uuid="{ba913c05-11c5-4245-a0c9-4baaf7719377}" />


<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{ba913c05-11c5-4245-a0c9-4baaf7719377}"/>
</AttachedDevice>
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Could not find an open hard disk with UUID

Post by socratis »

@TDSKen
Please don't wake up old threads. You already had one thread force-locked due to its age. The problem that the OP was facing wasn't the same as the one that you managed to solve for your own case...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply