Why AMD-V/RVI is not supported Officially by EVE-NG?

Moderator: mike

Post Reply
Linux@software
Posts: 24
Joined: Wed Jul 26, 2017 12:35 pm

Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by Linux@software » Sat Nov 09, 2019 8:02 pm

Hi,

Why AMD-V/RVI is not supported Officially by EVE-NG?

I read the below KVM FAQ and QEMU - ArchWiki article found below points to know about KVM and QEMU. Seem like KVM and QEMU supports both Intel and AMD. Since EVE-NG uses KVM and QEMU how AMD-V/RVI is not supported by EVE-NG. Is there any modification at architecture level in EVE-NG. Please some one can explain about EVE-NG architecture. And why it is not support AMD-V and any compatible issue with EVE-NG.

KVM FAQ: https://www.linux-kvm.org/page/FAQ#What ... .2F_hvm.3F

List of IOMMU-supporting hardware: https://en.wikipedia.org/wiki/List_of_I ... g_hardware

QEMU - ArchWiki: https://wiki.archlinux.org/index.php/QEMU#Enabling_KVM

What is Intel VT / AMD-V / hvm?
Intel VT and AMD's AMD-V are instruction set extensions that provide hardware assistance to virtual machine monitors. They enable running fully isolated virtual machines at native hardware speeds, for some workloads.

HVM (for Hardware Virtual Machine) is a vendor-neutral term often used to designate the x86 instruction set extensions.

How can I use AMD-V extension?
modprobe kvm-amd


CPU Performance
Modern processors come with a wide variety of performance enhancing features such as streaming instructions sets (sse) and other performance-enhancing instructions. These features vary from processor to processor.

QEMU and KVM default to a compatible subset of cpu features, so that if you change your host processor, or perform a live migration, the guest will see its cpu features unchanged. This is great for compatibility but comes at a performance cost.

To pass all available host processor features to the guest, use the command line switch

qemu -cpu host


Nested Guests
Nested guests are KVM guests run in a KVM guest. As of Feb 2018 this feature is considered working but experimental, and some limitations apply.

When describing nested guests, we will use the following terminology:

"L0" – the bare metal host, running KVM
"L1" – a VM running on L0; also called the "guest hypervisor" — as it itself is capable of running KVM
"L2" – a VM running on L1, also called the "nested guest"

Detailed
Why use it?
An additional layer of virtualization sometimes comes in handy. You might have access to a large virtual machine in a cloud environment that you want to compartmentalize into multiple workloads. You might be running a lab environment in a training session.

How to run
The KVM kernel modules do not enable nesting by default (though your distribution may override this default). To enable nesting, set the nested module parameter to Y or 1. You may set this parameter persistently in a file in /etc/modprobe.d in the L0 host, for example:

# If you have an Intel CPU, use this:
$ cat /etc/modprobe.d/kvm_intel.conf
options kvm-intel nested=Y

# If you have an AMD CPU, then this:
$ cat /etc/modprobe.d/kvm_amd.conf
options kvm-amd nested=1
Once your L0 host is capable of nesting, you should be able to start an L1 guest with the -cpu host option (or for better live migration compatibility, use a named CPU model supported by QEMU, such as: -cpu Haswell-noTSX-IBRS,vmx=on) and the guest will subsequently be capable of running an L2 guest with accelerated KVM.


Troubleshooting
How can I check that I'm not falling back to QEMU with no hardware acceleration?
If you think that you might not be using the hardware acceleration provided by the KVM module, here are a few steps to help you check this.

First of all, check that you don't have messages such as:


qemu-system-x86_64 -hda myvm.qcow2
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support

In that case, you can check that:

the modules are correctly loaded lsmod|grep kvm
you don't have a "KVM: disabled by BIOS" line in the output of dmesg
/dev/kvm exists and you have the correct rights to use it
Other ways to do the diagnostic:

if you have access to the QEMU monitor (Ctrl-Alt-2, use Ctrl-Alt-1 to get back to the VM display), enter the "info kvm" command and it should respond with "KVM support: enabled"
the right-end columns of the output from <code>lsmod|grep kvm on the host system, once the VM is started should show only non zero values. The value on the line corresponding to the architecture specific module (e-g kvm_intel, kvm_amd) show the number of VM using the module. For instance, if I have 2 VM running using the KVM module on a machine with vt, it will report:


Enabling KVM

KVM must be supported by your processor and kernel, and necessary kernel modules must be loaded. See KVM for more information.

To start QEMU in KVM mode, append -enable-kvm to the additional start options. To check if KVM is enabled for a running VM, enter the #QEMU monitor using Ctrl+Alt+2, and type info kvm.
Note:

The argument accel=kvm of the -machine option is equivalent to the -enable-kvm option.
If you start your VM with a GUI tool and experience very bad performance, you should check for proper KVM support, as QEMU may be falling back to software emulation.
KVM needs to be enabled in order to start Windows 7 and Windows 8 properly without a blue screen.

Enabling IOMMU (Intel VT-d/AMD-Vi) support

First enable IOMMU, see PCI passthrough via OVMF#Setting up IOMMU.

Add -device intel-iommu to create the IOMMU device:

$ qemu-system-x86_64 -enable-kvm -machine q35 -device intel-iommu -cpu host ..

Note: On Intel CPU based systems creating an IOMMU device in a QEMU guest with -device intel-iommu will disable PCI passthrough with an error like:

Device at bus pcie.0 addr 09.0 requires iommu notifier which is currently not supported by intel-iommu emulation

While adding the kernel parameter intel_iommu=on is still needed for remapping IO (e.g. PCI passthrough with vfio-pci), -device intel-iommu should not be set if PCI PCI passthrough is required.


What Is the Difference between QEMU and KVM?

As previously mentioned, QEMU can run independently, but due to the emulation being performed entirely in software it is extremely slow. To overcome this, QEMU allows you to use KVM as an accelerator so that the physical CPU virtualization extensions can be used. So to conclude QEMU is a type 2 hypervisor that runs within user space and performs virtual hardware emulation, where as KVM is a type 1 hypervisor that runs in kernel space, that allows a user space program access to the hardware virtualization features of various processors[3].

https://www.fir3net.com/images/articles ... ne.svg.png

Figure 1 - High-level overview of the KVM/QEMU virtualization environment

drhoades
Posts: 7
Joined: Mon Oct 22, 2018 6:15 pm

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by drhoades » Tue Nov 12, 2019 1:58 pm

I am also interested in the answer to this. I want to build a multipurpose machine with one of the soon to be released threadripper processors and run EVE-NG pro on it. However, not only is it unsupported but I don't believe you can even get a pro license on AMD hardware.

Are there any plans to explore this in the future from the development team? It seems like the new AMD Ryzen and Threadripper hardware would be ideal to run EVE-NG as it supports more CPU cores for less money than comparable Intel CPUs.

Linux@software
Posts: 24
Joined: Wed Jul 26, 2017 12:35 pm

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by Linux@software » Fri Nov 22, 2019 2:58 am

Hi,

In EVE-NG System Requirements mentioned "Ubuntu Xenial Xerus 16.04.X LTS 64bit (suggested with any processors)." Which means Bare Install supports both AMD and Intel Processes.

Could someone please confirm this.

Uldis (UD)
Posts: 5067
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by Uldis (UD) » Fri Nov 22, 2019 8:50 am

Reported that Bare and AMD is ok, but not with ESXi

Linux@software
Posts: 24
Joined: Wed Jul 26, 2017 12:35 pm

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by Linux@software » Sat Nov 23, 2019 5:27 am

Ok Thank you Uldis (UD)

zlimvos
Posts: 3
Joined: Fri Feb 07, 2020 5:19 pm

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by zlimvos » Fri May 08, 2020 5:03 pm

Hi all , just to make sure i got this right, that means I can run eve-ng on a ryzen with vmware workstation?

Uldis (UD)
Posts: 5067
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by Uldis (UD) » Fri May 08, 2020 11:57 pm

should be ok

drhoades
Posts: 7
Joined: Mon Oct 22, 2018 6:15 pm

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by drhoades » Tue Jun 02, 2020 9:35 pm

Does this mean that there are no limitations when running threadripper or ryzen? I thought it was mentioned that you might not be able to run 64 bit guests with AMD hardware before. Is this not the case now? Is there anything AMD users need to do post installation to make sure things are running most efficiently?

Also, is this for a bare metal install or a vmware workstation install that AMD is ok or both?

Thanks!

Post Reply