Ticket #5113 (assigned enhancement)

Opened 8 years ago

Last modified 4 weeks ago

OVF import - honor MAC address on network cards

Reported by: costan Owned by:
Priority: minor Component: OVF
Version: VirtualBox 3.1.0 Keywords:
Cc: Guest type: other
Host type: other

Description (last modified by michael) (diff)

SUMMARY Currently, importing OVF files with network cards that have MAC addresses specified does not honor the MAC addresses.

DETAILS A network card's MAC address is specified in a <rasd:Address> node, under the card's <item> node in <VirtualHardwareSection>. This is documented in the OVF 1.0 specification ( on page 22 in Table 4.

Exporting VirtualBox VMs to OVF doesn't include MAC address information either, so I'm assuming the importing/exporting code was written without regard to this attribute. The VirtualBox GUI supports setting MAC addresses on network cards, so the problem can be solved by augmenting the OVF import code.

Change History

comment:1 Changed 8 years ago by costan

I spent an hour reading code before giving up, so I figured I should document where I got.

The import code seems to be in trunk/src/VBox/Main/ApplianceImpl.cpp, Appliance::importFS. There are some layers of indirection there, and the SVN browser isn't the most efficient way to navigate the code.

The export code is also in trunk/src/VBox/Main/ApplianceImpl.cpp, Appliance::writeFS. It looks like a good starting point for understanding the data structures, and it might be easier to write the export code first.

comment:2 Changed 8 years ago by beleta

Please fix this bug. Without it is impossible to distribute Linux VMs to unexperienced people.

comment:3 Changed 8 years ago by klaus

  • Priority changed from major to minor
  • Version changed from VirtualBox 3.0.6 to VirtualBox 3.1.0
  • Type changed from defect to enhancement

This is certainly not a bug. On the contrary, I would consider it extremely dangerous to distribute VMs with a fixed MAC address to unexperienced people. Duplicate MAC addresses can cause huge network problems, which are very difficult to debug.

comment:4 Changed 8 years ago by costan

@klaus: OVF is a specification. Implementing it incorrectly qualifies as a bug IMO. Would you like it if Microsoft used the same "we don't like the spec" argument to defend Internet Explorer?

VMs with a fixed MAC are OK if they're connected to an internal-only network. In fact, they're quite useful for testing DHCP server implementations.

Please reconsider classifying this defect as an enhancement.

Thank you so much,


comment:5 follow-up: ↓ 6 Changed 8 years ago by klaus

OVF is a specification. Correct. But the rest of your argument is totally meaningless. The fact that OVF specifies how to include MAC addresses doesn't mean we must support this dangerous feature when importing or exporting.

I already set it to an enhhancement. Which we might implement one day, but quite likely with appropriate checks to verify that the user knows what he's doing.

comment:6 in reply to: ↑ 5 Changed 8 years ago by beleta

Replying to klaus:

Well it is a pity. We will have to keep using VMWare software as they seem not to be so worried about their customers doing dirty but useful things with their software.

By the way you allow changing MAC addresses manually in your program without any notice about the dangers involved.

Jose M Beleta

comment:7 Changed 7 years ago by umoeller

  • Owner set to umoeller
  • Status changed from new to assigned

All VirtualBox-specific settings are now preserved in custom OVF tags, starting with version 3.2. Can you try again whether this fixes your problem?

At this time, the MAC addresses are only exported in the vbox-specific OVF elements (under <vbox:Machine>) and not in the "proper" OVF elements (rasd:Address). We will address this shortly.

comment:8 Changed 4 weeks ago by michael

  • Owner umoeller deleted
  • Description modified (diff)
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use