Simulating network outage

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ceretullis
Posts: 2
Joined: 6. Dec 2012, 00:40

Simulating network outage

Post by ceretullis »

I have several VMs configured using internal networking. Is there a way to simulate a network outage on particular VM interfaces from the host OS while the guests are running?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Simulating network outage

Post by Perryg »

You can disable the cable connect on a per VM basis but not as a whole.
ceretullis
Posts: 2
Joined: 6. Dec 2012, 00:40

Re: Simulating network outage

Post by ceretullis »

Perryg wrote:You can disable the cable connect on a per VM basis but not as a whole.
Toggling by VM/interface is fine (actually what I want). Using the GUI to toggle the connectivity works while the VM is running. However, I have more than 4 NICs to toggle, so I really would like to use the command line for this.

Running 'vboxmanage modifyvm IMAGE_NAME --cableconnected5 off' yields the error 'VBoxManage.exe: error: The machine 'IMAGE_NAME' is already locked for a session (or being unlocked)'
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Simulating network outage

Post by Martin »

You could try VBoxManage controlvm <name> setlinkstateX off
Post Reply