Permission denied as root for vfio-pci.conf Ubuntu server 18.04

I have no idea why I am getting this error.

sudo echo ‘vfio-pci’ > /etc/modules-load.d/vfio-pci.conf
-bash: /etc/modules-load.d/vfio-pci.conf: Permission denied

will provide any output anyone wants to see. Working towards a pcie passthrough on this machine and this is the first error I have ran into so far working off of the following how to.

only difference is I used vi instead of nano for text editing so far, and I am working with radeon cards instead of nvidia.

here are all the relevant outputs and files up to this point from the how to.

thor@virtlab_01:~$ lspci -nn | grep -i AMD
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Turks GL [FirePro V3900] [1002:674a]
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series] [1002:aa90]
04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750/8740 / R7 250E] [1002:683f]
04:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750/8740 / R7 250E] [1002:683f]
05:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]

sudo vi /etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=“intel_iommu=on”
GRUB_CMDLINE_LINUX=""

sudo nano /etc/modprobe.d/vfio.conf

options vfio-pci ids=1002:aab0,1002:683f,1002:674a,1002:aa90
~

that is about it for now. any help would be appreciated. Also I am obviously not into this so deep that a full nuke and rebuild is against the question if there is an easier way to pass these three AMD cards over and then also do usb device passthrough. I started on ESXi and it was SO easy but none of the USB controllers were passable and you can’t pass HID through on ESXI so I gave up on it for now. There may be an option to buy 2 usb pcie cards but I would prefer not to.

thanks for the help in advance.

  • andrew

Try with a straight su or sudo -s, and then run your command. I’ve experienced same happen before using sudo , where sudo -s fixed it for me.

1 Like

@ [AndrewBuchinger] Can you give some feedback if it worked?
Try logging in as root.
If you are root remove the sudo.
If you can’t sudo su try adding yourself to the sudoers file or use this tutorial:

Thread closed as it was outside the guidelines for thread revival. Please PM me or another moderator if you feel the thread was closed in error. See the FAQ for more information.

Feel free to create a new thread if you wish to continue this thread’s conversation.