Re: [libvirt] [PATCH] Mark defined networks as persistent

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

 



Jim Meyering wrote:
> Cole Robinson wrote:
>> We aren't setting the persistent bit when a network is defined, so
>> 'destroy' makes them disappear (though they will reappear later since
>> their persistent config is never removed).
>>
>> Attached patch fixes this.
>
> Hi Cole,
>
> Looks like you're on the right track.
> My reflex was to test for it...
> What before/after behavior change should I see?
> I tried this:
>
>   cat <<EOF > net.xml
>   <network>
>     <name>N</name>
>     <ip address="192.168.199.1" netmask="255.255.255.0"></ip>
>   </network>
>   EOF
>   qemud/libvirtd &
>   src/virsh 'net-define net.xml; net-destroy N; net-list'
>
> Then net-dumpxml N shows it's still there, as it should be.
> Of course, net-undefine does get rid of it for good, but you mentioned
> "destroy" above.
> Did I miss something?

To answer my own question,  Yes ;-)  we need net-lists' --all option.
Before the patch, running this
  src/virsh 'net-define net.xml; net-destroy N; net-list --all'
lists no network.
After your patch, it lists N.

So, ACK.

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]