Changeset 101461 in vbox
- Timestamp:
- Oct 17, 2023 8:37:28 AM (15 months ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp
r101459 r101461 483 483 hrc = virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam()); H(); 484 484 485 PlatformArchitecture_T platformArchHost; 486 hrc = host->COMGETTER(Architecture)(&platformArchHost); H(); 487 485 488 ComPtr<IFirmwareSettings> firmwareSettings; 486 489 hrc = pMachine->COMGETTER(FirmwareSettings)(firmwareSettings.asOutParam()); H(); … … 517 520 ComPtr<IPlatform> platform; 518 521 pMachine->COMGETTER(Platform)(platform.asOutParam()); H(); 522 523 #if 1 /* For now we only support running same-same architectures (e.g. x86 VMs on x86 hosts). */ 524 PlatformArchitecture_T platformArchMachine; 525 hrc = platform->COMGETTER(Architecture)(&platformArchMachine); H(); 526 if (platformArchMachine != platformArchHost) 527 return pVMM->pfnVMR3SetError(pUVM, VERR_PLATFORM_ARCH_NOT_SUPPORTED, RT_SRC_POS, 528 N_("VM platform architecture (%s) not supported on this host (%s)."), 529 Global::stringifyPlatformArchitecture(platformArchMachine), 530 Global::stringifyPlatformArchitecture(platformArchHost)); 531 #endif 519 532 520 533 ChipsetType_T chipsetType; -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r101374 r101461 317 317 * @param strName Name for the machine. 318 318 * @param aArchitecture Architecture to use for the machine. 319 * If a valid guest OS type is set via @aOsType, the guest OS' type will be used instead then. 319 320 * @param llGroups list of groups for the machine. 320 321 * @param strOsType OS Type string (stored as is if aOsType is NULL). … … 460 461 AssertComRC(hrc); 461 462 463 /* Use the platform architecture which was handed-in by default. */ 464 PlatformArchitecture_T enmPlatformArch = aArchitecture; 465 462 466 if (aOsType) 463 467 { 464 468 /* Store OS type */ 465 469 mUserData->s.strOsType = aOsType->i_id(); 470 471 /* Use the platform architecture of the found guest OS type. */ 472 enmPlatformArch = aOsType->i_platformArchitecture(); 466 473 } 467 474 else if (!strOsType.isEmpty()) … … 472 479 473 480 /* Set the platform architecture first before applying the defaults below. */ 474 hrc = mPlatform->i_initArchitecture( aArchitecture);481 hrc = mPlatform->i_initArchitecture(enmPlatformArch); 475 482 if (FAILED(hrc)) return hrc; 476 483 -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r101318 r101461 2240 2240 aSettingsFile.c_str(), aName.c_str(), aArchitecture, aOsTypeId.c_str(), aFlags.c_str())); 2241 2241 2242 #if 12243 /**2244 * We only allow same-same platform architectures (x86 VMs for x86 hosts, for instance) for now.2245 *2246 * This might change in the future, but for now we simply overwrite the architecture the caller handed-in2247 * with the host architecture.2248 */2249 aArchitecture = PlatformProperties::s_getHostPlatformArchitecture();2250 #endif2251 2252 2242 StringsList llGroups; 2253 2243 HRESULT hrc = i_convertMachineGroups(aGroups, &llGroups);
Note:
See TracChangeset
for help on using the changeset viewer.