Changeset 50196 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 23, 2014 6:15:23 PM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ApplianceImpl.h
r50174 r50196 1 1 /* $Id$ */ 2 3 2 /** @file 4 *5 3 * VirtualBox COM class implementation 6 4 */ … … 253 251 Utf8Str strRef; // reference number (hard disk controllers only) 254 252 Utf8Str strOvf; // original OVF value (type-dependent) 255 Utf8Str strV boxSuggested; // configuration value (type-dependent); original value suggested by interpret()256 Utf8Str strV boxCurrent; // configuration value (type-dependent); current value, either from interpret() or setFinalValue()253 Utf8Str strVBoxSuggested; // configuration value (type-dependent); original value suggested by interpret() 254 Utf8Str strVBoxCurrent; // configuration value (type-dependent); current value, either from interpret() or setFinalValue() 257 255 Utf8Str strExtraConfigSuggested; // extra configuration key=value strings (type-dependent); original value suggested by interpret() 258 256 Utf8Str strExtraConfigCurrent; // extra configuration key=value strings (type-dependent); current value, either from interpret() or setFinalValue() … … 280 278 const Utf8Str &strRef, 281 279 const Utf8Str &aOvfValue, 282 const Utf8Str &aV boxValue,280 const Utf8Str &aVBoxValue, 283 281 uint32_t ulSizeMB = 0, 284 282 const Utf8Str &strExtraConfig = ""); … … 287 285 const VirtualSystemDescriptionEntry* i_findControllerFromID(uint32_t id); 288 286 289 void i_importV boxMachineXML(const xml::ElementNode &elmMachine);287 void i_importVBoxMachineXML(const xml::ElementNode &elmMachine); 290 288 const settings::MachineConfigFile* i_getMachineConfig() const; 291 289 … … 325 323 }; 326 324 327 #endif // ____H_APPLIANCEIMPL325 #endif // !____H_APPLIANCEIMPL 328 326 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/include/ApplianceImplPrivate.h
r49749 r50196 1 1 /** @file 2 *3 2 * VirtualBox Appliance private data definitions 4 3 */ -
trunk/src/VBox/Main/include/netif.h
r47117 r50196 85 85 86 86 int NetIfList(std::list <ComObjPtr<HostNetworkInterface> > &list); 87 int NetIfEnableStaticIpConfig(VirtualBox *pV box, HostNetworkInterface * pIf, ULONG aOldIp, ULONG aNewIp, ULONG aMask);88 int NetIfEnableStaticIpConfigV6(VirtualBox *pV box, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength);89 int NetIfEnableDynamicIpConfig(VirtualBox *pV box, HostNetworkInterface * pIf);90 int NetIfCreateHostOnlyNetworkInterface (VirtualBox *pV box, IHostNetworkInterface **aHostNetworkInterface, IProgress **aProgress, const char *pcszName = NULL);91 int NetIfRemoveHostOnlyNetworkInterface (VirtualBox *pV box, IN_GUID aId, IProgress **aProgress);87 int NetIfEnableStaticIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG aNewIp, ULONG aMask); 88 int NetIfEnableStaticIpConfigV6(VirtualBox *pVBox, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength); 89 int NetIfEnableDynamicIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf); 90 int NetIfCreateHostOnlyNetworkInterface (VirtualBox *pVBox, IHostNetworkInterface **aHostNetworkInterface, IProgress **aProgress, const char *pcszName = NULL); 91 int NetIfRemoveHostOnlyNetworkInterface (VirtualBox *pVBox, IN_GUID aId, IProgress **aProgress); 92 92 int NetIfGetConfig(HostNetworkInterface * pIf, NETIFINFO *); 93 93 int NetIfGetConfigByName(PNETIFINFO pInfo); 94 94 int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState); 95 95 int NetIfGetLinkSpeed(const char *pcszIfName, uint32_t *puMbits); 96 int NetIfDhcpRediscover(VirtualBox *pV box, HostNetworkInterface * pIf);96 int NetIfDhcpRediscover(VirtualBox *pVBox, HostNetworkInterface * pIf); 97 97 int NetIfAdpCtlOut(const char * pcszName, const char * pcszCmd, char *pszBuffer, size_t cBufSize); 98 98 -
trunk/src/VBox/Main/include/ovfreader.h
r49029 r50196 253 253 RTCString strFormat; // value from DiskSection/Disk/@format 254 254 // typically http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized 255 RTCString uuidV box; // optional; if the file was exported by VirtualBox >= 3.2,255 RTCString uuidVBox; // optional; if the file was exported by VirtualBox >= 3.2, 256 256 // then this has the UUID with which the disk was registered 257 257 … … 555 555 CIMOSType_T cimos; 556 556 RTCString strCimosDesc; // readable description of the cimos type in the case of cimos = 0/1/102 557 RTCString strTypeV box; // optional type from @vbox:ostype attribute (VirtualBox 4.0 or higher)557 RTCString strTypeVBox; // optional type from @vbox:ostype attribute (VirtualBox 4.0 or higher) 558 558 559 559 RTCString strVirtualSystemType; // generic hardware description; OVF says this can be something like "vmx-4" or "xen"; … … 589 589 RTCString strVendorUrl; // product info if any; receives contents of VirtualSystem/ProductSection/VendorUrl 590 590 591 const xml::ElementNode // pointer to <vbox:Machine> element under <VirtualSystem> element or NULL if not present 592 *pelmVboxMachine; 591 const xml::ElementNode *pelmVBoxMachine; // pointer to <vbox:Machine> element under <VirtualSystem> element or NULL if not present 593 592 594 593 VirtualSystem() … … 599 598 fHasCdromDrive(false), 600 599 fHasUsbController(false), 601 pelmV boxMachine(NULL)600 pelmVBoxMachine(NULL) 602 601 { 603 602 } -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r49951 r50196 1 1 /* $Id$ */ 2 2 /** @file 3 *4 3 * IAppliance and IVirtualSystem COM class implementations. 5 4 */ … … 1322 1321 aRefs[i] = vsde.strRef; 1323 1322 aOVFValues[i] = vsde.strOvf; 1324 aVBoxValues[i] = vsde.strV boxCurrent;1323 aVBoxValues[i] = vsde.strVBoxCurrent; 1325 1324 aExtraConfigValues[i] = vsde.strExtraConfigCurrent; 1326 1325 } … … 1356 1355 aRefs[i] = vsde->strRef; 1357 1356 aOVFValues[i] = vsde->strOvf; 1358 aVBoxValues[i] = vsde->strV boxCurrent;1357 aVBoxValues[i] = vsde->strVBoxCurrent; 1359 1358 aExtraConfigValues[i] = vsde->strExtraConfigCurrent; 1360 1359 } … … 1389 1388 case VirtualSystemDescriptionValueType_Reference: aValues[i] = vsde->strRef; break; 1390 1389 case VirtualSystemDescriptionValueType_Original: aValues[i] = vsde->strOvf; break; 1391 case VirtualSystemDescriptionValueType_Auto: aValues[i] = vsde->strV boxCurrent; break;1390 case VirtualSystemDescriptionValueType_Auto: aValues[i] = vsde->strVBoxCurrent; break; 1392 1391 case VirtualSystemDescriptionValueType_ExtraConfig: aValues[i] = vsde->strExtraConfigCurrent; break; 1393 1392 } … … 1425 1424 if (aEnabled[i]) 1426 1425 { 1427 vsde.strV boxCurrent = aVBoxValues[i];1426 vsde.strVBoxCurrent = aVBoxValues[i]; 1428 1427 vsde.strExtraConfigCurrent = aExtraConfigValues[i]; 1429 1428 } … … 1461 1460 const Utf8Str &strRef, 1462 1461 const Utf8Str &aOvfValue, 1463 const Utf8Str &aV boxValue,1462 const Utf8Str &aVBoxValue, 1464 1463 uint32_t ulSizeMB, 1465 1464 const Utf8Str &strExtraConfig /*= ""*/) … … 1470 1469 vsde.strRef = strRef; 1471 1470 vsde.strOvf = aOvfValue; 1472 vsde.strV boxSuggested // remember original value1473 = vsde.strV boxCurrent // and set current value which can be overridden by setFinalValues()1474 = aV boxValue;1471 vsde.strVBoxSuggested // remember original value 1472 = vsde.strVBoxCurrent // and set current value which can be overridden by setFinalValues() 1473 = aVBoxValue; 1475 1474 vsde.strExtraConfigSuggested 1476 1475 = vsde.strExtraConfigCurrent … … 1562 1561 * DOM tree. 1563 1562 */ 1564 void VirtualSystemDescription::i_importV boxMachineXML(const xml::ElementNode &elmMachine)1563 void VirtualSystemDescription::i_importVBoxMachineXML(const xml::ElementNode &elmMachine) 1565 1564 { 1566 1565 settings::MachineConfigFile *pConfig = NULL; … … 1584 1583 1585 1584 /** 1586 * Returns the machine config created by importV boxMachineXML() or NULL if there's none.1585 * Returns the machine config created by importVBoxMachineXML() or NULL if there's none. 1587 1586 * @return 1588 1587 */ -
trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
r49951 r50196 1 1 /* $Id$ */ 2 2 /** @file 3 *4 3 * IAppliance and IVirtualSystem COM class implementations. 5 4 */ … … 212 211 if (!pIDEController.isNull()) 213 212 { 214 Utf8Str strV box;213 Utf8Str strVBox; 215 214 StorageControllerType_T ctlr; 216 215 rc = pIDEController->COMGETTER(ControllerType)(&ctlr); … … 218 217 switch(ctlr) 219 218 { 220 case StorageControllerType_PIIX3: strV box = "PIIX3"; break;221 case StorageControllerType_PIIX4: strV box = "PIIX4"; break;222 case StorageControllerType_ICH6: strV box = "ICH6"; break;219 case StorageControllerType_PIIX3: strVBox = "PIIX3"; break; 220 case StorageControllerType_PIIX4: strVBox = "PIIX4"; break; 221 case StorageControllerType_ICH6: strVBox = "ICH6"; break; 223 222 } 224 223 225 if (strV box.length())224 if (strVBox.length()) 226 225 { 227 226 lIDEControllerPrimaryIndex = (int32_t)pNewDesc->m->maDescriptions.size(); 228 227 pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, 229 228 Utf8StrFmt("%d", lIDEControllerPrimaryIndex), // strRef 230 strV box, // aOvfValue231 strV box); // aVboxValue229 strVBox, // aOvfValue 230 strVBox); // aVBoxValue 232 231 lIDEControllerSecondaryIndex = lIDEControllerPrimaryIndex + 1; 233 232 pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, 234 233 Utf8StrFmt("%d", lIDEControllerSecondaryIndex), 235 strV box,236 strV box);234 strVBox, 235 strVBox); 237 236 } 238 237 } … … 241 240 if (!pSATAController.isNull()) 242 241 { 243 Utf8Str strV box = "AHCI";242 Utf8Str strVBox = "AHCI"; 244 243 lSATAControllerIndex = (int32_t)pNewDesc->m->maDescriptions.size(); 245 244 pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerSATA, 246 245 Utf8StrFmt("%d", lSATAControllerIndex), 247 strV box,248 strV box);246 strVBox, 247 strVBox); 249 248 } 250 249 … … 256 255 if (SUCCEEDED(rc)) 257 256 { 258 Utf8Str strV box = "LsiLogic"; // the default in VBox257 Utf8Str strVBox = "LsiLogic"; // the default in VBox 259 258 switch(ctlr) 260 259 { 261 case StorageControllerType_LsiLogic: strV box = "LsiLogic"; break;262 case StorageControllerType_BusLogic: strV box = "BusLogic"; break;260 case StorageControllerType_LsiLogic: strVBox = "LsiLogic"; break; 261 case StorageControllerType_BusLogic: strVBox = "BusLogic"; break; 263 262 } 264 263 lSCSIControllerIndex = (int32_t)pNewDesc->m->maDescriptions.size(); 265 264 pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerSCSI, 266 265 Utf8StrFmt("%d", lSCSIControllerIndex), 267 strV box,268 strV box);266 strVBox, 267 strVBox); 269 268 } 270 269 else … … 276 275 // VirtualBox considers the SAS controller a class of its own but in OVF 277 276 // it should be a SCSI controller 278 Utf8Str strV box = "LsiLogicSas";277 Utf8Str strVBox = "LsiLogicSas"; 279 278 lSCSIControllerIndex = (int32_t)pNewDesc->m->maDescriptions.size(); 280 279 pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerSAS, 281 280 Utf8StrFmt("%d", lSCSIControllerIndex), 282 strV box,283 strV box);281 strVBox, 282 strVBox); 284 283 } 285 284 … … 885 884 886 885 // source path: where the VBox image is 887 const Utf8Str &strSrcFilePath = pDiskEntry->strV boxCurrent;886 const Utf8Str &strSrcFilePath = pDiskEntry->strVBoxCurrent; 888 887 Bstr bstrSrcFilePath(strSrcFilePath); 889 888 … … 1049 1048 if (!llName.size()) 1050 1049 throw setError(VBOX_E_NOT_SUPPORTED, tr("Missing VM name")); 1051 Utf8Str &strVMName = llName.back()->strV boxCurrent;1050 Utf8Str &strVMName = llName.back()->strVBoxCurrent; 1052 1051 pelmVirtualSystem->setAttribute("ovf:id", strVMName); 1053 1052 … … 1058 1057 std::list<VirtualSystemDescriptionEntry*> llVendorUrl = vsdescThis->i_findByType(VirtualSystemDescriptionType_VendorUrl); 1059 1058 std::list<VirtualSystemDescriptionEntry*> llVersion = vsdescThis->i_findByType(VirtualSystemDescriptionType_Version); 1060 bool fProduct = llProduct.size() && !llProduct.back()->strV boxCurrent.isEmpty();1061 bool fProductUrl = llProductUrl.size() && !llProductUrl.back()->strV boxCurrent.isEmpty();1062 bool fVendor = llVendor.size() && !llVendor.back()->strV boxCurrent.isEmpty();1063 bool fVendorUrl = llVendorUrl.size() && !llVendorUrl.back()->strV boxCurrent.isEmpty();1064 bool fVersion = llVersion.size() && !llVersion.back()->strV boxCurrent.isEmpty();1059 bool fProduct = llProduct.size() && !llProduct.back()->strVBoxCurrent.isEmpty(); 1060 bool fProductUrl = llProductUrl.size() && !llProductUrl.back()->strVBoxCurrent.isEmpty(); 1061 bool fVendor = llVendor.size() && !llVendor.back()->strVBoxCurrent.isEmpty(); 1062 bool fVendorUrl = llVendorUrl.size() && !llVendorUrl.back()->strVBoxCurrent.isEmpty(); 1063 bool fVersion = llVersion.size() && !llVersion.back()->strVBoxCurrent.isEmpty(); 1065 1064 if (fProduct || 1066 1065 fProductUrl || … … 1089 1088 pelmAnnotationSection->createChild("Info")->addContent("Meta-information about the installed software"); 1090 1089 if (fProduct) 1091 pelmAnnotationSection->createChild("Product")->addContent(llProduct.back()->strV boxCurrent);1090 pelmAnnotationSection->createChild("Product")->addContent(llProduct.back()->strVBoxCurrent); 1092 1091 if (fVendor) 1093 pelmAnnotationSection->createChild("Vendor")->addContent(llVendor.back()->strV boxCurrent);1092 pelmAnnotationSection->createChild("Vendor")->addContent(llVendor.back()->strVBoxCurrent); 1094 1093 if (fVersion) 1095 pelmAnnotationSection->createChild("Version")->addContent(llVersion.back()->strV boxCurrent);1094 pelmAnnotationSection->createChild("Version")->addContent(llVersion.back()->strVBoxCurrent); 1096 1095 if (fProductUrl) 1097 pelmAnnotationSection->createChild("ProductUrl")->addContent(llProductUrl.back()->strV boxCurrent);1096 pelmAnnotationSection->createChild("ProductUrl")->addContent(llProductUrl.back()->strVBoxCurrent); 1098 1097 if (fVendorUrl) 1099 pelmAnnotationSection->createChild("VendorUrl")->addContent(llVendorUrl.back()->strV boxCurrent);1098 pelmAnnotationSection->createChild("VendorUrl")->addContent(llVendorUrl.back()->strVBoxCurrent); 1100 1099 } 1101 1100 … … 1103 1102 std::list<VirtualSystemDescriptionEntry*> llDescription = vsdescThis->i_findByType(VirtualSystemDescriptionType_Description); 1104 1103 if (llDescription.size() && 1105 !llDescription.back()->strV boxCurrent.isEmpty())1104 !llDescription.back()->strVBoxCurrent.isEmpty()) 1106 1105 { 1107 1106 /* <Section ovf:required="false" xsi:type="ovf:AnnotationSection_Type"> … … 1120 1119 1121 1120 pelmAnnotationSection->createChild("Info")->addContent("A human-readable annotation"); 1122 pelmAnnotationSection->createChild("Annotation")->addContent(llDescription.back()->strV boxCurrent);1121 pelmAnnotationSection->createChild("Annotation")->addContent(llDescription.back()->strVBoxCurrent); 1123 1122 } 1124 1123 … … 1126 1125 std::list<VirtualSystemDescriptionEntry*> llLicense = vsdescThis->i_findByType(VirtualSystemDescriptionType_License); 1127 1126 if (llLicense.size() && 1128 !llLicense.back()->strV boxCurrent.isEmpty())1127 !llLicense.back()->strVBoxCurrent.isEmpty()) 1129 1128 { 1130 1129 /* <EulaSection> … … 1142 1141 1143 1142 pelmEulaSection->createChild("Info")->addContent("License agreement for the virtual system"); 1144 pelmEulaSection->createChild("License")->addContent(llLicense.back()->strV boxCurrent);1143 pelmEulaSection->createChild("License")->addContent(llLicense.back()->strVBoxCurrent); 1145 1144 } 1146 1145 … … 1171 1170 xml::ElementNode *pelmVBoxOSType = pelmOperatingSystemSection->createChild("vbox:OSType"); 1172 1171 pelmVBoxOSType->setAttribute("ovf:required", "false"); 1173 pelmVBoxOSType->addContent(pvsdeOS->strV boxCurrent);1172 pelmVBoxOSType->addContent(pvsdeOS->strVBoxCurrent); 1174 1173 1175 1174 // <VirtualHardwareSection ovf:id="hw1" ovf:transport="iso"> … … 1241 1240 const VirtualSystemDescriptionEntry &desc = *itD; 1242 1241 1243 LogFlowFunc(("Loop %u: handling description entry ulIndex=%u, type=%s, strRef=%s, strOvf=%s, strV box=%s, strExtraConfig=%s\n",1242 LogFlowFunc(("Loop %u: handling description entry ulIndex=%u, type=%s, strRef=%s, strOvf=%s, strVBox=%s, strExtraConfig=%s\n", 1244 1243 uLoop, 1245 1244 desc.ulIndex, … … 1252 1251 desc.strRef.c_str(), 1253 1252 desc.strOvf.c_str(), 1254 desc.strV boxCurrent.c_str(),1253 desc.strVBoxCurrent.c_str(), 1255 1254 desc.strExtraConfigCurrent.c_str())); 1256 1255 … … 1295 1294 strDescription = "Number of virtual CPUs"; 1296 1295 type = ovf::ResourceType_Processor; // 3 1297 desc.strV boxCurrent.toInt(uTemp);1296 desc.strVBoxCurrent.toInt(uTemp); 1298 1297 lVirtualQuantity = (int32_t)uTemp; 1299 1298 strCaption = Utf8StrFmt("%d virtual CPU", lVirtualQuantity); // without this ovftool won't eat the item … … 1315 1314 strDescription = "Memory Size"; 1316 1315 type = ovf::ResourceType_Memory; // 4 1317 desc.strV boxCurrent.toInt(uTemp);1316 desc.strVBoxCurrent.toInt(uTemp); 1318 1317 lVirtualQuantity = (int32_t)(uTemp / _1M); 1319 1318 strAllocationUnits = "MegaBytes"; … … 1335 1334 strDescription = "IDE Controller"; 1336 1335 type = ovf::ResourceType_IDEController; // 5 1337 strResourceSubType = desc.strV boxCurrent;1336 strResourceSubType = desc.strVBoxCurrent; 1338 1337 1339 1338 if (!lIDEPrimaryControllerIndex) … … 1381 1380 lBusNumber = 0; 1382 1381 1383 if ( desc.strV boxCurrent.isEmpty() // AHCI is the default in VirtualBox1384 || (!desc.strV boxCurrent.compare("ahci", Utf8Str::CaseInsensitive))1382 if ( desc.strVBoxCurrent.isEmpty() // AHCI is the default in VirtualBox 1383 || (!desc.strVBoxCurrent.compare("ahci", Utf8Str::CaseInsensitive)) 1385 1384 ) 1386 1385 strResourceSubType = "AHCI"; 1387 1386 else 1388 1387 throw setError(VBOX_E_NOT_SUPPORTED, 1389 tr("Invalid config string \"%s\" in SATA controller"), desc.strV boxCurrent.c_str());1388 tr("Invalid config string \"%s\" in SATA controller"), desc.strVBoxCurrent.c_str()); 1390 1389 1391 1390 // remember this ID … … 1417 1416 lBusNumber = 0; 1418 1417 1419 if ( desc.strV boxCurrent.isEmpty() // LsiLogic is the default in VirtualBox1420 || (!desc.strV boxCurrent.compare("lsilogic", Utf8Str::CaseInsensitive))1418 if ( desc.strVBoxCurrent.isEmpty() // LsiLogic is the default in VirtualBox 1419 || (!desc.strVBoxCurrent.compare("lsilogic", Utf8Str::CaseInsensitive)) 1421 1420 ) 1422 1421 strResourceSubType = "lsilogic"; 1423 else if (!desc.strV boxCurrent.compare("buslogic", Utf8Str::CaseInsensitive))1422 else if (!desc.strVBoxCurrent.compare("buslogic", Utf8Str::CaseInsensitive)) 1424 1423 strResourceSubType = "buslogic"; 1425 else if (!desc.strV boxCurrent.compare("lsilogicsas", Utf8Str::CaseInsensitive))1424 else if (!desc.strVBoxCurrent.compare("lsilogicsas", Utf8Str::CaseInsensitive)) 1426 1425 strResourceSubType = "lsilogicsas"; 1427 1426 else 1428 1427 throw setError(VBOX_E_NOT_SUPPORTED, 1429 tr("Invalid config string \"%s\" in SCSI/SAS controller"), desc.strV boxCurrent.c_str());1428 tr("Invalid config string \"%s\" in SCSI/SAS controller"), desc.strVBoxCurrent.c_str()); 1430 1429 1431 1430 // remember this ID … … 1519 1518 1520 1519 //skip empty Medium. There are no information to add into section <References> or <DiskSection> 1521 if (desc.strV boxCurrent.isNotEmpty())1520 if (desc.strVBoxCurrent.isNotEmpty()) 1522 1521 { 1523 1522 // the following references the "<Disks>" XML block … … 1577 1576 * PCNet32 for our PCNet types & E1000 for the 1578 1577 * E1000 cards. */ 1579 switch (desc.strV boxCurrent.toInt32())1578 switch (desc.strVBoxCurrent.toInt32()) 1580 1579 { 1581 1580 case NetworkAdapterType_Am79C970A: … … 1831 1830 // write the machine config to the vbox:Machine element 1832 1831 pConfig->buildMachineXML(*pelmVBoxMachine, 1833 settings::MachineConfigFile::BuildMachineXML_WriteV boxVersionAttribute1832 settings::MachineConfigFile::BuildMachineXML_WriteVBoxVersionAttribute 1834 1833 /*| settings::MachineConfigFile::BuildMachineXML_SkipRemovableMedia*/ 1835 1834 | settings::MachineConfigFile::BuildMachineXML_SuppressSavedState, … … 2076 2075 2077 2076 // source path: where the VBox image is 2078 const Utf8Str &strSrcFilePath = pDiskEntry->strV boxCurrent;2077 const Utf8Str &strSrcFilePath = pDiskEntry->strVBoxCurrent; 2079 2078 2080 2079 //skip empty Medium. In common, It's may be empty CD/DVD -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r50195 r50196 1 1 /* $Id$ */ 2 2 /** @file 3 *4 3 * IAppliance and IVirtualSystem COM class implementations. 5 4 */ … … 155 154 // if the virtual system in OVF had a <vbox:Machine> element, have the 156 155 // VirtualBox settings code parse that XML now 157 if (vsysThis.pelmV boxMachine)158 pNewDesc->i_importV boxMachineXML(*vsysThis.pelmVboxMachine);156 if (vsysThis.pelmVBoxMachine) 157 pNewDesc->i_importVBoxMachineXML(*vsysThis.pelmVBoxMachine); 159 158 160 159 // Guest OS type … … 163 162 Utf8StrFmt strCIMOSType("%RU32", (uint32_t)vsysThis.cimos); 164 163 // 1) If there is a <vbox:Machine>, then use the type from there. 165 if ( vsysThis.pelmV boxMachine164 if ( vsysThis.pelmVBoxMachine 166 165 && pNewDesc->m->pConfig->machineUserData.strOsType.isNotEmpty() 167 166 ) 168 167 strOsTypeVBox = pNewDesc->m->pConfig->machineUserData.strOsType; 169 168 // 2) Otherwise, if there is OperatingSystemSection/vbox:OSType, use that one. 170 else if (vsysThis.strTypeV box.isNotEmpty()) // OVFReader has found vbox:OSType171 strOsTypeVBox = vsysThis.strTypeV box;169 else if (vsysThis.strTypeVBox.isNotEmpty()) // OVFReader has found vbox:OSType 170 strOsTypeVBox = vsysThis.strTypeVBox; 172 171 // 3) Otherwise, make a best guess what the vbox type is from the OVF (CIM) OS type. 173 172 else … … 181 180 Utf8Str nameVBox; 182 181 /* If there is a <vbox:Machine>, we always prefer the setting from there. */ 183 if ( vsysThis.pelmV boxMachine182 if ( vsysThis.pelmVBoxMachine 184 183 && pNewDesc->m->pConfig->machineUserData.strName.isNotEmpty()) 185 184 nameVBox = pNewDesc->m->pConfig->machineUserData.strName; … … 264 263 ULONG cpuCountVBox; 265 264 /* If there is a <vbox:Machine>, we always prefer the setting from there. */ 266 if ( vsysThis.pelmV boxMachine265 if ( vsysThis.pelmVBoxMachine 267 266 && pNewDesc->m->pConfig->hardwareMachine.cCPUs) 268 267 cpuCountVBox = pNewDesc->m->pConfig->hardwareMachine.cCPUs; … … 287 286 uint64_t ullMemSizeVBox; 288 287 /* If there is a <vbox:Machine>, we always prefer the setting from there. */ 289 if ( vsysThis.pelmV boxMachine288 if ( vsysThis.pelmVBoxMachine 290 289 && pNewDesc->m->pConfig->hardwareMachine.ulMemorySizeMB) 291 290 ullMemSizeVBox = pNewDesc->m->pConfig->hardwareMachine.ulMemorySizeMB; … … 322 321 Utf8Str strSoundCardOrig; 323 322 /* If there is a <vbox:Machine>, we always prefer the setting from there. */ 324 if ( vsysThis.pelmV boxMachine323 if ( vsysThis.pelmVBoxMachine 325 324 && pNewDesc->m->pConfig->hardwareMachine.audioAdapter.fEnabled) 326 325 { … … 344 343 /* USB Controller */ 345 344 /* If there is a <vbox:Machine>, we always prefer the setting from there. */ 346 if ( ( vsysThis.pelmV boxMachine345 if ( ( vsysThis.pelmVBoxMachine 347 346 && pNewDesc->m->pConfig->hardwareMachine.usbSettings.llUSBControllers.size() > 0) 348 347 || vsysThis.fHasUsbController) … … 352 351 /* Network Controller */ 353 352 /* If there is a <vbox:Machine>, we always prefer the setting from there. */ 354 if (vsysThis.pelmV boxMachine)353 if (vsysThis.pelmVBoxMachine) 355 354 { 356 355 uint32_t maxNetworkAdapters = Global::getMaxNetworkAdapters(pNewDesc->m->pConfig->hardwareMachine.chipsetType); … … 464 463 bool fFloppy = false; 465 464 bool fDVD = false; 466 if (vsysThis.pelmV boxMachine)465 if (vsysThis.pelmVBoxMachine) 467 466 { 468 467 settings::StorageControllersList &llControllers = pNewDesc->m->pConfig->storageMachine.llStorageControllers; … … 528 527 strControllerID, // strRef 529 528 hdc.strControllerType, // aOvfValue 530 strType); // aV boxValue529 strType); // aVBoxValue 531 530 } 532 531 else … … 1565 1564 /* 1566 1565 * Restoring original UUID from OVF description file. 1567 * During import VB creates new UUIDs for imported images and1566 * During import VBox creates new UUIDs for imported images and 1568 1567 * assigns them to the images. In case of failure we have to restore 1569 1568 * the original UUIDs because those new UUIDs are obsolete now and … … 1799 1798 /* 1800 1799 * Restoring original UUID from OVF description file. 1801 * During import VB creates new UUIDs for imported images and1800 * During import VBox creates new UUIDs for imported images and 1802 1801 * assigns them to the images. In case of failure we have to restore 1803 1802 * the original UUIDs because those new UUIDs are obsolete now and … … 2689 2688 const VirtualSystemDescriptionEntry* pvsys = *nwIt; 2690 2689 2691 const Utf8Str &nwTypeVBox = pvsys->strV boxCurrent;2690 const Utf8Str &nwTypeVBox = pvsys->strVBoxCurrent; 2692 2691 uint32_t tt1 = RTStrToUInt32(nwTypeVBox.c_str()); 2693 2692 ComPtr<INetworkAdapter> pNetworkAdapter; … … 2823 2822 if (FAILED(rc)) throw rc; 2824 2823 2825 const char *pcszIDEType = vsdeHDCIDE.front()->strV boxCurrent.c_str();2824 const char *pcszIDEType = vsdeHDCIDE.front()->strVBoxCurrent.c_str(); 2826 2825 if (!strcmp(pcszIDEType, "PIIX3")) 2827 2826 rc = pController->COMSETTER(ControllerType)(StorageControllerType_PIIX3); … … 2845 2844 { 2846 2845 ComPtr<IStorageController> pController; 2847 const Utf8Str &hdcVBox = vsdeHDCSATA.front()->strV boxCurrent;2846 const Utf8Str &hdcVBox = vsdeHDCSATA.front()->strVBoxCurrent; 2848 2847 if (hdcVBox == "AHCI") 2849 2848 { … … 2870 2869 StorageBus_T busType = StorageBus_SCSI; 2871 2870 StorageControllerType_T controllerType; 2872 const Utf8Str &hdcVBox = vsdeHDCSCSI.front()->strV boxCurrent;2871 const Utf8Str &hdcVBox = vsdeHDCSCSI.front()->strVBoxCurrent; 2873 2872 if (hdcVBox == "LsiLogic") 2874 2873 controllerType = StorageControllerType_LsiLogic; … … 3156 3155 /* 3157 3156 * in this case it's an error because something wrong with OVF description file. 3158 * May be VB imports OVA package with wrong file sequence inside the archive.3157 * May be VBox imports OVA package with wrong file sequence inside the archive. 3159 3158 */ 3160 3159 throw setError(E_FAIL, … … 3194 3193 ComObjPtr<Medium> pTargetHD; 3195 3194 3196 Utf8Str savedV boxCurrent = vsdeTargetHD->strVboxCurrent;3195 Utf8Str savedVBoxCurrent = vsdeTargetHD->strVBoxCurrent; 3197 3196 3198 3197 i_importOneDiskImage(diCurrent, 3199 &vsdeTargetHD->strV boxCurrent,3198 &vsdeTargetHD->strVBoxCurrent, 3200 3199 pTargetHD, 3201 3200 stack, … … 3223 3222 3224 3223 Log(("Attaching disk %s to port %d on device %d\n", 3225 vsdeTargetHD->strV boxCurrent.c_str(), mhda.lControllerPort, mhda.lDevice));3224 vsdeTargetHD->strVBoxCurrent.c_str(), mhda.lControllerPort, mhda.lDevice)); 3226 3225 3227 3226 ComObjPtr<MediumFormat> mediumFormat; … … 3241 3240 ComPtr<IMedium> dvdImage(pTargetHD); 3242 3241 3243 rc = mVirtualBox->OpenMedium(Bstr(vsdeTargetHD->strV boxCurrent).raw(),3242 rc = mVirtualBox->OpenMedium(Bstr(vsdeTargetHD->strVBoxCurrent).raw(), 3244 3243 DeviceType_DVD, 3245 3244 AccessMode_ReadWrite, … … 3277 3276 3278 3277 /* restore */ 3279 vsdeTargetHD->strV boxCurrent = savedVboxCurrent;3278 vsdeTargetHD->strVBoxCurrent = savedVBoxCurrent; 3280 3279 3281 3280 ++cImportedDisks; … … 3459 3458 { 3460 3459 it1->fEnabled = true; 3461 it1->type = (NetworkAdapterType_T)vsdeNW->strV boxCurrent.toUInt32();3460 it1->type = (NetworkAdapterType_T)vsdeNW->strVBoxCurrent.toUInt32(); 3462 3461 break; 3463 3462 } … … 3647 3646 /* 3648 3647 * in this case it's an error because something wrong with OVF description file. 3649 * May be VB imports OVA package with wrong file sequence inside the archive.3648 * May be VBox imports OVA package with wrong file sequence inside the archive. 3650 3649 */ 3651 3650 throw setError(E_FAIL, … … 3718 3717 { 3719 3718 const ovf::DiskImage &di = itDiskImage->second; 3720 d.uuid = Guid(di.uuidV box);3719 d.uuid = Guid(di.uuidVBox); 3721 3720 } 3722 3721 ++avsdeHDsIt; … … 3726 3725 strUuid = d.uuid.toString(); 3727 3726 3728 if (diCurrent.uuidV box != strUuid)3727 if (diCurrent.uuidVBox != strUuid) 3729 3728 { 3730 3729 continue; … … 3734 3733 * step 3: import disk 3735 3734 */ 3736 Utf8Str savedV boxCurrent = vsdeTargetHD->strVboxCurrent;3735 Utf8Str savedVBoxCurrent = vsdeTargetHD->strVBoxCurrent; 3737 3736 ComObjPtr<Medium> pTargetHD; 3738 3737 i_importOneDiskImage(diCurrent, 3739 &vsdeTargetHD->strV boxCurrent,3738 &vsdeTargetHD->strVBoxCurrent, 3740 3739 pTargetHD, 3741 3740 stack, … … 3761 3760 ComPtr<IMedium> dvdImage(pTargetHD); 3762 3761 3763 rc = mVirtualBox->OpenMedium(Bstr(vsdeTargetHD->strV boxCurrent).raw(),3762 rc = mVirtualBox->OpenMedium(Bstr(vsdeTargetHD->strVBoxCurrent).raw(), 3764 3763 DeviceType_DVD, 3765 3764 AccessMode_ReadWrite, … … 3783 3782 3784 3783 /* restore */ 3785 vsdeTargetHD->strV boxCurrent = savedVboxCurrent;3784 vsdeTargetHD->strVBoxCurrent = savedVBoxCurrent; 3786 3785 3787 3786 /* … … 3899 3898 throw setError(VBOX_E_FILE_ERROR, 3900 3899 tr("Missing VM name")); 3901 stack.strNameVBox = vsdeName.front()->strV boxCurrent;3900 stack.strNameVBox = vsdeName.front()->strVBoxCurrent; 3902 3901 3903 3902 // have VirtualBox suggest where the filename would be placed so we can … … 3921 3920 throw setError(VBOX_E_FILE_ERROR, 3922 3921 tr("Missing guest OS type")); 3923 stack.strOsTypeVBox = vsdeOS.front()->strV boxCurrent;3922 stack.strOsTypeVBox = vsdeOS.front()->strVBoxCurrent; 3924 3923 3925 3924 // CPU count … … 3928 3927 throw setError(VBOX_E_FILE_ERROR, tr("CPU count missing")); 3929 3928 3930 stack.cCPUs = vsdeCPU.front()->strV boxCurrent.toUInt32();3929 stack.cCPUs = vsdeCPU.front()->strVBoxCurrent.toUInt32(); 3931 3930 // We need HWVirt & IO-APIC if more than one CPU is requested 3932 3931 if (stack.cCPUs > 1) … … 3940 3939 if (vsdeRAM.size() != 1) 3941 3940 throw setError(VBOX_E_FILE_ERROR, tr("RAM size missing")); 3942 stack.ulMemorySizeMB = (ULONG)vsdeRAM.front()->strV boxCurrent.toUInt64();3941 stack.ulMemorySizeMB = (ULONG)vsdeRAM.front()->strVBoxCurrent.toUInt64(); 3943 3942 3944 3943 #ifdef VBOX_WITH_USB … … 3953 3952 /* @todo: we support one audio adapter only */ 3954 3953 if (vsdeAudioAdapter.size() > 0) 3955 stack.strAudioAdapter = vsdeAudioAdapter.front()->strV boxCurrent;3954 stack.strAudioAdapter = vsdeAudioAdapter.front()->strVBoxCurrent; 3956 3955 3957 3956 // for the description of the new machine, always use the OVF entry, the user may have changed it in the import config 3958 3957 std::list<VirtualSystemDescriptionEntry*> vsdeDescription = vsdescThis->i_findByType(VirtualSystemDescriptionType_Description); 3959 3958 if (vsdeDescription.size()) 3960 stack.strDescription = vsdeDescription.front()->strV boxCurrent;3959 stack.strDescription = vsdeDescription.front()->strVBoxCurrent; 3961 3960 3962 3961 // import vbox:machine or OVF now -
trunk/src/VBox/Main/src-server/generic/NetIf-generic.cpp
r50174 r50196 364 364 } 365 365 366 int NetIfDhcpRediscover(VirtualBox * /* pV box */, HostNetworkInterface * /* pIf */)366 int NetIfDhcpRediscover(VirtualBox * /* pVBox */, HostNetworkInterface * /* pIf */) 367 367 { 368 368 return VERR_NOT_IMPLEMENTED; -
trunk/src/VBox/Main/src-server/os2/NetIf-os2.cpp
r44529 r50196 34 34 } 35 35 36 int NetIfEnableStaticIpConfig(VirtualBox *pV box, HostNetworkInterface * pIf, ULONG ip, ULONG mask)36 int NetIfEnableStaticIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf, ULONG ip, ULONG mask) 37 37 { 38 38 return VERR_NOT_IMPLEMENTED; 39 39 } 40 40 41 int NetIfEnableStaticIpConfigV6(VirtualBox *pV box, HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)41 int NetIfEnableStaticIpConfigV6(VirtualBox *pVBox, HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength) 42 42 { 43 43 return VERR_NOT_IMPLEMENTED; 44 44 } 45 45 46 int NetIfEnableDynamicIpConfig(VirtualBox *pV box, HostNetworkInterface * pIf)46 int NetIfEnableDynamicIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf) 47 47 { 48 48 return VERR_NOT_IMPLEMENTED; … … 50 50 51 51 52 int NetIfDhcpRediscover(VirtualBox *pV box, HostNetworkInterface * pIf)52 int NetIfDhcpRediscover(VirtualBox *pVBox, HostNetworkInterface * pIf) 53 53 { 54 54 return VERR_NOT_IMPLEMENTED; 55 55 } 56 -
trunk/src/VBox/Main/testcase/tstOVF.cpp
r50117 r50196 116 116 com::SafeArray<BSTR> aRefs; 117 117 com::SafeArray<BSTR> aOvfValues; 118 com::SafeArray<BSTR> aV boxValues;118 com::SafeArray<BSTR> aVBoxValues; 119 119 com::SafeArray<BSTR> aExtraConfigValues; 120 120 rc = pVSys->GetDescription(ComSafeArrayAsOutParam(aTypes), 121 121 ComSafeArrayAsOutParam(aRefs), 122 122 ComSafeArrayAsOutParam(aOvfValues), 123 ComSafeArrayAsOutParam(aV boxValues),123 ComSafeArrayAsOutParam(aVBoxValues), 124 124 ComSafeArrayAsOutParam(aExtraConfigValues)); 125 125 if (FAILED(rc)) throw MyError(rc, "VirtualSystemDescription::GetDescription() failed\n"); … … 226 226 u, u2, t, pcszType, 227 227 aOvfValues[u2], 228 aV boxValues[u2],228 aVBoxValues[u2], 229 229 aExtraConfigValues[u2]); 230 230 } -
trunk/src/VBox/Main/xml/Settings.cpp
r49983 r50196 5125 5125 * (when called from OVF). 5126 5126 * 5127 * -- BuildMachineXML_WriteV boxVersionAttribute: If set, add a settingsVersion5127 * -- BuildMachineXML_WriteVBoxVersionAttribute: If set, add a settingsVersion 5128 5128 * attribute to the machine tag with the vbox settings version. This is for 5129 5129 * the OVF export case in which we don't have the settings version set in … … 5149 5149 std::list<xml::ElementNode*> *pllElementsWithUuidAttributes) 5150 5150 { 5151 if (fl & BuildMachineXML_WriteV boxVersionAttribute)5151 if (fl & BuildMachineXML_WriteVBoxVersionAttribute) 5152 5152 // add settings version attribute to machine element 5153 5153 setVersionAttribute(elmMachine); … … 5823 5823 MachineConfigFile::BuildMachineXML_IncludeSnapshots 5824 5824 | MachineConfigFile::BuildMachineXML_MediaRegistry, 5825 // but not BuildMachineXML_WriteV boxVersionAttribute5825 // but not BuildMachineXML_WriteVBoxVersionAttribute 5826 5826 NULL); /* pllElementsWithUuidAttributes */ 5827 5827 -
trunk/src/VBox/Main/xml/ovfreader.cpp
r50148 r50196 227 227 228 228 // optional vbox:uuid attribute (if OVF was exported by VirtualBox != 3.2) 229 pelmDisk->getAttributeValue("uuid", d.uuidV box, "vbox");229 pelmDisk->getAttributeValue("uuid", d.uuidVBox, "vbox"); 230 230 231 231 const char *pcszFileRef; … … 331 331 // peek under the <VirtualSystem> node whether we have a <vbox:Machine> node; 332 332 // that case case, the caller can completely ignore the OVF but only load the VBox machine XML 333 vsys.pelmV boxMachine = pelmVirtualSystem->findChildElementNS("vbox", "Machine");333 vsys.pelmVBoxMachine = pelmVirtualSystem->findChildElementNS("vbox", "Machine"); 334 334 335 335 // now look for real OVF … … 809 809 if ((pelmVBoxOSType = pelmThis->findChildElementNS("vbox", // namespace 810 810 "OSType"))) // element name 811 vsys.strTypeV box = pelmVBoxOSType->getValue();811 vsys.strTypeVBox = pelmVBoxOSType->getValue(); 812 812 } 813 813 else if ( (!strcmp(pcszElemName, "AnnotationSection"))
Note:
See TracChangeset
for help on using the changeset viewer.