Opened 4 years ago
#20261 new defect
VBoxManage import without eula acceptance returns exit code zero
Reported by: | akkornel | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.18 |
Keywords: | import | Cc: | |
Guest type: | Linux | Host type: | Mac OS X |
Description
Hello! I have just noticed, when doing a VBoxManage import, the command exits with exit code zero (success) even when there is a license-acceptance error.
I am running VirtualBox 6.1.18r142142. To ensure I was up-to-date, I downloaded the 6.1.18 .dmg, used the uninstall script to uninstall, rebooted, and then used the installer to install VirtualBox (including all optional components).
Here are steps to reproduce:
- Download the Debian 10 VirtualBox image from linuxvmimages.com (direct link: https://sourceforge.net/projects/linuxvmimages/files/VirtualBox/D/10/Debian_10.7.0_VB.zip/download).
- Unzip the .zip file, and get the path to the .ova file.
- Run the command
VBoxManage import PATH_TO_OVA_FILE
.
Here is the output of what happens:
ITS-C02C91G0MD6R:~ akkornel(nc)$ VBoxManage --version 6.1.18r142142 ITS-C02C91G0MD6R:~ akkornel(nc)$ VBoxManage import /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interpreting /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova... OK. Disks: vmdisk1 549755813888 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized Debian_10.7.0_VB_LinuxVMImages.COM-disk001.vmdk -1 -1 Virtual system 0: 0: Suggested OS type: "Debian_64" (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values) 1: Suggested VM name "Debian_10.7.0_VB_LinuxVMImages.COM" (change with "--vsys 0 --vmname <name>") 2: Suggested VM group "/" (change with "--vsys 0 --group <group>") 3: Suggested VM settings file name "/Users/akkornel/VirtualBox VMs/Debian_10.7.0_VB_LinuxVMImages.COM/Debian_10.7.0_VB_LinuxVMImages.COM.vbox" (change with "--vsys 0 --settingsfile <filename>") 4: Suggested VM base folder "/Users/akkornel/VirtualBox VMs" (change with "--vsys 0 --basefolder <path>") 5: Product (ignored): Debian 10.7.0 6: Vendor (ignored): Debian Community 7: Version (ignored): 10.7.0 8: ProductUrl (ignored): https://www.linuxvmimages.com/debian-10 9: VendorUrl (ignored): https://debian.org 10: Description "Debian 10.7.0 VirtualBox Image User Name: debian Password: debian" (change with "--vsys 0 --description <desc>") 11: End-user license agreement (display with "--vsys 0 --eula show"; accept with "--vsys 0 --eula accept") 12: Number of CPUs: 2 (change with "--vsys 0 --cpus <n>") 13: Guest memory: 2048 MB (change with "--vsys 0 --memory <MB>") 14: Sound card (appliance expects "", can change on import) (disable with "--vsys 0 --unit 14 --ignore") 15: USB controller (disable with "--vsys 0 --unit 15 --ignore") 16: Network adapter: orig Bridged, config 3, extra slot=0;type=Bridged 17: CD-ROM (disable with "--vsys 0 --unit 17 --ignore") 18: IDE controller, type PIIX4 (disable with "--vsys 0 --unit 18 --ignore") 19: IDE controller, type PIIX4 (disable with "--vsys 0 --unit 19 --ignore") 20: SATA controller, type AHCI (disable with "--vsys 0 --unit 20 --ignore") 21: Hard disk image: source image=Debian_10.7.0_VB_LinuxVMImages.COM-disk001.vmdk, target path=Debian_10.7.0_VB_LinuxVMImages.COM-disk001.vmdk, controller=20;channel=0 (change target path with "--vsys 0 --unit 21 --disk path"; disable with "--vsys 0 --unit 21 --ignore") VBoxManage: error: Cannot import until the license agreement listed above is accepted. ITS-C02C91G0MD6R:~ akkornel(nc)$ echo $? 0
Notice how VBoxManage returns exit code zero.
I think the problem is in VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp around line 940. It looks like although RTMsgError
is called to report the problem, rc
is never set to indicate a problem, so RTEXITCODE_SUCCESS
ends up bring returned.