libxl: reverse defaults on HVM net device attach
libvirt libxl picks its own default with respect to the default NIC to use. libxlMakeNic is the one responsible for this and on boot it picks LIBXL_NIC_TYPE_VIF_IOEMU for HVM domains such that it accomodates both PV and emulated one. The good behaving guest at boot will then select the pv and unplug the emulated device. Now, on HVM when attaching an interface it will pick the same default that is LIBXL_NIC_TYPE_VIF_IOEMU which as a result will fail the attach (see xen commit 32e9d0f ("libxl: nic type defaults to vif in hotplug for hvm guest"). Xen doesn't yet support the hotplug of emulated devices, but we don't want to rule out that case either, which might get support in the future. Hence we simply reverse the defaults when we are attaching the interface which allows libvirt to prefer the PV nic first without adding "model='netfront'" following the same pattern as above commit. Also to avoid ruling out the emulated one we set to LIBXL_NIC_TYPE_IOEMU when setting a model type that is not 'netfront'. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
Showing
想要评论请 注册 或 登录