[libvirt-users] Possible to edit/apply nwfilter at runtime?

Laine Stump laine at redhat.com
Fri Feb 16 19:29:23 UTC 2018


On 02/16/2018 01:44 PM, Andre Goree wrote:
> On 2018/02/16 12:12 pm, Daniel P. Berrangé wrote:
>> On Fri, Feb 16, 2018 at 11:59:42AM -0500, Andre Goree wrote:
>>> I'm trying to determine if it's possible to edit/attach/apply
>>> nwfilter rules
>>> at runtime?  I.e., after a VM is already running, can I apply a
>>> nwfilter to
>>> the VM and have it work without rebooting the machine?  Thus far,
>>> I've not
>>> come across a way to do so, but I thought I'd ask here before I chase my
>>> tail around Google.
>>
>> Simply re-define the nwfilter in question using  virsh nwfilter-define.
>> Any VMs using that filter will automatically update.
>>
>>
>> Regards,
>> Daniel
>> -- 
>> |: https://berrange.com      -o-   
>> https://www.flickr.com/photos/dberrange :|
>> |: https://libvirt.org         -o-           
>> https://fstop138.berrange.com :|
>> |: https://entangle-photo.org    -o-   
>> https://www.instagram.com/dberrange :|
> 
> 
> Thank you for the quick reply.
> 
> As for adding the nwfilter to a guest that does not already have the
> filter, will that guest need to be rebooted?  Or can I add it to the
> guest via 'virsh edit'?
> I ask becase, from what I can tell, adding a new filter via 'virsh edit'
> doesn't seem to work --


Changes made with virsh edit don't take effect until the domain has been
completely stopped and restarted. However, you can make some changes
take effect immediately by using "virsh update-device" with the --live
option (be sure to also specify --config if you want the change to still
be there the next time the domain is started.

> though it's good to know that once a 'filterref'
> has been defined in the guest, it can be adjusted on the fly.
> 




More information about the libvirt-users mailing list