Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

[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

1 Answer 1

up vote 5 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

 
discard

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.