Changeset 98782 in vbox
- Timestamp:
- Feb 28, 2023 2:40:28 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156093
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r98322 r98782 1459 1459 /* Should be defined here because it's used later, at least when ComposeMachineFilename() is called */ 1460 1460 Utf8Str strVMName("VM_exported_from_cloud"); 1461 Utf8Str strVMGroup("/"); 1462 Utf8Str strVMBaseFolder; 1463 Utf8Str strVMSettingFilePath; 1461 1464 1462 1465 if (m->virtualSystemDescriptions.size() == 1) … … 1491 1494 } 1492 1495 1493 /* Check the target path. If the path exists and folder isn't empty return an error */ 1494 { 1495 Bstr bstrSettingsFilename; 1496 Bstr bstrSettingsFilename; 1497 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_SettingsFile); 1498 if (aVBoxValues.size() == 0) 1499 { 1500 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_PrimaryGroup); 1501 if (aVBoxValues.size() != 0) 1502 strVMGroup = aVBoxValues[0]; 1503 1504 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_BaseFolder); 1505 if (aVBoxValues.size() != 0) 1506 strVMBaseFolder = aVBoxValues[0]; 1507 1496 1508 /* Based on the VM name, create a target machine path. */ 1497 1509 hrc = mVirtualBox->ComposeMachineFilename(Bstr(strVMName).raw(), 1498 Bstr( "/").raw(),1510 Bstr(strVMGroup).raw(), 1499 1511 NULL /* aCreateFlags */, 1500 NULL /* aBaseFolder */,1512 Bstr(strVMBaseFolder).raw(), 1501 1513 bstrSettingsFilename.asOutParam()); 1502 1514 if (FAILED(hrc)) 1503 1515 break; 1504 1516 } 1517 else 1518 { 1519 bstrSettingsFilename = aVBoxValues[0]; 1520 vsd->AddDescription(VirtualSystemDescriptionType_SettingsFile, 1521 bstrSettingsFilename.raw(), 1522 NULL); 1523 } 1524 1525 { 1526 // CPU count 1527 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_CPU); 1528 if (aVBoxValues.size() == 0)//1 CPU by default 1529 vsd->AddDescription(VirtualSystemDescriptionType_CPU, 1530 Bstr("1").raw(), 1531 NULL); 1532 1533 // RAM 1534 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_Memory); 1535 if (aVBoxValues.size() == 0)//1000MB by default 1536 vsd->AddDescription(VirtualSystemDescriptionType_Memory, 1537 Bstr("1000").raw(), 1538 NULL); 1539 1540 // audio adapter 1541 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_SoundCard); 1542 // if (aVBoxValues.size() == 0) 1543 // vsd->AddDescription(VirtualSystemDescriptionType_SoundCard, 1544 // Bstr("SB16").raw(), 1545 // NULL); 1546 1547 //description 1548 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_Description); 1549 if (aVBoxValues.size() == 0) 1550 vsd->AddDescription(VirtualSystemDescriptionType_Description, 1551 Bstr("There is no description for this VM").raw(), 1552 NULL); 1553 } 1554 1555 { 1505 1556 Utf8Str strMachineFolder(bstrSettingsFilename); 1506 1557 strMachineFolder.stripFilename();
Note:
See TracChangeset
for help on using the changeset viewer.