VMware Communities
DaveP
Commander
Commander

How to modify Fusion network settings whitepaper

Like others in this forum, I need specific settings for the virtual networks setup on Windows and Linux version of VMware products. In Fusion the simplified installation and configuration means that rather than using the tools in the other versions of VMware, we need to take a different approach for now. Attached is a paper on changing IP address ranges for Fusion.

I will be working on other papers, and possibly new scripts to manage this, but for now I thought it would be useful to post it. Feedback & comments on this thread or via forum messaging would be appreciated, although I will be on vacation next week, with no web access.

Dave

Reply
0 Kudos
40 Replies
Pat_Lee
Virtuoso
Virtuoso

Dave,

Thanks for your hard work, this looks great.

Pat

Reply
0 Kudos
matthite
Contributor
Contributor

This is great, Dave. I really appreciate it. I am looking forward to part 2! If you have any information on how to configure custom networks for networks other than vmnet1 and vmnet8, please do share.

Thanks!

-M

Reply
0 Kudos
dan0016cb
Contributor
Contributor

Works on the 1.0 release. Thanks a lot for capturing this information!

Looking forward to any tips on adding more host-only vmnets.

Dan

Reply
0 Kudos
DaveP
Commander
Commander

Thanks for the feedback. I will be starting on the next part, adding additional adapters, this week.

Reply
0 Kudos
matthite
Contributor
Contributor

Thanks so much! Looking forward to it.

Reply
0 Kudos
InactiveX
Contributor
Contributor

Dave,

Thanks for this - got me out of a hole (in more ways than one).

Jason

Reply
0 Kudos
HogHerder
Contributor
Contributor

DaveP -- great work, please send anything you can on configuring additional virtual adapters to Fusion ASAP!

Reply
0 Kudos
DaveP
Commander
Commander

Here's the first quick update on adding a new bridged adapter and configuring the VMX file. Assumes that you have en0 and en1 adapters and that we will be using vmnet2 for 2nd bridged adapter. Please note if you are not comfortable editing bash scripts then best leave well alone. Please read the whitepaper first so you know where the files are located.

1. Edit boot.sh to add the following lines into the main procedure. Goto line 591 which should look like this:

  1. vmnet-bridge puts itself in background (daemon mode)

  1. Bridge to host network interface 'en0'.

#"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 en0

  1. Bridge to the primary host network interface (which can change over time).

"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 ''

;;

--stop)

logger -s -t "VMware Fusion 51348" "Shutting down VMware Fusion: "

  1. First attempt to synchronously kill the daemons this script had launched.

vmware_stop_pidfile /var/run/vmnet-bridge-vmnet0.pid || true

vmware_stop_pidfile /var/run/vmnet-dhcpd-vmnet1.pid || true

vmware_stop_pidfile /var/run/vmnet-dhcpd-vmnet8.pid || true

vmware_stop_pidfile /var/run/vmnet-natd-vmnet8.pid || true

vmware_stop_pidfile /var/run/vmnet-netif-vmnet1.pid || true

vmware_stop_pidfile /var/run/vmnet-netif-vmnet8.pid || true

You need to comment out line 595 and then add the lines shown below so that it matches the second code block.

  1. vmnet-bridge puts itself in background (daemon mode)

  1. Bridge to host network interface 'en0'.

#"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 en0

  1. Bridge to the primary host network interface (which can change over time).

#"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 ''

"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 en0

"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet2.pid vmnet2 en1

;;

--stop)

logger -s -t "VMware Fusion 51348" "Shutting down VMware Fusion: "

  1. First attempt to synchronously kill the daemons this script had launched.

vmware_stop_pidfile /var/run/vmnet-bridge-vmnet0.pid || true

vmware_stop_pidfile /var/run/vmnet-bridge-vmnet2.pid || true

vmware_stop_pidfile /var/run/vmnet-dhcpd-vmnet1.pid || true

vmware_stop_pidfile /var/run/vmnet-dhcpd-vmnet8.pid || true

vmware_stop_pidfile /var/run/vmnet-natd-vmnet8.pid || true

vmware_stop_pidfile /var/run/vmnet-netif-vmnet1.pid || true

vmware_stop_pidfile /var/run/vmnet-netif-vmnet8.pid || true

The difference is shown in the diff patch below:

--- boot.sh.bk! 2007-08-27 18:51:41.000000000 +0100

\+++ boot.sh 2007-08-28 14:40:47.000000000 +0100

@@ -592,7 +592,9 @@ case "$1" in

  1. Bridge to host network interface 'en0'.

#"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 en0

  1. Bridge to the primary host network interface (which can change over time).

\- "$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 ''

+ #"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 ''

+ "$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 en0

+ "$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet2.pid vmnet2 en2

;;

--stop)

@@ -600,6 +602,7 @@ case "$1" in

  1. First attempt to synchronously kill the daemons this script had launched.

vmware_stop_pidfile /var/run/vmnet-bridge-vmnet0.pid || true

+ vmware_stop_pidfile /var/run/vmnet-bridge-vmnet2.pid || true

vmware_stop_pidfile /var/run/vmnet-dhcpd-vmnet1.pid || true

vmware_stop_pidfile /var/run/vmnet-dhcpd-vmnet8.pid || true

vmware_stop_pidfile /var/run/vmnet-natd-vmnet8.pid || true

2. Restart Fusion daemons with:

boot.sh --restart[/code]

3. Modify your VMX file for the guest you want to use. In my example it is a Windows XP guest with ethernet0>bridged vmnet0 and ethernet1>bridged vmnet2. Edit the VMX file, after showing package contents on vmwarevm package.

ethernet0.connectionType = "bridged"

ethernet0.present = "TRUE"

ethernet0.wakeOnPcktRcv = "FALSE"

ethernet1.connectionType = "custom"

ethernet1.present = "TRUE"

ethernet1.vnet = "vmnet2"

ethernet1.wakeOnPcktRcv = "FALSE"

Power on and hopefully you should have 2 bridged network adapters. Here's my output from guest:

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : VMware Accelerated AMD PCNet Adapter

Physical Address. . . . . . . . . : 00-0C-29-BA-EC-BB

Dhcp Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IP Address. . . . . . . . . . . . : 10.101.0.102

Subnet Mask . . . . . . . . . . . : 255.255.0.0

Default Gateway . . . . . . . . . : 10.101.0.1

DHCP Server . . . . . . . . . . . : 10.101.0.2

DNS Servers . . . . . . . . . . . : 158.43.240.4

158.43.240.3

Lease Obtained. . . . . . . . . . : Tuesday, August 28, 2007 8:38:26 AM

Lease Expires . . . . . . . . . . : Friday, August 31, 2007 8:38:26 AM

Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : VMware Accelerated AMD PCNet Adapter

Physical Address. . . . . . . . . : 00-0C-29-BA-EC-C5

Dhcp Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IP Address. . . . . . . . . . . . : 10.101.0.103

Subnet Mask . . . . . . . . . . . : 255.255.0.0

Default Gateway . . . . . . . . . : 10.101.0.1

DHCP Server . . . . . . . . . . . : 10.101.0.2

DNS Servers . . . . . . . . . . . : 158.43.240.4

158.43.240.3

Lease Obtained. . . . . . . . . . : Tuesday, August 28, 2007 8:38:26 AM

Lease Expires . . . . . . . . . . : Friday, August 31, 2007 8:38:26 AM

I will be working on other scenarios and of course updating the paper with this.

Cheers

Dave

Reply
0 Kudos
QuiLoxx
Contributor
Contributor

If you come up with how to create another NAT interface - please post that as well...

What I really need - is another virtual network - like VMNet8 where my MAC can communicate with 2 VMs, and both VMs can communicate with each other as well. Getting out to the rest of the world is a secondary concern - so NAT is not truly required.

Thanks for posting all that you have!

-Aaron

Reply
0 Kudos
DaveP
Commander
Commander

I have a modified set of scripts which should do what you want. However, I want to check with VMware that they are happy for me to release them, as it uses parts of the VMware Workstation 6 Linux scripts. Using these scripts you can add or remove bridged, host and NAT adapters. Also I haven't written much on how to use them yet, which I would like to get done before releasing them.

Reply
0 Kudos
QuiLoxx
Contributor
Contributor

Thank you for the reply!

if you can provide those scripts, I would greatly appreciate it... Otherwise, if you can point me to the right documentation to discuss how to do this manually - I would also appreciate it!

I have not been able to find this in the Fusion or the Workstation documentation... Smiley Sad

Thanks!

-A

Reply
0 Kudos
vdanen
Contributor
Contributor

Dave, I think your whitepaper is fantastic, and I'm working on a wiki page with some information on various tweaks and tips and whatnot for Fusion.

I don't want to take your work verbatim, but I'd like to know if I can base some of what I'm writing on your observations and your white-paper (although I'll probably end up dummying it up a bit so that there isn't as much technical stuff... more of a "howto" than a full understanding type thing).

Would you mind terribly if I did so? I've already got some tips on there about xorg.conf and modprobe.conf settings, so I've been concentrating so far on the Linux guests, but I'd like to flesh out the page to cover as many troubleshooting/tweaking tips as possible.

Reply
0 Kudos
DaveP
Commander
Commander

Hi

Give me a couple of days and I'll PM you with them. I haven't quite finished the Bash script for starting the services. There is nodocumentation on this, that was what I was writing as well.

Dave

Reply
0 Kudos
DaveP
Commander
Commander

I also have a web site which I am going to be updating with this information. I don't mind you using it but would appreciate that it is correctly attributed to my paper which is copyrighted. If you want to discuss more then either PM or email me,

Cheers

Dave

Reply
0 Kudos
DaveP
Commander
Commander

quick update. I now have a modified vmware-config-net.pl script that adds back the same capabilities as in the Linux version of the script. For example, add/remove networks, change bridged, IP addresses etc. This seems to work well, but I now need to modify the boot.sh script that actually is used to start up and run the various parts of the virtual network.

Sorry it is taking longer than expected but work has been pretty busy recently, and I have a major release of software to deliver for Business Objects, and RTM is next Friday.

If anyone is prepared to test then please let me know.

Dave

Reply
0 Kudos
taylorbanks
Contributor
Contributor

Dave,

I'm very interested in testing and using the scripts you've updated and/or put together for Fusion network adapter management, as I have some specific needs for a couple of moderately complex networked VMs. (Most specifically, I'm working on a tiny NAT firewall VM that will allow the aggregation of multiple outbound Internet connections, ala WifiEV-DO or WiredWifi). Your whitepaper is great, and has gotten me started down the path, though having network management scripts akin to the Linux scripts would be delightful. I'll PM you with my contact details, and look forward to assisting with your testing.

Cheers,

-Taylor

Reply
0 Kudos
DaveP
Commander
Commander

I just finished the Bash script and seems to be working on my Mac. I have a deadline this week for work, so will be next week when release, also so I have some time to put some preliminary documentation together. Out of interest how many virtual interfaces do you need and of what sort?

Thanks for offering to help.

Dave

Reply
0 Kudos
taylorbanks
Contributor
Contributor

together. Out of interest how many virtual interfaces

do you need and of what sort?

At first blush, optimal will be: two bridged adapters (ex. one to en0, other to en1 or ppp0) and a single host-only adapter, through which my Host OS will then NAT back through the VM, which will be aggregating and pseudo-load-balancing between the two distinct network connections. Make any sense? Smiley Wink The overhead of host/guest/network configuration convolution may outweigh the benefits, but I can't know until I try...

This is still as-of-yet completely untested, though I have no reason to believe the configuration can't work, even if it requires minor manual tweaks prior to each boot...

Thanks for offering to help.

Dave

Happy to help, and thanks for your contributions thus far!

-Taylor

Reply
0 Kudos
darkwillow98
Contributor
Contributor

Thank you SO much for your work on this Dave.

I needed to setup two separate bridges vmnets on two NICS and had got as far as tweaking the boot.sh mostly the way you had. I had forgotten the vmx file for the actual host. You porvided the missing piece for me.

Now I have the first NIC, en0, set to handle the host-only, NAT, and bridge for that portion, and the second NIC en1, set to handle bridging on the other NIC which is statically set and wired to a different subnet.

If you need help testing, I can assist.

Reply
0 Kudos