VMware Communities
vmfh
Enthusiast
Enthusiast

adding vnet with vmnet-cfgcli or not

Although there seems to be no official documentation on vmnet-cfgcli and vmnet-cli I found this post a while ago with some detail on how to add vnets.

Recently, I realised that adding, for example, ethernet2.vnet = "vmnet6" to two vmx files for a point-to-point link, just works, without requiring editing the networking file, although they're listed in the GUI as Unrecognized Network Device. Only caveat seems that I cannot use vmnet-sniffer on it.

Is there any (undocumented) method for dynamically adding vnets?

0 Kudos
11 Replies
parmarr
VMware Employee
VMware Employee

Hello,

Would this article be a helpful documentation to you https://kb.vmware.com/s/article/1001875?

Sincerely, Rahul Parmar VMware Support Moderator
0 Kudos
vmfh
Enthusiast
Enthusiast

parmarr​​, no, I don't see how that's related to the topic. You might want to try connecting two VMs setting in their vmx files a custom vnet that's not present in the networking file — to see what I mean.

0 Kudos
vmfh
Enthusiast
Enthusiast

Can anyone help explain this, or at least, try to reproduce it?

0 Kudos
Mikero
Community Manager
Community Manager

I'll play around with it and see. The supported way to do this is using the REST API in Fusion 10, which admittedly is lacking some documentation outside code.vmware.com and the API Swagger page itself (tho it's VERY comprehensive within there as far as how the methods work and the JSON output looks, etc).

Start it from the command line with the 'vmrest' command, give it a username and password on first launch, and then browse to localhost:8697 to look at the swagger page.

You can see all of the controls you'd have access to from there, how they work and you can even try them out from that page (after you've authenticated, this can be accessed remotely).

-
Michael Roy - Product Marketing Engineer: VCF
0 Kudos
vmfh
Enthusiast
Enthusiast

I'm still on Fusion 7, but the API is a compelling reason to upgrade my current system.

Beyond how you access the interfaces, it seems that custom vnets don't need to be hardcoded in the networking file, and thus aren't present or at least doesn't show on the host system.

0 Kudos
wila
Immortal
Immortal

Hi,

Just as a FYI.

Here's the documentation for the REST API:

VMware Fusion Rest API 1.0

and beware that when you want to upgrade to VMware Fusion 10 that there are different hardware requirements and host OS requirements.

As you are running Fusion 7, my guess is that you are not on macOS High Sierra.

VMware Fusion 10 supported Host OS can be found here: Supported Host OS systems

and see the following link for the hardware requirements: Fusion 10 system requirements

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
vmfh
Enthusiast
Enthusiast

wila​, thanks for the links. I suppose you're on v10. But regardless of which version and how you configure new vnets, you could try to reproduce the above by taking any VM, cloning it and letting them connect on a custom vnet that's not configured on your networking file.

0 Kudos
wila
Immortal
Immortal

Hi,

Sorry I have not looked at your document as at this moment I have no need to manually configure networks by editing the vmx file by hand.

Am I understanding correctly that you are using the normal version of Fusion 7 and not the professional version?

The reason I ask is that the professional version has a network editor for configuring custom networks.

Is there perhaps another reason - like automation - that you are trying to edit this by hand?

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
vmfh
Enthusiast
Enthusiast

wila​, I use Fusion Pro 7.1.3 at the moment, which doesn't seem to have the editor you mentioned, so to automate deployments I'm left with editing by hand vmx and networking, using vmnet-cfgcli or the API on the current version, while the GUI settings are only useful for changing interfaces.

Not needing to configure an interface on the host level has its advantages, which I think it's not being properly noticed.

0 Kudos
wila
Immortal
Immortal

Hi,

Pretty sure that Fusion 7 pro has the network editor.

It's in the menu -> VMware Fusion -> Preferences -> Network tab

But yes it does not help you for automating deployments.

It's just for configuring the network configuration via the GUI.

After unlocking the editor via the "Lock" icon and your admin password, you can add your own networks in the Custom section via the "+" button.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
vmfh
Enthusiast
Enthusiast

wila​, oh I completely overlooked that tab.

This, let's say, feature I ran into, seems to be like Virtualbox's internal networks. I hope someone here can shed some light on it.

0 Kudos