VirtualBox

Changeset 50447 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Feb 13, 2014 1:42:17 PM (11 years ago)
Author:
vboxsync
Message:

Main/Appliance: new options for suppressing MAC addresses on export
Frontends/VBoxManage: add support for the new options
doc/manual: document the new feature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp

    r50444 r50447  
    55
    66/*
    7  * Copyright (C) 2008-2013 Oracle Corporation
     7 * Copyright (C) 2008-2014 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    18351835        // fill the machine config
    18361836        vsdescThis->m->pMachine->copyMachineDataToSettings(*pConfig);
     1837
     1838        // Apply export tweaks to machine settings
     1839        bool fStripAllMACs = m->optListExport.contains(ExportOptions_StripAllMACs);
     1840        bool fStripAllNonNATMACs = m->optListExport.contains(ExportOptions_StripAllNonNATMACs);
     1841        if (fStripAllMACs || fStripAllNonNATMACs)
     1842        {
     1843            for (settings::NetworkAdaptersList::iterator it = pConfig->hardwareMachine.llNetworkAdapters.begin();
     1844                 it != pConfig->hardwareMachine.llNetworkAdapters.end();
     1845                 ++it)
     1846            {
     1847                settings::NetworkAdapter &nic = *it;
     1848                if (fStripAllMACs || (fStripAllNonNATMACs && nic.mode != NetworkAttachmentType_NAT))
     1849                    nic.strMACAddress.setNull();
     1850            }
     1851        }
    18371852
    18381853        // write the machine config to the vbox:Machine element
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette