VirtualBox

Opened 14 years ago

Closed 4 years ago

#5113 closed enhancement (fixed)

OVF import - honor MAC address on network cards

Reported by: Victor Costan Owned by:
Component: OVF Version: VirtualBox 3.1.0
Keywords: Cc:
Guest type: other Host type: other

Description (last modified by Michael Thayer)

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 (http://www.dmtf.org/standards/published_documents/DSP0243_1.0.0.pdf) 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 (9)

comment:1 by Victor Costan, 14 years ago

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 by Jose M Beleta, 14 years ago

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

comment:3 by Klaus Espenlaub, 14 years ago

priority: majorminor
Type: defectenhancement
Version: VirtualBox 3.0.6VirtualBox 3.1.0

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 by Victor Costan, 14 years ago

@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,

Victor

comment:5 by Klaus Espenlaub, 14 years ago

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.

in reply to:  5 comment:6 by Jose M Beleta, 14 years ago

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 by umoeller, 14 years ago

Owner: set to umoeller
Status: newassigned

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 by Michael Thayer, 7 years ago

Description: modified (diff)
Owner: umoeller removed

comment:9 by aeichner, 4 years ago

Resolution: fixed
Status: assignedclosed

Should've been fixed long ago, please reopen if still an issue with a supported VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use