<div dir="ltr">On Wed, Feb 18, 2015 at 3:10 AM, C. L. Martinez <span dir="ltr">&lt;<a href="mailto:carlopmart@gmail.com" target="_blank">carlopmart@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Tue, Feb 17, 2015 at 1:43 PM, Sven Kieske &lt;<a href="mailto:s.kieske@mittwald.de">s.kieske@mittwald.de</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On 17/02/15 09:18, C. L. Martinez wrote:<br>
&gt;&gt; Hi all,<br>
&gt;&gt;<br>
&gt;&gt; How can I stop/disable a nic in a virtual guest using a virsh<br>
&gt;&gt; command?? I am searching the same effect like if I unplug network<br>
&gt;&gt; cable ... Is it possible?? I have tried with &quot;detach-interface&quot;<br>
&gt;&gt; command without luck. I don&#39;t want to remove the nic from guest<br>
&gt;&gt; configuration, only to stop the nic ...<br>
&gt;<br>
&gt; Depending on your network architecture you could just ifdown<br>
&gt; the vmnet, but this just works if you don&#39;t have multiple<br>
&gt; vms on one vmnet (which you shouldn&#39;t).<br>
&gt;<br>
&gt; HTH<br>
&gt;<br>
&gt; --<br>
<br>
Ok, to do a ifdown of virtual bridge it seems the only option.<br>
<br>
Many thanks to all for your answers.<br>
</blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra" style>* Definitely look to Juerg Haefliger&#39;s solution.  It&#39;s exactly what you want since you requested a method that can be done from the virsh interface.  Thanks Juerg!</div><br>1) down the vnetX interface from the host node<br></div><div class="gmail_extra" style>  ip link show dev vnetX</div><div class="gmail_extra" style>  ip link set down vnetX</div><div class="gmail_extra" style>  ip link show dev vnetX<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">And if using bridged networking, you have one more option.<br></div><div class="gmail_extra">2) remove the vnetX interface from the bridge</div><div class="gmail_extra">  brctl delif &lt;bridge_int&gt; vnetX</div><div class="gmail_extra"><br></div><div class="gmail_extra">Certainly downing the interface using either Juerg&#39;s solution via virsh or mine via iproute2 tools is most ideal since it&#39;s easier/simpler to reinstate.  You can use ifconfig if you prefer it over ip tools, but enjoy those tools and syntax while it remains! [0]  ;-)</div><div class="gmail_extra"><br></div><div class="gmail_extra">[0] <a href="https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/">https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/</a><br clear="all"><div><br></div>-- <br><div class="gmail_signature">---~~.~~---<br>Mike<br>//  SilverTip257  //</div>
</div></div>