<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
You most definitely do not need to destroy and re-create a VM just
to add a 2nd network interface.<br>
<br>
I don't think those vnet interfaces got created by the host OS. I
believe those are created by KVM (or libvirt) when you start a VM. I
could be wrong though. But I just checked on my CentOS 6 KVM host
machine and I see as many vnet interfaces as many VMs are currently
running (or if one VM has two virtual network cards then of course
that VM results two vnet interfaces shown on the host). Here the
relevant part from one such VM's XML file (those XML files are under
the /etc/libvirt/qemu directory on my CentOS host ) :<br>
<br>
<interface type='bridge'><br>
<mac address='00:16:36:e2:20:ea'/><br>
<source bridge='br0'/><br>
<model type='virtio'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/><br>
</interface><br>
<interface type='bridge'><br>
<mac address='00:16:36:e2:20:eb'/><br>
<source bridge='br600'/><br>
<model type='virtio'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/><br>
</interface><br>
<br>
As you can see, there are two interfaces defined in this VM's XML
file. One is connected to the host's br0 interface and the 2nd is
connected to the host's br600 interface. You must make sure that all
your mac addesses are unique on your network though!!<br>
<br>
After editing a VM's XML file with your favorite editor, you need to
execute this command:<br>
virsh define /etc/libvirt/qemu/<i>your-vm-name</i>.xml<br>
or just simply use this editor:<br>
virsh edit <i>your-vm-name</i><br>
(but I hate vi, so I use my favorite editor and when I finished
editing I just run virsh define.)<br>
<br>
I edited VM's XML files many times and I can add/remove virtual
network cards without problems.<br>
<br>
Zoltan<br>
<br>
<div class="moz-cite-prefix">On 12/9/2015 9:55 AM, Howard Leadmon
wrote:<br>
</div>
<blockquote cite="mid:00f201d1325f$6891e9d0$39b5bd70$@leadmon.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><a moz-do-not-send="true"
name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">
Tried that as well, but this has to be something that gets
set at the OS level and loaded, as if you look at dmesg
output, you can see all the vnet?? nodes as the OS comes
online. So the question is, what is virt-install doing
that creates the needed vnet interface that is part of the
bridge. I really had to kill and reload the VM just to
load a second interface..<o:p></o:p></span></a></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">---<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">Howard
Leadmon </span><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in
0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<a class="moz-txt-link-abbreviated" href="mailto:centos-virt-bounces@centos.org">centos-virt-bounces@centos.org</a>
[<a class="moz-txt-link-freetext" href="mailto:centos-virt-bounces@centos.org">mailto:centos-virt-bounces@centos.org</a>] <b>On Behalf
Of </b>Zoltan Frombach<br>
<b>Sent:</b> Wednesday, December 9, 2015 2:42 AM<br>
<b>To:</b> Discussion about the virtualization on
CentOS <a class="moz-txt-link-rfc2396E" href="mailto:centos-virt@centos.org"><centos-virt@centos.org></a><br>
<b>Subject:</b> Re: [CentOS-virt] How to manually add
a new interface to a bridge device?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>I would stop the VM, edit its definition file (that's an
XML file) and then start it up. But be careful: After you
edit the XML file, you need to execute a command so KVM
re-reads that file. I forgot that command, but you can look
it up on Google.<o:p></o:p></p>
<div>
<p class="MsoNormal">On Dec 9, 2015 7:52 AM, "Howard
Leadmon" <<a moz-do-not-send="true"
href="mailto:howard@leadmon.net">howard@leadmon.net</a>>
wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC
1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Maybe
my google-fu is failing me, but I have spent the
past couple hours looking at how to add a vnet?
Device to my KVM host running CentOS 6, and for the
life of me I can’t get this going. <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">From
all my research if I want to add a device I should
just do ‘brctl addif br1 vnet14’ if I want to add a
vnet14 to bridge br1. When I do this, I get:<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">#
brctl addif br0 vnet14<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">interface
vnet14 does not exist!<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">If
I run a ‘brctl show’ I get the following:<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">#
brctl show<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">bridge
name bridge id STP enabled
interfaces<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">br0
8000.00237dd22a4c no eth0<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet0<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet10<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet11<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet13<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet2<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> vnet3<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet4<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet6<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet8<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">br1
8000.00237dd22a50 no eth1<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet1<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet12<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet5<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet7<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
vnet9<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Needless
to say the existing vnet?? Devices are in use on
guest VM’s currently.<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">When
I create a new VM using virt-install, I usually add
the following to my command line:<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="color:black">--network=bridge:br0
--network=bridge:br1</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="color:black"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="color:black">I messed up building a new VM,
and only added the br0 interface to the VM, but
need the br1 interface as well. So my question
is, or a pointer to how I can add that br1
interface to my existing VM, and create the needed
vnet14 interface for it to attach to?</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="color:black"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="color:black">If anyone can explain how to
do this, or give me a good pointer on where the
info is on how to do this, it would sure be a huge
help..</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="color:black"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="color:black">Thanks…</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.5pt;color:#1F497D">---</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.5pt;color:#1F497D">Howard
Leadmon </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
CentOS-virt mailing list<br>
<a moz-do-not-send="true"
href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>
<a moz-do-not-send="true"
href="https://lists.centos.org/mailman/listinfo/centos-virt"
target="_blank">https://lists.centos.org/mailman/listinfo/centos-virt</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
CentOS-virt mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a>
<a class="moz-txt-link-freetext" href="https://lists.centos.org/mailman/listinfo/centos-virt">https://lists.centos.org/mailman/listinfo/centos-virt</a>
</pre>
</blockquote>
<br>
</body>
</html>