Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vmware-iso] Wrong parameter in .vmx on Big Sur / VMware Fusion 12.2 Pro #11380

Closed
devops-42 opened this issue Nov 4, 2021 · 2 comments
Closed
Labels

Comments

@devops-42
Copy link

Overview of the Issue

I tried to create a Linux VM (Fedora) using packer, kickstart and VMware Fusion 12.2 Pro. The Linux VM should run in a separate network vmnet5 I created before in VMware Fusion. After kicking the VM gots an IP address from the NAT network (Share with my Mac). But according to the VM settings the network adapter has been configured to use vmnet5.
When looking into the .vmx file created I saw, that there's a parameter:

ethernet.bsdname=en0

which refers to the main ethernet adapter of the Mac. If I remove this line, the VM booted into the right network.

Reproduction Steps

  • Create a packer file fedora.json (see below)
  • Create necessary kickstart files and place them into path
  • Start packer builder:
PACKER_LOG=1 packer build fedora.json 
  • Wait until VM is up and provides an emergency shell
  • Verify IP with ip a

Packer version

packer version:

Packer v1.7.8

Simplified Packer Template

{
  "builders": [
    {
      "boot_command": [
        "<tab> ",
        "inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}} loglevel=10 ",
        "biosdevname=0 ",
        "net.ifnames=0 ",
        "<enter>"
      ],
      "boot_wait": "5s",
      "cpus": "2",
      "disk_adapter_type": "scsi",
      "disk_size": "10240",
      "disk_type_id": "0",
      "guest_os_type": "fedora64Guest",
      "http_directory": "/path/to/ks",
      "iso_checksum": "...",
      "iso_url": "/path/to/fedora-server-netinst.iso",
      "network": "vmnet5",
      "network_adapter_type": "e1000",
      "memory": "2048",
      "output_directory": "/path/to/output/directory}",
      "shutdown_command": "****",
	  "ssh..."
      "type": "vmware-iso",
      "vm_name": "test"
    }
  ]
}

Operating system and Environment details

MacOS Big Sur, 11.6

Log Fragments and crash.log files

Log files looked good, packer detected the network:

[...]
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: Located networkmapper configuration file using Fusion6: /Library/Preferences/VMware Fusion/networking
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: Writing VMX to: /PATH/TO/VM/fedora.vmx
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: Configuring VMX...
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: Setting VMX: 'virtualHW.version' = '18'
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: Writing VMX to: /PATH/TO/VM/fedora.vmx
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: Suppressing messages in VMX
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: Located networkmapper configuration file using Fusion6: /Library/Preferences/VMware Fusion/networking
2021/11/04 10:58:28 packer-builder-vmware-iso plugin: HostIP discovered custom device matching vmnet5: vmnet5
[...]
@devops-42
Copy link
Author

Moved to plugin repo: hashicorp/packer-plugin-vmware#52

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant