[libvirt-users] how to disable vnet_hdr through libvirt

Hi, I am using libvirt and virsh to create my VM on KVM. It works fine. However, I need to turn off vnet_hdr for virtio interface. Does anyone know how to do it through libvirt? Thanks.

On Fri, Feb 28, 2014 at 07:11:13PM +0000, Jianfeng Tang wrote:
Hi,
I am using libvirt and virsh to create my VM on KVM. It works fine. However, I need to turn off vnet_hdr for virtio interface.
Does anyone know how to do it through libvirt?
There's no support for disabling it - if we detect a host which supports it, it will be unconditionally enabled. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Thank you Daniel. How difficult to extend libvirt for this? One critical application on my VM needs to turn vnet_hdr off. I can switch to use qemu directly. However, in that way I will lose all the nice things provided by libvirt. Thanks, ~Jianfeng On 3/3/14 3:53 AM, "Daniel P. Berrange" <berrange@redhat.com> wrote:
On Fri, Feb 28, 2014 at 07:11:13PM +0000, Jianfeng Tang wrote:
Hi,
I am using libvirt and virsh to create my VM on KVM. It works fine. However, I need to turn off vnet_hdr for virtio interface.
Does anyone know how to do it through libvirt?
There's no support for disabling it - if we detect a host which supports it, it will be unconditionally enabled.
Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Tue, Mar 04, 2014 at 03:56:06PM +0000, Jianfeng Tang wrote:
Thank you Daniel. How difficult to extend libvirt for this? One critical application on my VM needs to turn vnet_hdr off.
Can you explain why in more detail. We don't expose this as a configurable setting because we don't believe there's any compelling reason to disable it. ie it offers clear performance benefits with no downsides. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Daniel P. Berrange <berrange@...> writes:
On Tue, Mar 04, 2014 at 03:56:06PM +0000, Jianfeng Tang wrote:
Thank you Daniel. How difficult to extend libvirt for this? One critical application on my VM needs to turn vnet_hdr off.
Can you explain why in more detail. We don't expose this as a configurable setting because we don't believe there's any compelling reason to disable it. ie it offers clear performance benefits with no downsides.
Regards, Daniel
No special reason. Just in my case I was told to turn off vnet_hdr in order to make my VM work properly. I have two choices: extend libvirt or switch to use qemu command. I asked them to fix it in their product, but it is out of my control and it did not fit in my timeline.

On Thu, Mar 06, 2014 at 03:46:18PM +0000, JIANFENG TANG wrote:
Daniel P. Berrange <berrange@...> writes:
On Tue, Mar 04, 2014 at 03:56:06PM +0000, Jianfeng Tang wrote:
Thank you Daniel. How difficult to extend libvirt for this? One critical application on my VM needs to turn vnet_hdr off.
Can you explain why in more detail. We don't expose this as a configurable setting because we don't believe there's any compelling reason to disable it. ie it offers clear performance benefits with no downsides.
No special reason. Just in my case I was told to turn off vnet_hdr in order to make my VM work properly.
Without technical details of why the person told you todo that, I'd say that is a bogus request, so not a reason to support this as a tunable. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Daniel P. Berrange
-
Jianfeng Tang
-
JIANFENG TANG