I do something similar, generating a custom image that gets installed on multiple systems. I just have a startup script in my image that runs "virsh net-undefine default" during boot-up. If you are creating your own image, you should be able to insert something similar in your start-up process.

Peter

On 03/09/2016 07:19 AM, Andrei Perietanu wrote:

On Wed, Mar 9, 2016 at 3:05 PM, Andrea Bolognani <abologna@redhat.com> wrote:
On Wed, 2016-03-09 at 14:53 +0000, Andrei Perietanu wrote:
>
> On Wed, Mar 9, 2016 at 2:49 PM, Andrea Bolognani <abologna@redhat.com> wrote:
> > On Wed, 2016-03-09 at 14:15 +0000, Andrei Perietanu wrote:
> > > I am building a custom Linux image which includes KVM and will be installed on multiple machines. By default when
> > > installing libvirt you get a 'default network' which adds a 'vrbr0'.
> > > I found several tutorials online about removing this 'virbr0' but I would like to not have it in the first place.
> > >
> > > I am compiling libvirt from source so I would think there is some compile time option or some configuration file I
> > > need to change for the default network not to be included. 
> >
>
> It should be enough to run
>
>   # virsh net-autostart --disable default
>
> or delete
>
>   /etc/libvirt/qemu/networks/autostart/default.xml
>
> after installation. You can also run
>
>   # virsh net-undefine default
>
> or delete
>
>   /etc/libvirt/qemu/networks/default.xml
>
> if you are sure you're never going to need the
> default network.

>      Thanks for the answer, but this does not solve the problem. As I said I am building an linux image which will be
> installed on multiple machines. I don't want to have to go to each one and manually disable the default network. I
> would like to disable it in the image itself so that it's not installed in the first place. 

Not shipping either just the first file mentioned
or both of them in your image should do the trick.

Cheers.

--
Andrea Bolognani
Software Engineer - Virtualization Team

Not shipping default.xml is easier said then done; even if I remove it from the output build folder is still end's up being installed on the target machine once the linux image is extracted. Libvirt must store it somewhere internally but I can't figure out how to get rid of it.

Thanks,
Andrei 


The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you receive this in error please contact the sender and delete the material from any computer immediately. It is the policy of Klas  Limited to disavow the sending of offensive material and should you consider that the material contained in the message is offensive you should contact the sender immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW, Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish Limited Liability Company, with its registered office at Fourth Floor, One Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.



_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users