Skip to content
October 25, 2011 / BrianOFlan

Correction: How to redirect network traffic to your virtual machines

What do you do when a computer doesn’t work? What’s the first thing you do?

Turn it off and turn it back on again.

That usually works. No matter what it is? Caught on fire? Turn it off and then back on. (Perhaps also dousing the flames and cooling it.)

In fact, one of the only times this trick does not work is when you flip the power switch on and off as fast as you can over and over again just to see if your power supplies can take it.

So what do you do when your elaborate experiment in redirecting network traffic from a real server (as host) to its guest virtual machines fails to work immediately? Gently turn everything off: Power off the VMs, bounce the real server, restart everything and watch it magically perform as desired.

A little bit drastic, isn’t it? Turn the computer all-the-way off? Why not just restart the network service? Doesn’t work; it’s not the real network nor the real interfaces we’re concerned about but rather the virtual network.

I have a classy well-sized server running multiple VMs on a long-term, maximum uptime plan. I don’t want to bounce all the VMs, or restart all the VMware services. Can’t I flip some virtual power button on a virtual router? In fact, I can: Here’s the missing piece from a previous article that described how to configure host and guests to redirect external network traffic into VMs.

/usr/bin/vmware-networks --stop ;
/usr/bin/vmware-networks --start ;

Virtual delight.

(I also updated the original article to include restarting the virtual network as the final step.)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: