Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

[Background: I'd like to actually test How to take down a static network interface when not connected? ]

I'm setting up a QEMU-KVM virtual machine using libvirt (via virt-manager). I put two NICs on it (both virtio). They are bridged to a physical NIC on the host.

I want to test what NetworkManager does when I "unplug" one. But there isn't button/checkbox for that in virt-manager, nor a quick Google search turn up anything.

How do I emulate unplugging the network cable?

share|improve this question
virt-manager is not the best GUI ever made... – Hauke Laging Jun 28 '13 at 17:34
@HaukeLaging that is definitely true! – derobert Jun 28 '13 at 17:38
up vote 8 down vote accepted

You can do that in the console with

virsh domif-setlink domain interface-device state

and check it with

virsh domifstat domain interface-device

Have a look at the man page for details.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.