Page 1 of 1

Simulating network outage

Posted: 6. Dec 2012, 00:44
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?

Re: Simulating network outage

Posted: 6. Dec 2012, 04:05
by Perryg
You can disable the cable connect on a per VM basis but not as a whole.

Re: Simulating network outage

Posted: 6. Dec 2012, 05:21
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)'

Re: Simulating network outage

Posted: 6. Dec 2012, 11:23
by Martin
You could try VBoxManage controlvm <name> setlinkstateX off