VirtualBox

Ticket #16387 (new defect)

Opened 2 years ago

Last modified 23 months ago

virtualbox 5.1 not reading properly certain box.ovf files?

Reported by: marcindulak Owned by:
Component: other Version: VirtualBox 5.1.12
Keywords: Cc:
Guest type: other Host type: other

Description

Reported also at  https://github.com/redhat-imaging/imagefactory/issues/393

Virtualbox 5.1 seems unable to read the settings from the box.ovf file  https://atlas.hashicorp.com/centos/boxes/7 but reads the settings from  https://atlas.hashicorp.com/puppetlabs/boxes/centos-7.2-64-puppet

Tested on

OS X 10.11.6 VirtualBox 5.1.10 r112026 (Qt5.6.2)

Ubuntu 14.04 VirtualBox 5.1.10r112026, 5.1.12r112440

$ xmllint --format ~/.vagrant.d/boxes/centos-VAGRANTSLASH-7/1611.01/virtualbox/box.ovf | grep -E 'Order|(StorageController )'
      <ns0:Order device="HardDisk" position="1"/>
      <ns0:Order device="DVD" position="2"/>
      <ns0:Order device="None" position="3"/>
      <ns0:Order device="None" position="4"/>
    <ns0:StorageController Bootable="true" PortCount="2" name="IDE Controller" type="PIIX4" useHostIOCache="true">

$ vboxmanage import ~/.vagrant.d/boxes/centos-VAGRANTSLASH-7/1611.01/virtualbox/box.ovf
$ vboxmanage showvminfo --machinereadable centos-7-1-1.x86_64 | grep -E 'storagecontrollername0|(boot.=)'
boot1="floppy"
boot2="dvd"
boot3="disk"
boot4="none"
storagecontrollername0="IDE"

$ xmllint --format ~/.vagrant.d/boxes/puppetlabs-VAGRANTSLASH-centos-7.2-64-puppet/1.0.1/virtualbox/box.ovf | grep -E 'Order|(StorageController )'
      <Order position="1" device="HardDisk"/>
      <Order position="2" device="DVD"/>
      <Order position="3" device="None"/>
      <Order position="4" device="None"/>
    <StorageController name="IDE Controller" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
$ vboxmanage import ~/.vagrant.d/boxes/puppetlabs-VAGRANTSLASH-centos-7.2-64-puppet/1.0.1/virtualbox/box.ovf
$ vboxmanage showvminfo --machinereadable packer-centos-7.2-x86_64-virtualbox-vagrant-puppet-1457544893 | grep -E 'storagecontrollername0|(boot.=)'
boot1="disk"
boot2="dvd"
boot3="none"
boot4="none"
storagecontrollername0="IDE Controller"

Change History

comment:1 Changed 23 months ago by marcindulak

The problem still present on VirtualBox 5.1.14r112924

comment:2 Changed 23 months ago by socratis

I'm sorry (maybe the caffeine hasn't kicked in yet), but I can't seem to be able to download any of the two .vbox/.ovf files that you're referring/linked to. Would you mind posting a link to the two files?

  • Working.ovf
  • Failing.ovf

I need to see these two standalone files to make sure that it is [|not] VirtualBox's fault.

And since you commented on this being an issue with 5.1.12 and still with 5.1.14, does it mean that in a previous version (assuming before 5.1.10) it was working as expected, i.e. is this a regression? Or that you were simply expecting a fix in between the two versions?

comment:3 Changed 23 months ago by marcindulak

They can be fetched using vagrant:

vagrant box add centos/7 --provider=virtualbox

vagrant box add puppetlabs/centos-7.2-64-puppet --provider=virtualbox

or directly:

cd /tmp
mkdir 7&& cd 7
wget https://atlas.hashicorp.com/centos/boxes/7/versions/1611.01/providers/virtualbox.box
tar xf virtualbox.box
ls box.ovf

cd /tmp
mkdir centos-7.2-64-puppet&& cd centos-7.2-64-puppet
wget https://atlas.hashicorp.com/puppetlabs/boxes/centos-7.2-64-puppet/versions/1.0.1/providers/virtualbox.box
tar xf virtualbox.box
ls box.ovf

After import them with vboxmanage import, etc.

It is a regression, at think it happened at Virtualbox 5.1. Note that these two ovfs use xml namespaces in a different way.

Last edited 23 months ago by marcindulak (previous) (diff)

comment:4 Changed 23 months ago by socratis

I'm sorry, but I can't reproduce your problem:

  • Downloaded both .BOX files directly with wget (I don't have Vagrant). I couldn't use the https because it was complaining about a missing certificate, so I added the --no-check-certificate flag (1).
  • Untared both files with tar xf virtualbox.box.
  • Imported both .OVFs.
  • VMs imported fine, no problem, no error, launch as new.

Host: OSX 10.9.5
VirtualBox: Both 5.1.14 r.112924, and 5.1.15 r.113680 (from the Test Builds).


(1)

socratis$ wget https://atlas.hashicorp.com/centos/boxes/7/versions/1611.01/providers/virtualbox.box
--2017-03-06 18:13:19--  https://atlas.hashicorp.com/centos/boxes/7/versions/1611.01/providers/virtualbox.box
Resolving atlas.hashicorp.com... 34.193.173.239, 52.55.203.197, 52.206.86.0
Connecting to atlas.hashicorp.com|34.193.173.239|:443... connected.
ERROR: cannot verify atlas.hashicorp.com's certificate, issued by `/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA':
  Unable to locally verify the issuer's authority.
To connect to atlas.hashicorp.com insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.

socratis$ wget https://atlas.hashicorp.com/centos/boxes/7/versions/1611.01/providers/virtualbox.box --no-check-certificate
--2017-03-06 18:14:26--  https://atlas.hashicorp.com/centos/boxes/7/versions/1611.01/providers/virtualbox.box
Resolving atlas.hashicorp.com... 52.55.203.197, 52.206.86.0, 34.193.173.239
Connecting to atlas.hashicorp.com|52.55.203.197|:443... connected.
WARNING: cannot verify atlas.hashicorp.com's certificate, issued by `/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302 Found
Location: http://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1611_01.VirtualBox.box [following]
--2017-03-06 18:14:30--  http://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1611_01.VirtualBox.box
Resolving cloud.centos.org... 136.243.75.209
Connecting to cloud.centos.org|136.243.75.209|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 422021120 (402M) [application/vnd.previewsystems.box]
Saving to: `CentOS-7-x86_64-Vagrant-1611_01.VirtualBox.box'

100%[==============================================================================>] 422,021,120  637K/s   in 14m 30s 

2017-03-06 18:29:05 (474 KB/s) - `CentOS-7-x86_64-Vagrant-1611_01.VirtualBox.box' saved [422021120/422021120]

comment:5 Changed 23 months ago by marcindulak

The problem is not with launching, but with an incorrect information obtained using vboxmanage showvminfo as described in my first post. This basically means that the settings present in box.ovf are ignored by VirtualBox at import.

Last edited 23 months ago by marcindulak (previous) (diff)

comment:6 Changed 23 months ago by socratis

I'm sorry, it took me quite some time to decipher what "settings are ignored" was referring to. Because the settings are not ignored, since you can obviously import the VM. You could have helped a lot by clearing that out and narrowing it down to:

In the CentOS 7.1 case:

  • the "name" of the controller is improperly imported (instead of "IDE Controller" it's "IDE"), and
  • the non-existent "floppy" controller is inserted on the top of the boot order.

If that's what you mean, I can confirm that it happens with these two examples. You didn't even need the CentOS 7.2 example. I am not sure whether or not they both follow the OVF specifications, I haven't looked it up. As such I'm not sure who's fault this might be; the exporter's or VirtualBox's that's doing the importing.

Host: OSX 10.9.5
VBox: 5.1.16 r.113841

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use