VirtualBox

Ignore:
Timestamp:
Oct 17, 2023 8:37:28 AM (20 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159530
Message:

Main: Allow creation of x86 VMs (based on guest OS type or the set architecture) on non-x86 hosts. bugref:10384

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp

    r101459 r101461  
    483483    hrc = virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam());           H();
    484484
     485    PlatformArchitecture_T platformArchHost;
     486    hrc = host->COMGETTER(Architecture)(&platformArchHost);                                 H();
     487
    485488    ComPtr<IFirmwareSettings> firmwareSettings;
    486489    hrc = pMachine->COMGETTER(FirmwareSettings)(firmwareSettings.asOutParam());             H();
     
    517520    ComPtr<IPlatform> platform;
    518521    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
    519532
    520533    ChipsetType_T chipsetType;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette