storageattach: Invalid UUID or filename

This is for discussing general topics about how to use VirtualBox.
Post Reply
rschmied
Posts: 18
Joined: 5. Jan 2010, 11:42
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: various
Location: Germany

storageattach: Invalid UUID or filename

Post 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
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: storageattach: Invalid UUID or filename

Post 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.
rschmied
Posts: 18
Joined: 5. Jan 2010, 11:42
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: various
Location: Germany

Re: storageattach: Invalid UUID or filename

Post 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$ 
Norchem
Posts: 12
Joined: 14. Sep 2012, 01:33
Primary OS: Ubuntu 12.04
VBox Version: OSE Debian
Guest OSses: WindowsXP32/64,2008,2003,Ubuntu64
Location: Flagstaff, AZ
Contact:

Re: storageattach: Invalid UUID or filename

Post 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.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: storageattach: Invalid UUID or filename

Post by michaln »

Please check if there is already an open ticket for this on the bugtracker, and if not, create one.
rschmied
Posts: 18
Joined: 5. Jan 2010, 11:42
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: various
Location: Germany

Re: storageattach: Invalid UUID or filename

Post 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.
mick.saxton
Posts: 3
Joined: 13. May 2010, 17:34
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: solaris,linux

Re: storageattach: Invalid UUID or filename

Post 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
Post Reply