Hotswapping PCI devices

77 views
Skip to first unread message

Abel Luck

unread,
Dec 7, 2012, 11:08:41 AM12/7/12
to qubes-devel
Until a usable USBVM is available, I have to do lots of USB controller
swapping between VMs. Rebooting the VMs every time I want to move a
controller is a big PITA as it completely interrupts my workflow.

With Marek's advice, I created these two scripts which can be used to
detach and attach a PCI device from a domain while it is running.

Scripts: https://gist.github.com/4233822

~abel

signature.asc

Joanna Rutkowska

unread,
Dec 7, 2012, 4:28:12 PM12/7/12
to qubes...@googlegroups.com, Abel Luck, Marek Marczykowski
Marek, perhaps we can still add those two scripts to core that we will
release in Beta1?

BTW, shouldn't we check for a possible error of the actual pci-attach
command, something like this:

sudo xl pci-attach $domain $local_dev && echo "mapped $2 to $local_dev"

?
j.

signature.asc

Joanna Rutkowska

unread,
Dec 7, 2012, 4:29:41 PM12/7/12
to qubes...@googlegroups.com, Abel Luck, Marek Marczykowski
Or, better, yet, we could integrate those scripts with our current
qvm-pci -- i.e. proceed with hotswap if the VM is running, procced with
what is now otherwise.

joanna.

signature.asc

Marek Marczykowski

unread,
Dec 7, 2012, 4:33:24 PM12/7/12
to Joanna Rutkowska, qubes...@googlegroups.com, Abel Luck
On 07.12.2012 22:28, Joanna Rutkowska wrote:
> On 12/07/12 17:08, Abel Luck wrote:
>> Until a usable USBVM is available, I have to do lots of USB controller
>> swapping between VMs. Rebooting the VMs every time I want to move a
>> controller is a big PITA as it completely interrupts my workflow.
>>
>> With Marek's advice, I created these two scripts which can be used to
>> detach and attach a PCI device from a domain while it is running.
>>
>> Scripts: https://gist.github.com/4233822
>
> Marek, perhaps we can still add those two scripts to core that we will
> release in Beta1?

Perhaps integrate it into qvm-pci (IMHO as non-default option, because it can
break software running in VM if misused)?

But first I want to resolve #684.

> BTW, shouldn't we check for a possible error of the actual pci-attach
> command, something like this:
>
> sudo xl pci-attach $domain $local_dev && echo "mapped $2 to $local_dev"
>
> ?


--
Best Regards / Pozdrawiam,
Marek Marczykowski
Invisible Things Lab

signature.asc

Joanna Rutkowska

unread,
Dec 7, 2012, 4:35:22 PM12/7/12
to qubes...@googlegroups.com, Abel Luck, Marek Marczykowski
Abel, do you feel like integrating your scripts into qvm-pci yourself?

j.

signature.asc

Joanna Rutkowska

unread,
Aug 1, 2013, 8:48:18 AM8/1/13
to qubes...@googlegroups.com, Abel Luck, Marek Marczykowski
So, Abel? If you could send a proper patches, we could release it as
part of core-admin with Beta 3...

joanna.

signature.asc
Reply all
Reply to author
Forward
0 new messages