Konubinix' opinionated web of thoughts

Can I Run Sgx Inside a Virtual Machine? Common Sgx Installation Issues

Fleeting

can I run sgx inside a virtual machine?

According to this quote, it is not doable.

Virtualization software must be able to support, i.e., virtualize the SGX hardware features (extensions to the IA-32 instruction set). As far as I know, no virtualization software (VMware, VirtualBox, Xen, etc) has virtualized SGX….. yet. Until that happens, you won’t be able to run SGX in a VM.

But, this quote suggests that it is actually possible.

See Rust EDP.

Flexible launch control CPU configuration

Most Intel CPUs produced after 2018 that have SGX support also have FLC support.

To be able to use FLC, the BIOS must enable this functionality on boot. SGX works without FLC, but you won’t be able to run production-mode enclaves unless they are signed by an Intel-blessed signing key.

To enable FLC, you will need to re-configure your BIOS manually. This of course requires that the BIOS supports SGX. Your BIOS may also call this feature “Unlocked” launch control.

If you are running a virtual machine, make sure your hypervisor has SGX support.