hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.01k stars 4.42k forks source link

Networks with custom subnet/mask values are not supported on this platform #13367

Open derhornspieler opened 3 months ago

derhornspieler commented 3 months ago

Error Output using latest Vagrant plugin

sudo vagrant up --provider vmware_fusion
Password:
Bringing machine 'controlplane' up with 'vmware_fusion' provider...
Bringing machine 'node01' up with 'vmware_fusion' provider...
Bringing machine 'node02' up with 'vmware_fusion' provider...
==> controlplane: Verifying vmnet devices are healthy...
Vagrant failed to create a new VMware networking device. The following
error message was generated while attempting to create a new device:

  Networks with custom subnet/mask values are not supported on this platform

Please resolve any problems reported in the error message above and
try again.

Actual behavior

Failed to bring up infrastructure on VMware Fusion due to the error listed above.

Vagrant failed to create a new VMware networking device. The following
error message was generated while attempting to create a new device:

  Networks with custom subnet/mask values are not supported on this platform

Please resolve any problems reported in the error message above and
try again.

Reproduction information

Vagrant version

Host operating system

Guest operating system

  • Ubunutu 22.02

VMware Fusion Version

Steps to reproduce

  1. Visit website: https://devopscube.com/build-vms-mac-silicon-with-vagrant/
  2. Clone repo
  3. run sudo vagrant up having already installed the plugin vagrant-vmware-desktop and added license file.

Vagrantfile

# box_name: "sloopstash/ubuntu-22-04"
box_name: "bento/ubuntu-22.04"
# box_version: "2.1.1"
vm:
- name: "controlplane"
  ip: "192.168.201.10"
  memory: "2048"
  cpus: "2"
- name: "node01"
  ip: "192.168.201.11"
  memory: "2048"
  cpus: "2"
- name: "node02"
  ip: "192.168.201.12"
  memory: "2048"
  cpus: "2"

require 'yaml'
settings = YAML.load_file(File.join(File.dirname(__FILE__), 'settings.yaml'))

Vagrant.configure("2") do |config|
  config.vm.box = settings['box_name']
  # config.vm.box_version = settings['box_version']
  config.vm.box_check_update = false

  settings['vm'].each do |vm_config|
    config.vm.define vm_config['name'] do |vm|
      vm.vm.hostname = vm_config['name']
      vm.vm.network :private_network, ip: vm_config['ip']
      vm.vm.synced_folder ".", "/vagrant", disabled: false

      vm.vm.provider "vmware_desktop" do |vb|
        vb.gui = false
        vb.memory = vm_config['memory']
        vb.cpus = vm_config['cpus']
      end

      vm.vm.provision "shell", inline: <<-SHELL
        apt update
        apt upgrade -y
        apt install -y wget vim net-tools gcc make tar git unzip sysstat tree
        echo "192.168.201.10 controlplane" >> /etc/hosts
        echo "192.168.201.11 node01" >> /etc/hosts
        echo "192.168.201.12 node02" >> /etc/hosts
      SHELL
      # vm.vm.provision "shell", path: "scripts/common.sh"
    end
  end
end
sysnet4admin commented 3 months ago

Recommend to change from vmware_fusion to vmware_desktop