Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the mtl library run on a ubantu virtual machine #1010

Open
zzwzds opened this issue Nov 16, 2024 · 4 comments
Open

Can the mtl library run on a ubantu virtual machine #1010

zzwzds opened this issue Nov 16, 2024 · 4 comments

Comments

@zzwzds
Copy link

zzwzds commented Nov 16, 2024

I tried to turn on iommu on the virtual machine but failed. I don't know if I need to turn on some setting in the BIOS on my host machine. My host machine is a laptop with an AMD CPU.

@PanKaker
Copy link
Collaborator

PanKaker commented Nov 20, 2024

Hi!

Thank you for reaching out.

Usually IOMMU enabled by default in BIOS, but it worth to check it.

  1. Please check that your processor support AMD-V feature (also known as AMD IOMMU/ Virtualization).
  2. Enable IOMMU in BIOS:
    Once in the BIOS/UEFI settings, follow these general steps:
    Navigate to the Advanced or CPU Configuration section:
    Look for an option related to IOMMU or AMD-V: The exact name may vary based on your laptop's manufacturer. Some possible names include:
IOMMU
AMD IOMMU
SVM Mode (for AMD-V support)
IOMMU Support
AMD-V (sometimes listed as AMD Virtualization)

Enable IOMMU or AMD-V: If you find this option, enable it, save the bios settings and exit.

  1. Configure your virtual machine.
    Depending on the virtualization software you are using (e.g., VirtualBox, VMware, KVM), you may need to enable IOMMU or passthrough settings in the virtual machine configuration.

Here is an example for VirtualBox:

Open VirtualBox and select your VM.
Go to Settings > System > Acceleration.
Enable VT-x/AMD-V and Nested Paging.
Save the settings and start the VM.

If it won't help please share with us more details of your HW and SW:

  • CPU model.
  • Virtualization Software.
  • OS configuration.

@zzwzds
Copy link
Author

zzwzds commented Nov 20, 2024

I found that after I started Iommu, I still couldn't bind the vfio-pci driver. The error was as follows:

dpdk-devbind.py -b vfio-pci 0000:02:06.0
Error: bind failed for 0000:02:06.0 - Cannot bind to driver vfio-pci: [Errno 22] Invalid argument
Error: unbind failed for 0000:02:06.0 - Cannot open /sys/bus/pci/drivers//unbind: [Errno 13] Permission denied: '/sys/bus/pci/drivers//unbind'

Do you know why?

@PanKaker
Copy link
Collaborator

Hi!

Could you please share the output of
dpdk-devbind.py -s?

Please don't forget to use sudo/root when you use dpdk-devbind.py script.

@zzwzds
Copy link
Author

zzwzds commented Nov 21, 2024

root@ubantu22:~# dpdk-devbind.py -s

Network devices using kernel driver

0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens33 drv=e1000 unused=vfio-pci Active
0000:02:05.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens37 drv=e1000 unused=vfio-pci Active

Other Network devices

0000:02:06.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' unused=e1000,vfio-pci

No 'Baseband' devices detected

No 'Crypto' devices detected

No 'DMA' devices detected

No 'Eventdev' devices detected

No 'Mempool' devices detected

No 'Compress' devices detected

No 'Misc (rawdev)' devices detected

No 'Regex' devices detected

No 'ML' devices detected

root@ubantu22:~# dpdk-devbind.py -b vfio-pci 0000:02:06.0
Error: bind failed for 0000:02:06.0 - Cannot bind to driver vfio-pci: [Errno 22] Invalid argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants