|
1 | | -/* $Id: ApplianceImplImport.cpp 112403 2026-01-11 19:29:08Z knut.osmundsen@oracle.com $ */ |
| 1 | +/* $Id: ApplianceImplImport.cpp 114692 2026-07-14 10:57:00Z serkan.bayraktar@oracle.com $ */ |
2 | 2 | /** @file |
3 | 3 | * IAppliance and IVirtualSystem COM class implementations. |
4 | 4 | */ |
@@ -381,7 +381,23 @@ HRESULT Appliance::interpret() |
381 | 381 | /* The NVRAM file does not have a <vbox:Machine> entry so we only need to check the OVF details. */ |
382 | 382 | if (vsysThis.strNvramPath.isNotEmpty()) |
383 | 383 | pNewDesc->i_addEntry(VirtualSystemDescriptionType_NVRAM, "", vsysThis.strNvramPath, vsysThis.strNvramPath); |
384 | | - |
| 384 | + /* Check if any of the serial ports is configured with mode raw file. */ |
| 385 | + if (vsysThis.pelmVBoxMachine) |
| 386 | + { |
| 387 | + settings::SerialPortsList const &llSerialPorts = |
| 388 | + pNewDesc->m->pConfig->hardwareMachine.llSerialPorts; |
| 389 | + for (settings::SerialPortsList::const_iterator port_it = llSerialPorts.begin(); |
| 390 | + port_it != llSerialPorts.end(); |
| 391 | + ++port_it) |
| 392 | + { |
| 393 | + if (port_it->portMode == PortMode_RawFile) |
| 394 | + { |
| 395 | + i_addWarning(tr("Virtual appliance \"%s\" was configured with serial port(s) " |
| 396 | + "with \"raw file\" mode. These setting will not be imported"), vsysThis.strName.c_str()); |
| 397 | + break; |
| 398 | + } |
| 399 | + } |
| 400 | + } |
385 | 401 | /* Audio */ |
386 | 402 | Utf8Str strSoundCard; |
387 | 403 | Utf8Str strSoundCardOrig; |
@@ -6117,6 +6133,7 @@ void Appliance::i_importVBoxMachine(ComObjPtr<VirtualSystemDescription> &vsdescT |
6117 | 6133 | ComObjPtr<Machine> pNewMachine; |
6118 | 6134 | hrc = pNewMachine.createObject(); |
6119 | 6135 | if (FAILED(hrc)) throw hrc; |
| 6136 | + config.sanitizeImportedSerialPorts(); |
6120 | 6137 |
|
6121 | 6138 | // this magic constructor fills the new machine object with the MachineConfig |
6122 | 6139 | // instance that we created from the vbox:Machine |
|
0 commit comments