middleware icon indicating copy to clipboard operation
middleware copied to clipboard

NAS-123677 / 24.10 / Improve error handling for already in use PCI devices

Open Qubad786 opened this issue 10 months ago • 3 comments

Problem:

An issue arises when the same PCI device is added to two virtual machines (VMs), and one of the VMs is already running. When the user attempts to start the second VM, QEMU raises an error indicating that the PCI device is already in use by another VM.

Solution:

To address this problem, validation for the PCI device has been updated. It now also considers whether the same PCI device is in use by another VM. If the PCI device is not in use by any other VM, it is marked as available for use or otherwise error out on middleware side that the device is already being used.

Qubad786 avatar Apr 22 '24 15:04 Qubad786

Jira URL: https://ixsystems.atlassian.net/browse/NAS-123677

bugclerk avatar Apr 22 '24 15:04 bugclerk

Wouldn't it be better to just highlight in use devices instead of removing them from the list alltogether? I'm running a setup where I pass through the same GPU to a Windows and a Linux VM, which are running mutually exclusive. While obviously not done every day, having to stop either VM before being able to setup (not run) a second, third, fourth, etc. still seems quite a bit annoying to me.

EDIT: Just skimmed over the changes again, now I'm unsure I've got this PR right. Does this even affect the list of available PCIe devices when setting one up for a VM? The changes suggest it is only about starting a VM which has devices assigned that are in use by other running VM's. If that's the case, that should be fine and you can just ignore my comment.

Migsi avatar Apr 26 '24 06:04 Migsi

@Migsi yes that is accurate so your case is still good to go ✅

Qubad786 avatar Apr 28 '24 23:04 Qubad786

This PR has been merged and conversations have been locked. If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

bugclerk avatar Apr 29 '24 19:04 bugclerk