Essentially the usb device connects for about 2-3 seconds, then disconnects for about 2-3 seconds, then reconnects... This also happens if I pass it through directly. If I install the spice-tools the mouse disappears, but even then the USB doesn't work. The error is the same but not exactly the same behavior as this; i.e. LIBUSB_ERROR_NOT_FOUND
Also, for some reason at random times the sound gets super staticky, and this seems to also sometimes be triggered by plugging in a usb. Notably, this stops happening if I use an LVN screen instead of spice.
You will likely have to do this everytime this issue is occuring and I don't know if it works for multiple devices at once or anything but the xbox controller. I will update if a better solution is found.
The Azure platform service-level agreement (SLA) applies to virtual machines (VMs) running the Linux operating system only when you're using one of the endorsed distributions. For endorsed distributions, Azure Marketplace provides preconfigured Linux images. For more information, see:
This article focuses on general guidance for running your Linux distribution on Azure. This article can't be comprehensive, because every distribution is different. Even if you meet all the criteria that this article describes, you might need to significantly tweak your Linux system for it to run properly.
Azure doesn't support the Hyper-V virtual hard disk (VHDX) format. Azure supports only fixed VHD. You can convert the disk to VHD format by using Hyper-V Manager or the Convert-VHD cmdlet. If you're using VirtualBox, select Fixed size rather than the default (Dynamically allocated) when you're creating the disk.
Using standard partitions will avoid LVM name conflicts with cloned VMs, particularly if an OS disk is ever attached to another identical VM for troubleshooting. You can use LVM or RAID on data disks.
Kernel support for mounting user-defined function (UDF) file systems is necessary. At first boot on Azure, the provisioning configuration is passed to the Linux VM via UDF-formatted media that are attached to the guest. The Azure Linux agent must mount the UDF file system to read its configuration and provision the VM.
All VHDs on Azure must have a virtual size aligned to 1 MB (1024 x 1024 bytes). When you're converting from a raw disk to VHD, ensure that the raw disk size is a multiple of 1 MB before conversion, as described later in this article.
Cloud-init version 21.2 or later removes the UDF requirement. But without the udf module enabled, the CD-ROM won't mount during provisioning, which prevents the custom data from being applied. A workaround is to apply user data. However, unlike custom data, user data isn't encrypted. For more information, see User data formats in the cloud-init documentation.
Azure runs on the Hyper-V hypervisor, so Linux requires certain kernel modules to run in Azure. If you have a VM that was created outside Hyper-V, the Linux installers might not include the drivers for Hyper-V in the initial RAM disk (initrd or initramfs), unless the VM detects that it's running in a Hyper-V environment.
When you're using a different virtualization system (such as VirtualBox or KVM) to prepare your Linux image, you might need to rebuild initrd so that at least the hv_vmbus and hv_storvsc kernel modules are available on the initial RAM disk. This known issue is for systems based on the upstream Red Hat distribution, and possibly others.
The mechanism for rebuilding the initrd or initramfs image can vary, depending on the distribution. Consult your distribution's documentation or support for the proper procedure. Here's one example for rebuilding initrd by using the mkinitrd utility:
VHD images on Azure must have a virtual size aligned to 1 MB. Typically, VHDs created through Hyper-V are aligned correctly. If the VHD isn't aligned correctly, you might get an error message similar to the following example when you try to create an image from your VHD:
In this case, resize the VM by using either the Hyper-V Manager console or the Resize-VHD PowerShell cmdlet. If you aren't running in a Windows environment, we recommend using qemu-img to convert (if needed) and resize the VHD.
There's a known bug in qemu-img for QEMU version 2.2.1 and some later versions that results in an improperly formatted VHD. The issue was fixed in QEMU 2.6. We recommend using version 2.2.0 or earlier, or using version 2.6 or later.
Calculate the required size of the disk image so that the virtual size is aligned to 1 MB. The following Bash shell script uses qemu-img info to determine the virtual size of the disk image, and then calculates the size to the next 1 MB:
The Linux Integration Services (LIS) drivers for Hyper-V and Azure are contributed directly to the upstream Linux kernel. Many distributions that include a recent Linux kernel version (such as 3.x) have these drivers available already, or otherwise provide backported versions of these drivers with their kernels.
If you're running a variant of RHEL versions 6.0 to 6.3, you need to install the latest LIS drivers for Hyper-V. Beginning with RHEL 6.4+ (and derivatives), the LIS drivers are already included with the kernel, so you don't need additional installation packages.
If a custom kernel is required, we recommend a recent kernel version (such as 3.8+). For distributions or vendors that maintain their own kernel, you need to regularly backport the LIS drivers from the upstream kernel to your custom kernel.
Even if you're already running a relatively recent kernel version, we highly recommend keeping track of any upstream fixes in the LIS drivers and backporting them as needed. The locations of the LIS driver source files are specified in the MAINTAINERS file in the Linux kernel source tree:
Make sure the udf and vfat modules are enabled. Disabling the udf module will cause a provisioning failure. Disabling the vfat module will cause both provisioning and boot failures. Cloud-init version 21.2 or later can provision VMs without requiring UDF if both of these conditions exist:
Modify the kernel boot line in GRUB or GRUB2 to include the following parameters, so that all console messages are sent to the first serial port. These messages can assist Azure support with debugging any issues.
Graphical and quiet boot aren't useful in a cloud environment, where you want all logs sent to the serial port. You can leave the crashkernel option configured if needed, but this parameter reduces the amount of available memory in the VM by at least 128 MB. Reducing available memory might be problematic for smaller VM sizes.
The Azure Linux Agent is required for provisioning a Linux image on Azure. Many distributions provide the agent as an .rpm or .deb package. The package is typically called WALinuxAgent or walinuxagent. You can also install the agent manually by following the steps in the Azure Linux Agent guide.
You can use the Azure Linux Agent or cloud-init to configure swap space via the local resource disk. This resource disk is attached to the VM after provisioning on Azure. The local resource disk is a temporary disk and might be emptied when the VM is deprovisioned. The following blocks show how to configure this swap.
If you're migrating a specific virtual machine and don't want to create a generalized image, skip the deprovisioning step. Running the command waagent -force -deprovision+user will render the source machine unusable. This step is intended only to create a generalized image.
I am running unraid 6.2 beta 21 and current have the wireless xbox dongle passed through as a device (simply by checking the checkbox during vm creation). On a fresh boot of the host machine I can load up a game and use the xbox controller fine for a random period of time (sometimes couple of minutes to ten minutes) before the light on the receiver turns off and it is no longer recognised by Windows 10.
I think this might be my problem. I am just ticking the boxes for the devices passed in when creating the vm. I did see the sticky at the top of the forum about usb controller passthrough. I looked at the date of the first post from jonp though and it was from the middle of last year. I figured with 6.2 beta being out now it wasn't needed but looks like I was wrong.
Interesting. Can you elaborate any more on this? Maybe there is something different in your environment because just passing the device through still causes dropouts for me and I am also on 6.2 beta 21 and using ovmf.
Can anybody help with the usb controller passthrough? On a clean vm installation with vnc the controller shows up correctly for pass through and I was able to install a fresh copy of w10. Once I got into windows I shutdown the system and clicked edit to change vnc back to passing through the video card with associated hdmi audio. I then edited the xml to ensure the manually added usb controller passthrough was set correctly. From this point firing up the vm I just get a blank display. Everything i have tried has not allowed me to pas this usb controller through with gpu passthrough enabled.
I have also tried creating a fresh vm and only ticking the logitec g5 mouse device as it is on another controller that is not passed through ( couldn't get it to work when it was plugged into the passed through controller). The mouse would freeze in unraid as soon as unraid loaded even know the vm wasn't even started.
In group 1 you have both your gpus and a pci bridge. You need to split these up into individual groups. Try enabling acs override under settings, vm settings. You will have to reboot server after for this to take effect.
Thanks for looking into this GridRunner I have been pulling my hair out. I new the two gpus were in the same iommu group but I didn't notice the pci bridge was too. Whilst I realise this currently prevents running to vm's how does it prevent usb controller passthrough from working. I would have thought the usb controller was separate? I guess if the usb controller is in the same iommu group as the pci bridge it interferes with gpu passthrough. Would explain why I have been having a hard time of it.
c80f0f1006