Packer: VMware Workstation 16 does not generate netmap.conf during installation

Created on 28 Sep 2020  路  8Comments  路  Source: hashicorp/packer

Overview of the Issue

While not a bug with Packer specifically, Packer relies on this file to build vmware-iso boxes successfully. Beginning with VMware Workstation 16 for Linux, a netmap.conf file is not generated during the installation of VMware

Reproduction Steps

  1. Launch Ubuntu 18.04 server
  2. Install VMware Workstation 16 for Linux
  3. Attempt to build a box using Packer vmware-iso provisioner
  4. Encounter Could not find netmap conf file: /etc/vmware/netmap.conf error message

Packer version

1.6.3

Simplified Packer Buildfile

https://github.com/clong/DetectionLab/blob/master/Packer/windows_2016.json

Operating system and Environment details

Ubuntu 18.04, x64

Log Fragments and crash.log files

```
vmware-iso: output will be in this color.

==> vmware-iso: Retrieving ISO
==> vmware-iso: Trying https://software-download.microsoft.com/download/pr/18363.418.191007-0143.19h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso
==> vmware-iso: Trying https://software-download.microsoft.com/download/pr/18363.418.191007-0143.19h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso?checksum=sha256%3A9ef81b6a101afd57b2dbfa44d5c8f7bc94ff45b51b82c5a1f9267ce2e63e9f53
vmware-iso: 18363.418.191007-0143.19h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 4.56 GiB / 4.56 GiB [==========================================================================] 100.00% 1m17s
==> vmware-iso: https://software-download.microsoft.com/download/pr/18363.418.191007-0143.19h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso?checksum=sha256%3A9ef81b6a101afd57b2dbfa44d5c8f7bc94ff45b51b82c5a1f9267ce2e63e9f53 => /tmp/Packer/packer_cache/fbe860439e10a6d50766c5ec20ebd394160a1b61.iso
==> vmware-iso: Configuring output and export directories...
==> vmware-iso: Creating floppy disk...
vmware-iso: Copying files flatly from floppy_files
vmware-iso: Copying file: ./answer_files/10/Autounattend.xml
vmware-iso: Copying file: ./floppy/WindowsPowershell.lnk
vmware-iso: Copying file: ./floppy/PinTo10.exe
vmware-iso: Copying file: ./scripts/fixnetwork.ps1
vmware-iso: Copying file: ./scripts/rearm-windows.ps1
vmware-iso: Copying file: ./scripts/disable-screensaver.ps1
vmware-iso: Copying file: ./scripts/disable-winrm.ps1
vmware-iso: Copying file: ./scripts/enable-winrm.ps1
vmware-iso: Copying file: ./scripts/microsoft-updates.bat
vmware-iso: Copying file: ./scripts/win-updates.ps1
vmware-iso: Copying file: ./scripts/unattend.xml
vmware-iso: Copying file: ./scripts/sysprep.bat
vmware-iso: Done copying files from floppy_files
vmware-iso: Collecting paths from floppy_dirs
vmware-iso: Resulting paths from floppy_dirs : []
vmware-iso: Done copying paths from floppy_dirs
==> vmware-iso: Creating required virtual machine disks
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Could not find netmap conf file: /etc/vmware/netmap.conf
==> vmware-iso: Deleting output directory...
Build 'vmware-iso' errored after 1 minute 27 seconds: Could not find netmap conf file: /etc/vmware/netmap.conf

==> Wait completed after 1 minute 27 seconds

bug buildevmware track-internal upstream-bug

Most helpful comment

Hello again, looks like the update process did not recreate that netmap.conf file, but vmware (ui) recreated it for me when I did:

Edit > Virtual Network Editor (type password) > Save. Maybe it's a bug in the vmware installer or updater.

This worked for me, and now testing on VMware Workstation 16 Pro

All 8 comments

Hello, thanks for reaching out! We will take a look once we get a chance.
Could you provide a more detailed log of your build, which you can have by setting PACKER_LOG=1?

Hi @sylviamoss ! Since this isn't a problem with Packer directly, I'm not sure if including more verbose output would actually help here, but let me know if you think otherwise.

The problem is that the newest version of VMware Workstation on Linux (and maybe Windows - I haven't tested) doesn't generate a file that Packer requires for building a box. I'm not sure what the ideal fix would be. Maybe ask VMware why this behavior changed, or maybe Packer can somehow dynamically create this file if it doesn't exist?

Also missing vmnetdhcp conf file as well. I tried doing a touch /etc/vmware/netmap.conf and rerunning packer, but then it complained about vmnetdhcp conf file next. I stopped at that point and reinstalled VMware Workstation 15.5.6

Hello there, thanks for opening, I could repro on ubuntu; it looks like this file has moved or no longer exists 馃 . So yeah in the meantime I'd remain on 15.5 !

Hello again, looks like the update process did not recreate that netmap.conf file, but vmware (ui) recreated it for me when I did:

Edit > Virtual Network Editor (type password) > Save. Maybe it's a bug in the vmware installer or updater.

@azr interesting! I wonder what the equivalent is from the CLI

sudo vmware-netcfg should open that window; I don't know if you can trigger a recreate from cli but I bet that vmware is going to patch this for the .1 patch version.

Hello again, looks like the update process did not recreate that netmap.conf file, but vmware (ui) recreated it for me when I did:

Edit > Virtual Network Editor (type password) > Save. Maybe it's a bug in the vmware installer or updater.

This worked for me, and now testing on VMware Workstation 16 Pro

Was this page helpful?
0 / 5 - 0 ratings