VirtualBox

Changeset 28956 in vbox


Ignore:
Timestamp:
May 2, 2010 6:20:41 PM (15 years ago)
Author:
vboxsync
Message:

Main/OVF: make vbox:Machine element more compliant with OVF standard so that vmware will accept it

File:
1 edited

Legend:

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

    r28800 r28956  
    12731273    // under the vbox: namespace
    12741274    xml::ElementNode *pelmVBoxMachine = pelmVirtualSystem->createChild("vbox:Machine");
     1275    // ovf:required="false" tells other OVF parsers that they can ignore this thing
     1276    pelmVBoxMachine->setAttribute("ovf:required", "false");
     1277    // ovf:Info element is required or VMware will bail out on the vbox:Machine element
     1278    pelmVBoxMachine->createChild("ovf:Info")->addContent("Complete VirtualBox machine configuration in VirtualBox format");
     1279
     1280    // create an empty machine config
    12751281    settings::MachineConfigFile *pConfig = new settings::MachineConfigFile(NULL);
    12761282
     
    12781284    {
    12791285        AutoWriteLock machineLock(vsdescThis->m->pMachine COMMA_LOCKVAL_SRC_POS);
     1286        // fill the machine config
    12801287        vsdescThis->m->pMachine->copyMachineDataToSettings(*pConfig);
     1288        // write the machine config to the vbox:Machine element
    12811289        pConfig->buildMachineXML(*pelmVBoxMachine,
    12821290                                 settings::MachineConfigFile::BuildMachineXML_WriteVboxVersionAttribute);
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