Page 1 of 1

storageattach: Invalid UUID or filename

Posted: 23. Oct 2012, 15:16
by rschmied
Using VB 4.2.2 r81494

when using VBoxManage to attach disk images (in this case a DVD image) to machines my script uses of UUIDs. Essentially, it grabbed the UUID of the DVD from the list of DVDs and attached it to the controller of the machine. This was working with 4.1.

With 4.2, the following error is given:

Code: Select all

bleh$ /usr/bin/VBoxManage storageattach xpsp3 --storagectl 'IDE Controller' --type dvddrive --port 1 --device 0 --medium c4777f0f-bbfb-4157-a6d0-1e8519b505d6
VBoxManage: error: The given path 'c4777f0f-bbfb-4157-a6d0-1e8519b505d6' is not fully qualified
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 220 of file VBoxManageDisk.cpp
VBoxManage: error: Invalid UUID or filename "c4777f0f-bbfb-4157-a6d0-1e8519b505d6"
bleh$ 
however:

Code: Select all

UUID:        c4777f0f-bbfb-4157-a6d0-1e8519b505d6
Format:      RAW
Location:    /usr/share/virtualbox/VBoxGuestAdditions.iso
State:       created
Type:        readonly
When using the Location / fully qualified path name instead of the UUID it works as expected:

Code: Select all

bleh$ /usr/bin/VBoxManage storageattach xpsp3 --storagectl 'IDE Controller' --type dvddrive --port 1 --device 0 --medium /usr/share/virtualbox/VBoxGuestAdditions.iso
bleh$ 
However, I don't see a reason why the UUID should not work.

Any ideas? I consider this a bug.

Thanks,
-ralph

Re: storageattach: Invalid UUID or filename

Posted: 23. Oct 2012, 17:27
by mpack
The UUID will only work to identify media which is already registered with the VM (I suspect that is not true in your case), otherwise the VM has no way to translate the UUID into a file path and name.

Despite what you say, this cannot have worked with v4.1 either.

Re: storageattach: Invalid UUID or filename

Posted: 24. Oct 2012, 11:56
by rschmied
The UUID will only work to identify media which is already registered with the VM (I suspect that is not true in your case), otherwise the VM has no way to translate the UUID into a file path and name.
Highly doubt that. The ISO / component is registered with VirtualBox and the machine accesses it. If there's no ISO attached to the controller, there's no reference whatsoever in the VM configuration file.

And: It did work with 4.1. As stated, the ISO is registered with VirtualBox and it shows using 'VBoxManage list dvds'. If the machine is not actually using the ISO, it can not be registered with the VM. Here's the same thing with VB 4.1 and it works just fine:

Code: Select all

bleh$ VBoxManage list dvds
[...]
UUID:        ef68955b-f616-4e96-8362-f7f45b7797ae
Format:      RAW
Location:    /usr/share/virtualbox/VBoxGuestAdditions.iso
State:       locked read
Type:        readonly
[...]
VBoxManage showvminfo xpsp3 | grep 'IDE Controller' 
Storage Controller Name (0):            IDE Controller
IDE Controller (0, 0): /home/VBox/HardDisks/xpsp3.vdi (UUID: 50b76405-0769-4e5f-8613-6bdf46c83ccc)
IDE Controller (1, 0): Empty
bleh$ VBoxManage storageattach xpsp3 --storagectl 'IDE Controller' --type dvddrive --port 1 --device 0 --medium ef68955b-f616-4e96-8362-f7f45b7797ae
bleh$ VBoxManage showvminfo xpsp3 | grep 'IDE Controller'
IDE Controller (0, 0): /home/VBox/HardDisks/xpsp3.vdi (UUID: 50b76405-0769-4e5f-8613-6bdf46c83ccc)
IDE Controller (1, 0): /usr/share/virtualbox/VBoxGuestAdditions.iso (UUID: ef68955b-f616-4e96-8362-f7f45b7797ae)
bleh$ 

Re: storageattach: Invalid UUID or filename

Posted: 7. Nov 2012, 22:44
by Norchem
This bug is really bad when you realize you can't delete ISCSI targets because it won't recognize the UUID... Even though the target is clearly there.

Re: storageattach: Invalid UUID or filename

Posted: 7. Nov 2012, 23:05
by michaln
Please check if there is already an open ticket for this on the bugtracker, and if not, create one.

Re: storageattach: Invalid UUID or filename

Posted: 17. Nov 2012, 13:09
by rschmied
I've created https://www.virtualbox.org/ticket/11209 to track this. I'd appreciate if someone could check if this still is there in 4.2.4. My system is still running on 4.2.2 and there's no time to upgrade just now.

Re: storageattach: Invalid UUID or filename

Posted: 21. Dec 2012, 19:32
by mick.saxton
This was marked as fixed in v4.2.6 but I am still having problems deleting ISCSI on the windows version.
I still get the "is not fully qualified"

Can anybody confirm it is now working and if so please confirm the command line syntax?

I believe it is:-

vboxmanage closemedium disk {UUID}

where UUID is obtained from running vboxmanage list hdds

Thanks Mick