Opened 15 years ago
Closed 5 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 )
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 , 15 years ago
comment:2 by , 15 years ago
Please fix this bug. Without it is impossible to distribute Linux VMs to unexperienced people.
comment:3 by , 15 years ago
priority: | major → minor |
---|---|
Type: | defect → enhancement |
Version: | VirtualBox 3.0.6 → VirtualBox 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 , 15 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
follow-up: 6 comment:5 by , 15 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.
comment:6 by , 15 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 , 15 years ago
Owner: | set to |
---|---|
Status: | new → 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 by , 7 years ago
Description: | modified (diff) |
---|---|
Owner: | removed |
comment:9 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Should've been fixed long ago, please reopen if still an issue with a supported VirtualBox release.
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.