C. L. Martinez
2015-Feb-17 08:18 UTC
[CentOS-virt] Disable/stop nic in a virtual guest with virsh
Hi all, How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ... Thanks. P.D: Host is CentOS 6.6 x86_64 fully patched.
I don't think it can be done. I would try to remove the VM's vnet from the bridge it's connected to. HTH Lucian -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro ----- Original Message -----> From: "C. L. Martinez" <carlopmart at gmail.com> > To: centos-virt at centos.org > Sent: Tuesday, 17 February, 2015 08:18:56 > Subject: [CentOS-virt] Disable/stop nic in a virtual guest with virsh> Hi all, > > How can I stop/disable a nic in a virtual guest using a virsh > command?? I am searching the same effect like if I unplug network > cable ... Is it possible?? I have tried with "detach-interface" > command without luck. I don't want to remove the nic from guest > configuration, only to stop the nic ... > > Thanks. > > P.D: Host is CentOS 6.6 x86_64 fully patched. > _______________________________________________ > CentOS-virt mailing list > CentOS-virt at centos.org > http://lists.centos.org/mailman/listinfo/centos-virt
Sven Kieske
2015-Feb-17 13:43 UTC
[CentOS-virt] Disable/stop nic in a virtual guest with virsh
On 17/02/15 09:18, C. L. Martinez wrote:> Hi all, > > How can I stop/disable a nic in a virtual guest using a virsh > command?? I am searching the same effect like if I unplug network > cable ... Is it possible?? I have tried with "detach-interface" > command without luck. I don't want to remove the nic from guest > configuration, only to stop the nic ...Depending on your network architecture you could just ifdown the vmnet, but this just works if you don't have multiple vms on one vmnet (which you shouldn't). HTH -- Mit freundlichen Gr??en / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG K?nigsberger Stra?e 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Gesch?ftsf?hrer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplement?rin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
C. L. Martinez
2015-Feb-18 08:10 UTC
[CentOS-virt] Disable/stop nic in a virtual guest with virsh
On Tue, Feb 17, 2015 at 1:43 PM, Sven Kieske <s.kieske at mittwald.de> wrote:> > > On 17/02/15 09:18, C. L. Martinez wrote: >> Hi all, >> >> How can I stop/disable a nic in a virtual guest using a virsh >> command?? I am searching the same effect like if I unplug network >> cable ... Is it possible?? I have tried with "detach-interface" >> command without luck. I don't want to remove the nic from guest >> configuration, only to stop the nic ... > > Depending on your network architecture you could just ifdown > the vmnet, but this just works if you don't have multiple > vms on one vmnet (which you shouldn't). > > HTH > > --Ok, to do a ifdown of virtual bridge it seems the only option. Many thanks to all for your answers.