VirtualBox

Ticket #15705 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

problem generating ovf file using packer

Reported by: jhkrischel Owned by:
Component: other Version: VirtualBox 5.1.2
Keywords: packer Cc:
Guest type: other Host type: other

Description

With virtualbox 5.1, the OVF file created during a packer build has a sparse Network section: `

<Network>

<Adapter slot="0" enabled="true" MACAddress="0800276F4FE5" type="82540EM">

<NAT/>

</Adapter> <Adapter slot="1" type="82540EM"/> <Adapter slot="2" type="82540EM"/> <Adapter slot="3" type="82540EM"/> <Adapter slot="4" type="82540EM"/> <Adapter slot="5" type="82540EM"/> <Adapter slot="6" type="82540EM"/> <Adapter slot="7" type="82540EM"/>

</Network>

`

In comparison, with virtualbox 5.0.26, a packer build will create network settings that are proper:

`

<Network>

<Adapter slot="0" enabled="true" MACAddress="080027967E30" cable="true" speed="0" type="82540EM">

<DisabledModes/> <NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</Adapter> <Adapter slot="1" enabled="false" MACAddress="080027FB4F38" cable="true" speed="0" type="82540EM">

<DisabledModes>

<NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</DisabledModes>

</Adapter> <Adapter slot="2" enabled="false" MACAddress="0800279D475E" cable="true" speed="0" type="82540EM">

<DisabledModes>

<NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</DisabledModes>

</Adapter> <Adapter slot="3" enabled="false" MACAddress="080027E05792" cable="true" speed="0" type="82540EM">

<DisabledModes>

<NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</DisabledModes>

</Adapter> <Adapter slot="4" enabled="false" MACAddress="080027849293" cable="true" speed="0" type="82540EM">

<DisabledModes>

<NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</DisabledModes>

</Adapter> <Adapter slot="5" enabled="false" MACAddress="0800275A2598" cable="true" speed="0" type="82540EM">

<DisabledModes>

<NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</DisabledModes>

</Adapter> <Adapter slot="6" enabled="false" MACAddress="0800272AFF8A" cable="true" speed="0" type="82540EM">

<DisabledModes>

<NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</DisabledModes>

</Adapter> <Adapter slot="7" enabled="false" MACAddress="080027E80098" cable="true" speed="0" type="82540EM">

<DisabledModes>

<NAT>

<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/> <Alias logging="false" proxy-only="false" use-same-ports="false"/>

</NAT>

</DisabledModes>

</Adapter>

</Network>

`

There might be other virtualbox 5.1 issues beyond that, but I ran into that when my packer created vagrant boxes were created with no cables connected.

Change History

comment:1 Changed 7 years ago by alni

I experience the same issue but without Packer. When exporting a VM with "cable connected" switched on I do not get "cable=true" in the resulting OVF file (both 1.0 and 2.0). This causes vargant to start the resulting VM box with unplugged cable (for the adapter in NAT mode), which in turn causes a timeout if I manually do not tick the "cable connected" checkbox on the newly started VM.

Other issues with OVF export are that the remote desktop server and audio adapter settings are not respected. When they are disabled for the VM to be exported, they are still enabled in the resulting OVF.

VirtualBox 5.1.2 r108956, Windows 10 Pro

comment:2 Changed 7 years ago by bstopp

I have tested this issue w/o Packer on both 5.1.0 and 5.1.2 and it is an issue on the 5.1.x release with respect to the OVF Export. The Cable Connected setting is not written to the OVF file so when an import of the appliance occurs the network is not enabled accordingly.

comment:3 Changed 6 years ago by mentalo

Is there any plan to fix this regression? Since it destroys the workflow with vagrant, it destroys my only reason to use VirtualBox in the first place.

comment:4 Changed 6 years ago by scantand

If you are using vagrant you can use the following workaround:

config.vm.provider "virtualbox" do |vb|
    # Workaround for https://www.virtualbox.org/ticket/15705
    vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
end

comment:5 Changed 6 years ago by cluelesscoder

It appears that this was created for the reasons described here  https://github.com/hashicorp/packer/issues/3757#issuecomment-235806039 - and according to that thread it is resolved.

Can this be marked as closed?

comment:6 Changed 6 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for the reminder!

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use