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

VM bound to non-existing NIC #106

Open
mexmirror opened this issue Oct 11, 2023 · 0 comments
Open

VM bound to non-existing NIC #106

mexmirror opened this issue Oct 11, 2023 · 0 comments

Comments

@mexmirror
Copy link

mexmirror commented Oct 11, 2023

When creating a VM with Vagrant with certain images (see Vagrantfile for an example), an interface is chosen which does not exist. The command then stops at "Waiting for the VM to receive an address...".

When configuring the interface manually, using the API in the Vagrantfile(see below), it does work fine.

Vagrant version

$ vagrant -v
Vagrant 2.3.7

Vagrant VMware plugin version

$ vagrant plugin list
vagrant-vmware-desktop (3.0.3, global)

Vagrant VMware utility version

$ /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility -v
1.0.22

Host operating system

I am currently running macos Ventura 13.6 (22G120).

Guest operating system

GuestOS is Ubuntu 22.04

Vagrantfile

This is the non-working Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = 'fasmat/ubuntu2204-desktop'
  config.vm.box_version = '22.0509.1'
  config.vm.hostname = 'test'

  config.vm.provider "vmware_desktop" do |vmware, override|
  end
end

This produces a VMX file which contains a wrong Ethernet configuration:

ethernet0.addresstype = "generated"
ethernet0.connectiontype = "nat"
ethernet0.present = "TRUE"
ethernet0.virtualdev = "e1000e"

When comparing this section with a VMX file for a VM created manually with VMWare

ethernet0.connectionType = 'nat'
ethernet0.addressType = 'generated'
ethernet0.virtualDev= 'e1000'

This can be fixed by translating the correct settings into the Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = 'fasmat/ubuntu2204-desktop'
  config.vm.box_version = '22.0509.1'
  config.vm.hostname = 'test'

  config.vm.provider "vmware_desktop" do |vmware, override|
      vmware.vmx["ethernet0.connectionType"] = 'nat'
      vmware.vmx["ethernet0.addressType"] = 'generated'
      vmware.vmx["ethernet0.virtualDev"] = 'e1000'
  end
end

Debug output

Here is the log using the --debug flag when creating and starting the VM.

Here is the log using the same command, but with the working Vagrantfile.

Expected behavior

VM should be created with a working network interface.

Actual behavior

VM is created with a non working network interface

Steps to reproduce

  1. Use provided Vagrantfile
  2. vagrant up
  3. Wait until the VM booted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant