how to simulate link failure?

Discussions about using Linux guests in VirtualBox.
Post Reply
bokica18
Posts: 1
Joined: 22. Apr 2010, 11:23
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Linux

how to simulate link failure?

Post by bokica18 »

Hi,

I'm running Linux guest on Windows XP host and I need to temporarily disable one internal interface on VM, while VM is running. I have to test link failure, so I would need something which will cause the same effect as the cable is unplugged. If I just do "ifconfig eth1 down", ethernet interface is still present.
I searched the forums and tried something like this:
VBoxManger "masterA" ----cableconnected 2 off.
and it didn't worked:

How to properly use this command, cause according to manuales it seems it can resolves my problem?

Thanks in advance,
Bojana
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: how to simulate link failure?

Post by Perryg »

VBoxManage controlvm <name|uuid> setlinkstate<1-N> <off|on>

VBoxManage controlvm Ubuntu-10.04 setlinkstate1 off
is the same as pulling the cable on the first adapter.
VBoxManage controlvm Ubuntu-10.04 setlinkstate1 on will plug the cable back in.
Post Reply