[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [et-mgmt-tools] [PATCH 0/3] virt-install: support host device assignment



Daniel P. Berrange wrote:
> On Sun, Mar 01, 2009 at 11:41:11PM -0500, Cole Robinson wrote:
>> The following patches add support for host device assignment to virtinst
>> and virt-install.
>>
>> The patches aren't complete, since I'm not entirely sure how managed or
>> unmanaged devices coincide with HostDeviceDetach and HostDeviceReset,
>> and how this relates to PCI vs. USB. But it shouldn't be a big change
>> from what's posted.
> 
> If 'managed=yes' then libvirt will automatically detach the device
> from the host driver. This is nice & simple, but also nice & easy
> to shoot yourself in the foot - don't mix up the PCI id for the NIC
> you want to pasthrough with your SATA controller ;-)
> 
> If 'managed=no' then libvirt expects that the caller has already ensured
> the device is detached from the host before *ALL* attempts to start the
> guest, now & in the future. The app can use HostDeviceDetach todo this
> but remember it has to be manually run every time, which probably is not
> what you want. The more likely case for using managed=no, is if you have
> statically assigned the PCI device ID to pcistub.ko in /etc/modprobe.conf
> so that is guarenteed detached from the moment you boot.
> 
> I'd strongly recommend virt-install only use managed=yes, and don't make
> the use pick PCI ids off the list, rather present them with the human
> readable vendor and product names. When picking PCI devices you can
> also use the node device APIs to query for any other devices which are
> children of that PCI device - so if there are 2 identical NICs in the
> machine, you can show the user that one is eth0 and the other is eth1
> to help them pick the right one.
> 

Thanks. I updated patch 2 to attempt a Detach and Reset simply as a
sanity check (so if adding a PCI device via virt-manager the user can
find out it will fail at attach time, rather then the next VM boot).

- Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]