- Newest
- Most votes
- Most comments
Unfortunately, the r5a.xlarge instance type you're using does not support running VMs with hardware acceleration using KVM. Nested virtualization, which is required for running KVM-based VMs with hardware acceleration, is not officially supported on most EC2 instance types, including r5a.xlarge.
Nested virtualization is only officially supported on EC2 "bare metal" instance types. These instances provide direct access to the underlying hardware, allowing for nested virtualization capabilities. Regular EC2 instances, including r5a.xlarge, do not have this capability enabled by default.
While some users have reported success in enabling KVM on certain compute-optimized instances (like c5a series), this is not officially supported by AWS and may not be reliable or consistent across all instances or regions. It's important to note that even if you manage to enable it on a non-bare metal instance, it's not a supported configuration and may lead to unexpected behavior or performance issues.
If you absolutely need to run VMs with hardware acceleration using KVM, you should consider using a bare metal instance type. These instance types have names that end with ".metal", such as "c5.metal" or "m5.metal". These instances provide direct access to the hardware and support nested virtualization out of the box.
It's worth noting that bare metal instances are typically more expensive than their virtualized counterparts, so you should carefully consider your requirements and budget before choosing this option.
If nested virtualization is not strictly necessary for your use case, you might want to explore alternative solutions that don't require KVM, such as using container technologies or other virtualization methods that are compatible with standard EC2 instances.
Sources
EC2 Windows server 2022 not able to install WSL2 | AWS re:Post
Nested virtualisation support on EC2 compute optimized instances | AWS re:Post
Are KVM and nested virtualization supported on AWS ? | AWS re:Post
Relevant content
- asked 5 years ago
- asked 4 months ago
