VirtualBox

Opened 15 years ago

Closed 15 years ago

#2594 closed enhancement (fixed)

vboxmanage: make it easier to work with VDI files from different locations than ~/.VirtualBox/VDI

Reported by: Martin Steigerwald Owned by:
Component: other Version: VirtualBox 1.6.6
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

I have a local direcotry for VirtualBox images as I don't want to store them via NFS. Now when I want to clone an image I get this:

ms@mango:~/lokal/VirtualBox-Images> vboxmanage clonevdi Debian-Etch-Template.vdi Debian-Etch-grsec.vdi
VirtualBox Command Line Management Interface Version 1.6.6_OSE
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling virtualBox->OpenVirtualDiskImage(Bstr(argv[0]), vdi.asOutParam()) at line 3307!
[!] Primary RC  = NS_ERROR_FAILURE (0x80004005) - Operation failed
[!] Full error info present: true , basic error info present: true
[!] Result Code = NS_ERROR_FAILURE (0x80004005) - Operation failed
[!] Text        = Could not access hard disk image '/home/ms/.VirtualBox/VDI/Debian-Etch-Template.vdi' (VERR_FILE_NOT_FOUND)
[!] Component   = HardDisk, Interface: IHardDisk, {fd443ec1-000f-4f5b-9282-d72760a66916}
[!] Callee      = IVirtualBox, {2d3b9ea7-25f5-4f07-a8e1-7dd7e0dcf667}

I can do:

ms@mango:~/lokal/VirtualBox-Images> ln -s /home_lokal/ms/VirtualBox-Images/Debian-Etch-Template.vdi /home/ms/.VirtualBox/Debian-Etch-Template.vdi

And then:

ms@mango:~/lokal/VirtualBox-Images> vboxmanage clonevdi ./Debian-Etch-Template.vdi Debian-Etch-grsec.vdi
ms@mango:~/lokal/VirtualBox-Images> vboxmanage clonevdi ./Debian-Etch-Template.vdi Debian-Etch-rsbac.vdi

But now vboxmanage creates the images in ~/.VirtualBox/VDI. Thus I have to move them around again:

ms@mango:~/lokal/VirtualBox-Images> mv ~/.VirtualBox/VDI/Debian-Etch-{grsec,rsbac}.vdi .

Thus all I ask is that vboxmanage respects the path I give instead of insisting on ~/.VirtualBox/VDI. I know I could symlink VDI completely, but I want to have the option to keep some images via NFS.

I tested with VirtualBox 1.6.6 as thats the latest OSE edition I can get via backports.org for Debian Etch. I can try with a newer one in case its needed.

The issue is minor, but rather annoying.

Change History (5)

comment:1 by Martin Steigerwald, 15 years ago

PS: Ok, this was on Lenny already. Forgot that I upgraded recently. Still only 1.6.6 available for Debian Lenny.

comment:2 by James Lucas, 15 years ago

Just use full paths to your vdi files and it will work. If you don't put in a full path Virtual Box will assume the path is relative to the ~/.VirtualBox/VDI folder and not relative to the current working directory.

eg using your example

vboxmanage clonevdi /home_lokal/ms/VirtualBox-Images/Debian-Etch-Template.vdi /home_lokal/ms/VirtualBox-Images/Debian-Etch-grsec.vdi

comment:3 by Martin Steigerwald, 15 years ago

Thanks. Now that was easy. I thought I tried it with full paths when I first saw this behavior. But well, now it works. Even with ./vdifile. Would probably still be nice if the command could look into current dir first, just like "cat", "cp" or any other command and default to create the target image in the directory of the source image.

comment:4 by Martin Steigerwald, 15 years ago

Sorry... no, it doesn't work with ./vdifile... Thats what I tried yesterday as well. It just worked with the Debian Etch Template VDI cause I symlinked it. Sure its a relative path then, but its still unintuitive that way. I think vboxmanage should at least not default to ~/VirtualBox/VDI is the path contains at least one /.

comment:5 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: newclosed

Should be fixed in VirtualBox 2.2.0. Make sure to upgrade to version 2.2.2.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use