[qubes-users] Changing the NIC emulated for a DomU


I'm using Qubes R2B2, very happily, but have a problem running OpenBSD in a DomU.

One of the problems OpenBSD faces as a Xen DomU (and possibly FreeBSD?), is that the network card emulated by default (Realtek, I think), doesn't have a good driver; it constantly drops packets, leading to terrible network performance.

As a known Xen problem, it has its workarounds; use the e1000 or ne2k_pci network card drivers instead. This is easy to change under Xen itself, simply by amending the 'vif' line, including a 'model=e1000' directive.

In Qubes VM Manager, this option doesn't seem to exist, and editing the configuration file doesn't lead anywhere as it's regenerated at each VM instantiation.

Is there any way to change the emulated NIC driver in Qubes' VM Manager, whether graphically or through the CLI?

Thank you,


Actually there there isn't easy way to do it - the xen vm config is generated
at VM startup and 'model' parameter isn't set at all.
Two ways to do it anyway:
1. Copy xen config to some other name (current path get from qvm-prefs
output), then modify vif setting and pass the new config to qvm-start
--custom-config option.
1a. Someone have reported that editing manually "conf_file" attribute in
/var/lib/qubes/qubes.xml will also work (permanently - without using
--custom-config option all the time).

2. Edit /usr/lib64/python/site-packages/qubes/modules/01QubesHVM.py - in
function get_config_params add something like:
params['netdev'] += ",model=e1000"

The second option will take effect for all your HVMs.