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:
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:
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
[...]
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
vmnet5I 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 usevmnet5.When looking into the .vmx file created I saw, that there's a parameter:
which refers to the main ethernet adapter of the Mac. If I remove this line, the VM booted into the right network.
Reproduction Steps
fedora.json(see below)ip aPacker version
packer version:Simplified Packer Template
Operating system and Environment details
MacOS Big Sur, 11.6
Log Fragments and crash.log files
Log files looked good, packer detected the network: