Official provider for VMware desktop products: Fusion, Player, and Workstation.

Vagrant VMware Desktop Providers

This is the common codebase for the official providers for VMware desktop products: Fusion, Player, and Workstation. This therefore works on Windows, Mac, and Linux.

Box Format

All the desktop plugins share a common box format known as vmware_desktop. The plugins also all support the formats vmware_fusion, vmware_workstation, and vmware_player.

Developing

There are two separate parts which work together to provide the vagrant-vmware-desktop functionality. The first is the vagrant-vmware-desktop RubyGem. This does the bulk of the work for the plugin. The second part is a vagrant-vmware-utility service that the vagrant-vmware-desktop plugin interacts with. The purpose of this part of the plugin is to do operations which require privleged access on the host. This includes network operations and verification of fusion/workstation.

RubyGem - Desktop plugin

Using bundler allows for local development. If you need to test the RubyGem plugin on another system you can build a gem by building directly:

gem build vagrant-vmware-desktop.gemspec

Utility Service

This part fo the plugin lives in the go_src directory and is required to be running when using the vagrant-vmware-desktop plugin. To build and start it:

cd go_src/vagrant-vmware-utility
go build
./vagrant-vmware-utility certificate generate
sudo ./vagrant-vmware-utility api

Certificates

The plugin interacts with the utility service via a REST API. The utility service creates these certificates with the certificate generate command:

./vagrant-vmware-utility certificate generate

This will output the path to certificates directory. Because a development build is in use, the plugin will be unable to locate the certificates to communicate with the API. The plugin can be configured with the directory path:

Vagrant.configure("2") do |config|
  config.vm.provider :vmware_desktop do |vmware|
    vmware.utility_certificate_path = "PATH"
  end
end

Another option is to link the certificates directory to the location the plugin expects to find them:

$ sudo mkdir /opt/vagrant-vmware-desktop
$ sudo ln -s PATH /opt/vagrant-vmware-desktop/certificates

Releasing

This repository contains two separate projects:

  • Vagrant VMware Desktop
  • Vagrant VMware Utility

The release process for these projects are similiar but slightly different based on the project.

See the release documentation in the Vagrant confluence page

Owner
HashiCorp
Consistent workflows to provision, secure, connect, and run any infrastructure for any application.
HashiCorp
Comments
  • Vagrant vmware provider fails to work with Fusion Tech Preview

    Vagrant vmware provider fails to work with Fusion Tech Preview

    Hi, I am running an Apple Silicon Macbook (ARM) and found out that VirtualBox does not work on that platform. I then learned that VMWare released a Tech Preview of Fusion for ARM last month, and so I was hopeful in getting that to work with Vagrant, as you provide a VMWare provider.

    I followed all the steps for installing the provider and you can see from the output that it seems to work. I then proceeded to follow the Getting Started guide (skipping the install of VirtualBox). You could also see my own notes when doing this. All seemed fine up until the last steps:

    $ vagrant init hashicorp/bionic64
    
    $ vagrant up --provider vmware_desktop
    Vagrant encountered an unexpected communications error with the
    Vagrant VMware Utility driver. Please try to run the command
    again. If this error persists, please contact [email protected]
    

    When running with the debug output, it seems as if it could not find any image matching the supplied image. I am not that familiar with Vagrant, but I assumed it might have to do with the image needing to specifically work with VMWare? So I searched vagrant images for anything support vmware and tried both "generic/ubuntu2104" and "roboxes/ubuntu2104" which both were tagged vmware. No luck there either; they all erred with something like this in the debug output

     WARN vagrantfile: Performing lookup with initial values roboxes/ubuntu2104 with version
     INFO box_collection: Box not found: roboxes/ubuntu2104 (vmware_desktop, vmware_fusion, vmware_workstation)
    

    The following is info following the Bug template

    $ vagrant -v
    Vagrant 2.2.18
    
    carlerik at carl-eriks-air in ~/dev/dotfiles (master)
    $ vagrant plugin list
    vagrant-vmware-desktop (3.0.1, global)
      - Version Constraint: > 0
    
    carlerik at carl-eriks-air in ~/dev/dotfiles (master)
    $ /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility -v
    1.0.20
    
    carlerik at carl-eriks-air in ~/dev/dotfiles (master)
    $ uname -a
    Darwin carl-eriks-air.lan 21.1.0 Darwin Kernel Version 21.1.0: Sat Sep 11 12:27:45 PDT 2021; root:xnu-8019.40.67.171.4~1/RELEASE_ARM64_T8101 arm64
    

    Debug output

    https://gist.github.com/fatso83/7da6c48debb4b48333feab90b44964d8

    Expected behavior

    That it fired up a vm as described in getting started

    Actual behavior

    It erred with

    Vagrant encountered an unexpected communications error with the
    Vagrant VMware Utility driver.
    

    Steps to reproduce

    1. Use a M1 Mac (arm)
    2. Install the Fusion Tech Preview
    3. vagrant init hashicorp/bionic64
    4. vagrant up --provider vmware_desktop
  • Enhancement Request: Env variable to override default install path

    Enhancement Request: Env variable to override default install path

    Is your feature request related to a problem? Please describe. From issue #22 it seems like the vmware provider is unable to find the vmware fusion install when it is installed in non-standard locations. It is only when you move it to /Application/VMWare Fusion.app that it can find the files. As the Tech Preview installs itself under a different path, this means official fusion versions do not work without manually renaming the application. This of course also makes it hard to test out different versions of vmware that might be installed at the same time.

    Describe the solution you'd like Support an environment variable for overriding the location the provider will try and look up the vmware files. Something like export VAGRANT_VMWARE_INSTALL_DIR="/Applications/VMWare Fusion Tech Preview.app".

    Describe alternatives you've considered As described in https://github.com/hashicorp/vagrant-vmware-desktop/issues/22#issuecomment-952819799, one can manually rename the version currently installed at the default location and then make symlinks:

    ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app
    

    That's a bit of a chore, though.

    Additional context See #22.

  • Hanging getting IP on VMWare Fusion 12.2 provider

    Hanging getting IP on VMWare Fusion 12.2 provider

    Vagrant version

    ❯ vagrant -v
    Vagrant 2.2.18
    
    ❯ vagrant plugin list
    vagrant-libvirt (0.6.3, global)
      - Version Constraint: > 0
    vagrant-parallels (2.2.4, global)
      - Version Constraint: > 0
    vagrant-vbguest (0.30.0, global)
      - Version Constraint: > 0
    vagrant-vmware-desktop (3.0.1, global)
      - Version Constraint: > 0
    

    VMWare Fusion Pro: Professional Version 12.2.0 (18760249)

    Host operating system

    macOS BigSur 11.6 (20G165)

    Guest operating system

    Vagrant Cloud's generic/debian11 ... also same issue with generic/centos7.

    Vagrantfile

    This exhibits the bug:

    Vagrant.configure("2") do |config|
      config.vm.box = "generic/debian11"
    end
    

    The bug goes away with this change:

    Vagrant.configure("2") do |config|
      config.vm.box = "generic/debian11"
      config.vm.provider "vmware_fusion" do |v|
        v.gui = true
      end
    end
    

    Debug output

    Here's the debug output with the bug. This one just hangs so I have to Ctrl-C it.

    Here's the debug output without the bug when gui is enabled.

    Destroyed VM and deleted the .vagrant folder before each to keep it clean.

    Expected behavior

    Expecting it to not hang.

    Actual behavior

    Hangs indefinitely waiting for IP when the GUI is not enabled.

    Steps to reproduce

    1. Create a free generic/debian11 minimal Vagrantfile on same versions provided
    2. Bring up the VM
    3. See it hang indefinitely

    References

    Nothing I could find.

  • Waiting for the VM to receive an address

    Waiting for the VM to receive an address

    I've been using virtualbox as my provider of choice for a while now, to avoid the $79 charge, which no longer applies. Now my vagrant gets stuck on Waiting for the VM to receive an address pretty much every time. I followed the installation steps for both the utility and the plugin, and the machine creates fine. But it appears that Vagrant is unable to provision an IP, in spite of the fact that the network has been created in VMware Workstation.

    Here's the Vagrant file:

    # vi: set ft=ruby :
    Vagrant.configure("2") do |config|
      config.vm.box = "bento/ubuntu-20.04"
      config.vm.provider "vmware_desktop" do |v|
        v.gui = true
        v.vmx["memsize"] = "2048"
        v.vmx["numvcpus"] = "2"
      end
    end
    

    And the command output:

    Bringing machine 'default' up with 'vmware_desktop' provider...
    ==> default: Cloning VMware VM: 'bento/ubuntu-20.04'. This can take some time...
    ==> default: Checking if box 'bento/ubuntu-20.04' version '202012.23.0' is up to date...
    ==> default: Verifying vmnet devices are healthy...
    ==> default: Preparing network adapters...
    ==> default: Starting the VMware VM...
    ==> default: Waiting for the VM to receive an address...
    ==> default: Waiting for cleanup before exiting...
    

    If it's any help, I've run this in Git Bash, CMD and Powershell, both privileged and unprivileged, a total of at least 6 times today. Do I need to downgrade/reinstall VMware? I'll appreciate any help.

  • synced_folder ignores provided mount_options uid and gid value

    synced_folder ignores provided mount_options uid and gid value

    Vagrant version

    2.2.18

    Vagrant VMware plugin version

    vagrant-vmware-desktop (3.0.1, global)

    Vagrant VMware utility version

    1.0.20

    Host operating system

    macOS 11.6

    Guest operating system

    Debian Stretch

    Vagrantfile

    require 'etc'
    pwent = Etc.getpwuid
    puts "uid=#{pwent.uid}, gid=#{pwent.gid}"
    
    Vagrant.configure("2") do |config|
      config.vm.box = "mydebian9"
      config.vm.provider "vmware_desktop" do |v|
        v.gui = true
        v.allowlist_verified = true
        config.vm.synced_folder '/Users/choeger/devel_choeger', '/Users/choeger', mount_options: ["uid=#{pwent.uid},gid=#{pwent.gid}"], create: true
      end
      config.vm.provision :shell do |shell|
        shell.inline = "useradd -u #{pwent.uid} -g #{pwent.gid} -d #{pwent.dir} -M #{pwent.name}"
      end
    end
    

    Debug output

    https://gist.github.com/c-hoeger/7e84aa329237558fdb49a0db20f73c8a

    Looks like vmhgfs-fuse is always executed with fixed uid/gid numbers:

    vmhgfs-fuse -o allow_other,default_permissions,uid=1000,gid=1000,uid=501,gid=20 .host:/ '/mnt/vagrant-mounts/1000-1000'
    

    Expected behavior

    Mounted directory should be mounted with provided uid and uid

    Actual behavior

    $ vagrant up --provider vmware_desktop
    uid=501, gid=20
    Bringing machine 'default' up with 'vmware_desktop' provider...
    ==> default: Cloning VMware VM: 'mydebian9'. This can take some time...
    ==> default: Verifying vmnet devices are healthy...
    ==> default: Preparing network adapters...
    ==> default: Starting the VMware VM...
    ==> default: Waiting for the VM to receive an address...
    ==> default: Forwarding ports...
        default: -- 22 => 2222
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2222
        default: SSH username: vagrant
        default: SSH auth method: private key
        default:
        default: Vagrant insecure key detected. Vagrant will automatically replace
        default: this with a newly generated keypair for better security.
        default:
        default: Inserting generated public key within guest...
        default: Removing insecure key from the guest if it's present...
        default: Key inserted! Disconnecting and reconnecting using new SSH key...
    ==> default: Machine booted and ready!
    ==> default: Configuring network adapters within the VM...
    ==> default: Waiting for HGFS to become available...
    ==> default: Enabling and configuring shared folders...
        default: -- /Users/choeger/devel_choeger/vagrant-vmware: /vagrant
        default: -- /Users/choeger/devel_choeger: /Users/choeger
    ==> default: Running provisioner: shell...
        default: Running: inline script
    choegbook:vagrant-vmware choeger$ vagrant ssh
    uid=501, gid=20
    Linux debian9 4.9.0-16-amd64 #1 SMP Debian 4.9.272-2 (2021-07-19) x86_64
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Fri Oct 22 10:03:52 2021 from 172.16.210.1
    vagrant@debian9:~$ id choeger
    uid=501(choeger) gid=20(dialout) groups=20(dialout)
    vagrant@debian9:~$ ls -al /Users/
    total 12
    drwxr-xr-x  3 root    root    4096 Oct 22 14:57 .
    drwxr-xr-x 24 root    root    4096 Oct 22 14:57 ..
    drwxr-xr-x  1 vagrant vagrant 3616 Oct 21 13:47 choeger
    

    Steps to reproduce

    Run vagrant up with a Vagrantfile like the one in this issue.

  • Vagrant for Windows Crashing VMware NAT Service

    Vagrant for Windows Crashing VMware NAT Service

    Summary

    Using Vagrant causes the VMware NAT Service to crash, and once crashed, it cannot easily be restarted. Because of this, any VM created/started via Vagrant has no network access. The only known solution is to reset the virtual network adapters to default via the Virtual Network Editor

    Vagrant version

    Vagrant 2.2.18

    Vagrant VMware plugin version

    vagrant-vmware-desktop (3.0.0, global)

    Vagrant VMware utility version

    1.0.20

    Host operating system

    Microsoft Windows 10 Pro (Version 10.0.19043 Build 19043) VMware® Workstation 16 Pro (16.1.2 build-17966106)

    Guest operating system

    centos/7

    Vagrantfile

    Vagrant.configure("2") do |config|
      config.vm.box = "centos/7"
    end
    

    Debug output

    https://gist.github.com/rothman857/5ac5eb3a2e3b36f1d0e4f8977734f12c

    Expected behavior

    running vagrant up should start the VM and it should have external network connectivity (via NAT network adapter).

    Actual behavior

    The VM starts, but VMware NAT services stops, and cannot be restarted. Attempts to restart the service result in an error:

    Windows could not start the VMware NAT Service service on Local Computer.  
    Error 1067: The process terminated unexpectedly.
    

    The VM has no IP connectivity (because the NAT service isn't running).

    Steps to reproduce

    1. vagrant init centos/7
    2. vagrant up

    Workaround

    1. In VMware Workstation, shut off all running VM's
    2. Navigate to Edit >> Virtual Network Editor >> Change Settings >> Restore Defaults
    3. Verify the VMware NAT Service is now running
    4. Manually power on VM's, DO NOT USE 'VAGRANT UP' AS THIS WILL RE-CRASH THE NAT SERVICE
    5. Ping 8.8.8.8 to verify connectivity
  • VM customisation not applying

    VM customisation not applying

    I am trying to configure a basic virtual machine for development - I am trying to create a full clone VM with 8GB ram and 4 vCPUs. Any properties I update in the provider do not seem to be applied in the created VM. My changes are also not reflected in the debug log attached below

    VMWare version

    VMWare Workstation 16.2.1 Pro Build 18811642

    Vagrant version

    Vagrant 2.2.19

    Vagrant VMware plugin version

    vagrant-bindfs (1.1.9, global) vagrant-vmware-desktop (3.0.1, global)

    Vagrant VMware utility version

    1.0.21

    Host operating system

    Windows 11 Pro Build 22000

    Guest operating system

    bento/debian-10

    Vagrantfile

    Vagrant.configure(2) do |config|
            config.ssh.forward_agent = true
    
            config.vm.define 'wisp_development'
            config.vm.box = 'bento/debian-10'
            config.vm.hostname = 'wisp'
    
            config.vm.provider 'vmware-desktop' do |v|
                v.linked_clone = false
    
                v.vmx['displayName'] = 'development'
                v.vmx['memsize'] = '8192'
                v.vmx['numvcpus'] = '4'
                v.vmx["cpuid.coresPerSocket"] = '1'
            end
    end
    

    Debug output

    https://gist.github.com/victiondev/80dc0b66b4904855d0ecf3914a8fd95f

    Expected behavior

    A full clone VM should have been made with 4 vCPUs and 8GB ram.

    Actual behavior

    A linked clone VM was created, with the default settings of 2 vCPUs and 1GB ram.

    Steps to reproduce

    1. vagrant up
    2. Open vmx file or look at configuration in VMWare
    3. See desired changes have not been applied
  • Release documentation is not public

    Release documentation is not public

    The bottom of the README.md file for this project says

    See the release documentation in the Vagrant confluence page

    and has a link to https://hashicorp.atlassian.net/wiki/spaces/vagrant/pages/1039532466/Vagrant+VMware. That Confluence space is not open to public, demanding authorization, and so it has no place on a public open source project, unless that space is either opened up for public or the docs are moved/copied into some public wiki.

  • Setting virtual machine name does not work

    Setting virtual machine name does not work

    Vagrant version

    2.2.18

    Vagrant VMware plugin version

    vagrant-vmware-desktop (3.0.1, global)

    Vagrant VMware utility version

    1.0.20

    Host operating system

    macOS 11.6

    Guest operating system

    Debian Stretch

    Vagrantfile

    Vagrant.configure("2") do |config|
      config.vm.box = "mydebian9"
      config.vm.provider "vmware_desktop" do |v|
        v.gui = true
        v.allowlist_verified = true
        v.name = "My VM"
      end
    end
    

    Debug output

    https://gist.github.com/c-hoeger/045899df07f913c5f58aca389ae45a0e

    Expected behavior

    Setting the vm name should work as described here: https://www.vagrantup.com/docs/providers/virtualbox/configuration Since according to https://www.vagrantup.com/docs/providers/vmware/configuration, the "Vagrant VMware Desktop provider is a drop-in replacement for VirtualBox".

    Actual behavior

    $ vagrant up
    Bringing machine 'default' up with 'vmware_desktop' provider...
    There are errors in the configuration of this machine. Please fix
    the following errors and try again:
    
    VMware Desktop Provider:
    * The following settings shouldn't exist: name
    

    Steps to reproduce

    Run vagrant up with a Vagrantfile like the one in this issue.

  • Access to the release documentation in the Vagrant confluence page

    Access to the release documentation in the Vagrant confluence page

    While the confluence page is referenced in the README.md text it does not seem to be published as a public page and so can not be accessed.

    As I can not access the page I have no way to tell if it holds important info.

    Thanks

  • Update MacOS lease file detection

    Update MacOS lease file detection

    Fusion version 12 on Big Sur started using the Apple native vmnet framework. However, issues with transiting VPNs is requiring VMware to move back to the VMware DHCP implementation.

    Changes:

    • Use Apple networking with Big Sur and Fusion versions 12.0 and 12.1
    • Switch back to using VMware networking in Fusion version 12.2+
    • All other cases will use VMware networking
    • Additionally, handle pre-release "experimental" builds that show a build number of "e.x.p" with VMware networking

    Signed-off-by: Mark Peek [email protected]

  • Vagrant VMware Utility package certificate expired

    Vagrant VMware Utility package certificate expired

    When installing Vagrant VMware Utility I ran into this issue:

    Screenshot 2023-01-03 at 17 23 35

    Downloaded from: https://developer.hashicorp.com/vagrant/downloads/vmware - version 1.0.21

  • [COMPLIANCE] Add Copyright and License Headers

    [COMPLIANCE] Add Copyright and License Headers

    Hi there 👋

    This PR was auto-generated as part of an internal review of public repositories that are not in compliance with HashiCorp's licensing standards.

    Frequently Asked Questions

    Why am I getting this PR? This pull request was created because one or more source code files were found missing copyright and/or license headers.

    More info is available in the RFC

    How do you determine which files should get copyright headers? Attempts are made to skip scanning autogenerated files and prose. If you find file types you feel should be excluded from future scans, please reach out to:

    #proj-software-copyright

    I have a file or folder which should be exempted, how do I do that? You may exempt certain files or folders from being scanned by adding a `.copywrite.hcl` config in the root of your repo. You can use the [`copywrite init`](https://go.hashi.co/copywrite) command to interactively create a config for this project.

    An example schema can be found below. Add a doublestar**-capable pattern to the header_ignore list to skip it in future scans.

    # (OPTIONAL) Overrides the copywrite config schema version
    # Default: 1
    schema_version = 1
    
    project {
      # (OPTIONAL) SPDX-compatible license identifier
      # Leave blank if you don't wish to license the project
      # Default: "MPL-2.0"
      license = ""
    
      # (OPTIONAL) Represents the year that the project initially began
      # Default: <the year the repo was first created>
      # copyright_year = 0
    
      # (OPTIONAL) A list of globs that should not have copyright or license headers .
      # Supports doublestar glob patterns for more flexibility in defining which
      # files or folders should be ignored
      # Default: []
      header_ignore = [
        # "vendors/**",
        # "**autogen**",
      ]
    }
    
    

    Please approve and merge this PR in a timely manner to keep this source code compliant with our OSS license agreement. If you have any questions or feedback, reach out to #proj-software-copyright.

    Thank you!


    Made with :heart: @HashiCorp

  • `vagrant up` crashes when attempting to set a private network with static IP address (M1 Mac, Ventura, VMWare 13)

    `vagrant up` crashes when attempting to set a private network with static IP address (M1 Mac, Ventura, VMWare 13)

    Vagrant version

    % vagrant -v
    Vagrant 2.3.3
    

    Vagrant VMware plugin version

    % vagrant plugin list
    vagrant-vmware-desktop (3.0.1, global)
      - Version Constraint: > 0
    

    Vagrant VMware utility version

    % /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility -v
    1.0.21
    

    Host operating system

    % sw_vers
    ProductName:		macOS
    ProductVersion:		13.0.1
    BuildVersion:		22A400
    

    Also:

    % arch
    arm64
    
    % vmrun
    vmrun version 1.17.0 build-20802013
    

    And:

    VMware Fusion Player Version 13.0.0 (20802013)
    

    Guest operating system

    config.vm.box = "starboard/ubuntu-arm64-20.04.5"
    config.vm.box_version = "20221120.20.40.0"
    

    Vagrantfile

    Vagrant.configure("2") do |config|
      config.vm.box = "starboard/ubuntu-arm64-20.04.5"
      config.vm.box_version = "20221120.20.40.0"
    
      config.vm.network :private_network, ip: '172.16.221.199'
    
      config.vm.provider "vmware_desktop" do |v|
        v.gui = true
        v.vmx["ethernet0.virtualdev"] = "vmxnet3"
      end
    end
    

    Debug output

    Gist with debug output

    Expected behavior

    The machine should boot up without complaint

    Actual behavior

    The machine takes a long time to boot up (about 3 minutes on my M1 Max MacBook Pro), and it does boot up. However, the static IP is not set and there are errors in the vagrant up output:

    % vagrant up
    Bringing machine 'default' up with 'vmware_desktop' provider...
    ==> default: Checking if box 'starboard/ubuntu-arm64-20.04.5' version '20221120.20.40.0' is up to date...
    ==> default: Verifying vmnet devices are healthy...
    ==> default: Preparing network adapters...
    ==> default: Starting the VMware VM...
    ==> default: Waiting for the VM to receive an address...
    ==> default: Forwarding ports...
        default: -- 22 => 2222
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2222
        default: SSH username: vagrant
        default: SSH auth method: private key
    ==> default: Machine booted and ready!
    ==> default: Configuring network adapters within the VM...
    The following SSH command responded with a non-zero exit status.
    Vagrant assumes that this means the command failed!
    
    mv -f '/tmp/vagrant-network-entry-1669498464' '/etc/netplan/50-vagrant.yaml'
    chown root:root '/etc/netplan/50-vagrant.yaml'
    chmod 0644 '/etc/netplan/50-vagrant.yaml'
    netplan apply
    
    Stdout from the command:
    
    
    
    Stderr from the command:
    
    /etc/netplan/50-vagrant.yaml:6:5: Error in network definition: Invalid name ''
        ! '':
        ^
    

    It is possible to vagrant ssh into the machine. Here's the contents of the /etc/netplan/50-vagrant.yaml file and what happens if I try to run sudo netplan apply:

    vagrant@dev-m1:/etc/netplan$ cat 50-vagrant.yaml 
    ---
    network:
      version: 2
      renderer: networkd
      ethernets:
        ! '':
          addresses:
          - 172.16.221.199/24
    
    vagrant@dev-m1:/etc/netplan$ sudo netplan apply
    /etc/netplan/50-vagrant.yaml:6:5: Error in network definition: Invalid name ''
        ! '':
        ^
    

    Please also see detailed debug output in the Gist above.

    Steps to reproduce

    1. Use the Vagarantfile provided above
    2. Run vagrant up
    3. Commenting out the config.vm.network :private_network line will cause the VM to finishing booting up, but without a static IP (which is not desirable)
  • `vagrant up` crashes when `v.gui = false` (M1 Mac, Ventura, VMWare 13)

    `vagrant up` crashes when `v.gui = false` (M1 Mac, Ventura, VMWare 13)

    Vagrant version

    % vagrant -v
    Vagrant 2.3.3
    

    Vagrant VMware plugin version

    % vagrant plugin list
    vagrant-vmware-desktop (3.0.1, global)
      - Version Constraint: > 0
    

    Vagrant VMware utility version

    % /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility -v
    1.0.21
    

    Host operating system

    % sw_vers
    ProductName:		macOS
    ProductVersion:		13.0.1
    BuildVersion:		22A400
    

    Also:

    % arch
    arm64
    
    % vmrun
    vmrun version 1.17.0 build-20802013
    

    And:

    VMware Fusion Player Version 13.0.0 (20802013)
    

    Guest operating system

    config.vm.box = "starboard/ubuntu-arm64-20.04.5"
    config.vm.box_version = "20221120.20.40.0"
    

    Vagrantfile

    Vagrant.configure("2") do |config|
      config.vm.box = "starboard/ubuntu-arm64-20.04.5"
      config.vm.box_version = "20221120.20.40.0"
    
      config.vm.provider "vmware_desktop" do |v|
        v.gui = false
        v.vmx["ethernet0.virtualdev"] = "vmxnet3"
      end
    end
    

    Debug output

    Gist with debug output

    Expected behavior

    The machine should boot up without the GUI present and without complaint

    Actual behavior

    % vagrant up
    Bringing machine 'default' up with 'vmware_desktop' provider...
    ==> default: Checking if box 'starboard/ubuntu-arm64-20.04.5' version '20221120.20.40.0' is up to date...
    ==> default: Verifying vmnet devices are healthy...
    ==> default: Preparing network adapters...
    ==> default: Starting the VMware VM...
    An error occurred while executing `vmrun`, a utility for controlling
    VMware machines. The command and output are below:
    
    Command: ["start", "/Volumes/VMs/Vagrant/machines/machines/default/vmware_desktop/07a03504-b2cd-4a80-b776-6ed8ed459672/ubuntu-arm64-20.04.5-3.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]
    
    Stdout: 2022-11-26T16:18:09.859| ServiceImpl_Opener: PID 41624
    Error: The operation was canceled
    
    Stderr:
    

    Please see detailed debug output in the Gist above.

    Steps to reproduce

    1. Use the Vagarantfile provided above
    2. Run vagrant up
    3. Replacing v.gui = false with v.gui = true will cause the VM to finishing booting up, but with the GUI present (which is not desirable)
  • No network interface using VMWare Fusion 13 - vmrun getGuestIPAddress fails

    No network interface using VMWare Fusion 13 - vmrun getGuestIPAddress fails

    I have been testing multiple configurations and boxes with VMware Fusion 13 Player on macOS 12.6.1 and after some time made the conclusion that it does not work with the e1000 default (legacy) adapter.

    Note that it works with VMWare 21H1 and equally does not work with 22H2 (unsurprisingly maybe since Fusion 13 was released shortly after 22H2 and I had the same problem last week when I tried 22H2).

    It looks like the box is launched without a network adapter and vmtoolsd is not starting either. (can be verified by running dmesg | less)

    When launching the box via vagrant, the boot takes about 2 mins due some process kicking during boot "a start job is running for ...". This does not happen when running directly from vmware console.

    Debug output

    https://gist.github.com/sbailliez/ed6be7b5000d10afe05b1cb2f7e80a22

    Logging in the vm via the gui and poking around

    systemctl | grep failed finds udev service in failed state

    system-udev-settle.service
    

    Running ip a does not list eth0

    Expected behavior

    Network adapter should be functional and guest ip address available with ability to run vagrant ssh

    Actual behavior

    vagrant loops continuously and is not able to get the guest ip address. The VM boots and I can see that there is no network adapter setup when it is running through vagrant. Note that it is completely functional when the box is ran via VMWare console directly, which seems to indicate that vagrant may do some operations that are not working reliably since VMWare 22H2.

    [11/19/2022, 9:32:15.553 PM] DEBUG vmware_driver: Trying to get MAC address for ethernet0
    [11/19/2022, 9:32:15.553 PM] DEBUG vmware_driver: No explicitly set MAC, looking or auto-generated one...
    [11/19/2022, 9:32:15.553 PM] DEBUG vmware_driver:  -- MAC: 00:0c:29:b8:e1:af
    [11/19/2022, 9:32:15.553 PM]  INFO vmware_driver: Reading DHCP lease for '00:0c:29:b8:e1:af' on 'vmnet8'
    [11/19/2022, 9:32:15.610 PM] DEBUG vagrant_utility: request METHOD=GET PATH=/vmnet/vmnet8/dhcplease/00:0c:29:b8:e1:af RESPONSE=400 ERROR=No entry found for MAC 00:0c:29:b8:e1:af
    [11/19/2022, 9:32:15.614 PM]  WARN vmware_driver: Non-NAT interface on slot 1. We can only read IPs of NATs for now.
    [11/19/2022, 9:32:15.614 PM]  INFO vmware_driver: Trying vmrun getGuestIPAddress...
    [11/19/2022, 9:32:15.620 PM]  INFO subprocess: Starting process: ["/Applications/VMware Fusion.app/Contents/Library/vmrun", "getGuestIPAddress", "/Users/Shared/web/tools/m1/test/.vagrant/machines/default/vmware_desktop/1f361662-079d-4384-a853-e19082195362/ubuntu-20.04.5-2.vmx"]
    [11/19/2022, 9:32:15.620 PM] DEBUG subprocess: Command not in installer, not touching env vars.
    [11/19/2022, 9:32:15.620 PM]  INFO subprocess: Command not in installer, restoring original environment...
    [11/19/2022, 9:32:15.635 PM] DEBUG subprocess: Selecting on IO
    [11/19/2022, 9:32:16.772 PM] DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999
    [11/19/2022, 9:32:16.773 PM] DEBUG subprocess: Exit status: 255
    [11/19/2022, 9:32:16.773 PM]  INFO vmware_driver: vmrun getGuestIPAddress failed: VMRunError
    

    Reproduction information

    Vagrant version

    vagrant 2.3.2 vmware utility 1.2.1 vmware desktop 3.0.1

    Host operating system

    macOS 12.6.1

    Guest operating system

    Steps to reproduce

    1. vagrant up
    2. wait

    Vagrantfile

    The password of the vagrant user is vagrant for this box

    Vagrant.configure("2") do |config|
        config.vm.box = "starboard/ubuntu-arm64-20.04.5"
        config.vm.box_version = "20221120.20.40.0"
        config.vm.box_download_insecure = true
        config.vm.provider "vmware_desktop" do |v|
            v.ssh_info_public = true
            v.gui = true
            v.linked_clone = false
            v.vmx["displayname"] = "bugreport"
        end
    end
    
  • Failed to locate the vmrest executable

    Failed to locate the vmrest executable

    I'm unable to run vagrant box with VMWare Fusion Tech.

    Vagrant version

    Vagrant 2.3.3
    

    Vagrant VMware plugin version

    vagrant-vbguest (0.30.0, global)
    vagrant-vmware-desktop (3.0.1, global)
    

    Vagrant VMware utility version

    vagrant-vmware-utility -v
    1.0.21
    

    Host operating system

    Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
    

    Guest operating system

    debian/buster64
    

    Vagrantfile

    Vagrant.configure("2") do |config|
      # The most common configuration options are documented and commented below.
      # For a complete reference, please see the online documentation at
      # https://docs.vagrantup.com.
    
      # Every Vagrant development environment requires a box. You can search for
      # boxes at https://vagrantcloud.com/search.
      config.vm.box = "debian/buster64"
      config.vm.hostname = "devbox-01"
      config.vm.define "devbox-01"
      config.vagrant.plugins = ['vagrant-vbguest']
    
      config.vm.network "private_network", ip: "192.168.33.10"
    
      config.vm.synced_folder "./", "/home/vagrant/project"
    
      config.vm.provider "vmware_desktop" do |vd|
        vd.cpus = 4
        vd.memory = "2048"
        vd.gui = true
      end
    
      config.vm.provision "shell", inline: <<-SHELL
        apt-get update
        apt-get install -y curl git cmake tmux vim  # ...
      SHELL
    
      config.vm.provision "docker" do |d|
        d.run "nginx"
      end
    

    Debug output

    Here is the sample log details from vagrant-vimware-utility/service.log

    Halting the Vagrant VMware API service
    2022-11-18T01:28:40.769+0100 [INFO]  vagrant-vmware-utility.api: created: vmx=<nil>
    2022-11-18T01:28:40.848+0100 [INFO]  vagrant-vmware-utility.api: attempting to upgrade to vmrest driver
    2022-11-18T01:28:40.848+0100 [WARN]  vagrant-vmware-utility.api.vmrest: failed to create vmrest driver: error="Failed to locate the vmrest executable"
    2022-11-18T01:28:40.848+0100 [INFO]  vagrant-vmware-utility.api.vmrest: using fallback driver
    2022-11-18T01:28:40.848+0100 [INFO]  vagrant-vmware-utility.api: enabling internal port forwarding service
    Starting the Vagrant VMware API service
    2022-11-18T01:28:41.269+0100 [INFO]  vagrant-vmware-utility.api.api: api service start: host=127.0.0.1 port=9999
    

    Expected behavior

    What should have happened?

    Actual behavior

    What actually happened?

    Steps to reproduce

    Some of the steps I have followed are from the Stackoverflow thread https://stackoverflow.com/questions/72112571/vagrant-vmware-utility-driver

    References

    https://stackoverflow.com/questions/72112571/vagrant-vmware-utility-driver

    https://github.com/hashicorp/vagrant-vmware-desktop/issues/22

Tool (in Go!) to compare and diff container and host environments. Dinosaur fun!

Compe compare environments and other things between containers, and host ??️ This is a simple tool to compare environments and other features of conta

Sep 24, 2022
Go Cheat Sheet - An overview of Go syntax and features.

Go Cheat Sheet - An overview of Go syntax and features.

Dec 31, 2022
An online book focusing on Go syntax/semantics and runtime related things

Go 101 is a book focusing on Go syntax/semantics and all kinds of runtime related things. It tries to help gophers gain a deep and thorough understanding of Go. This book also collects many details of Go and in Go programming. The book is expected to be helpful for both beginner and experienced Go programmers.

Dec 29, 2022
This slide deck and supporting material is part of the Introduction to Go training course by Dave Cheney

This slide deck and supporting material is part of the Introduction to Go training course by Dave Cheney.

Nov 14, 2022
📖 Build a RESTful API on Go: Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers.
📖 Build a RESTful API on Go: Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers.

?? Tutorial: Build a RESTful API on Go Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers. ?? The full article is published on Marc

Dec 27, 2022
Assert your Go code is inlined and bounds-check eliminated

gcassert gcassert is a program for making assertions about compiler decisions in Golang programs, via inline comment directives like //gcassert:inline

Oct 27, 2022
1000+ Hand-Crafted Go Examples, Exercises, and Quizzes

A Huge Number of Go Examples, Exercises and Quizzes Best way of learning is doing. Inside this repository, you will find thousands of Go examples, exe

Jan 1, 2023
A complete guide to undersatnd golang programming language, web requests, JSON and creating web APIs with mongodb

Golang series A complete guide to undersatnd golang programming language, web requests, JSON and creating web APIs with mongodb LearnCodeonline.in 01

Jan 1, 2023
Golang Clean Architecture based on Uncle Bob's Clean Architecture and Summer internship in 2021

clean-architecture-api Description This is an example of implemention of Clean Architecture in Golang projects. This project has 4 layer : Infrastruct

Feb 20, 2022
Learning and Practice - Go Lang

Go Lang - Learning and Practice All the code stored here is provided by Tour of Go Basics Packages, variables, and functions Flow control statements:

Jan 14, 2022
Comparison of Pixel and Ebiten API on the trees tutorial

Rewriting the trees tutorial of Pixel with Ebiten for API comparison I tried Pixel and really liked the clean API but the dev seems to be on pause sin

Dec 7, 2021
Example skills and a cli utility written in Go for interacting with Webex Assistant Skills

Webex Assistant Skills - Go This repository holds example skills and a cli utility written in Go for interacting with Webex Assistant Skills. It is in

Oct 29, 2021
Cook amazing genetic parts using our cookbook. Recipes and synthetic biology tools to take your breath away.

friendzymes-cookbook Friendly tools for a friendly community. A collection of tutorials and genetic tools for synthetic biology. This cookbook is a su

Aug 19, 2022
A go blog demo by gin and gorm!

A go blog demo by gin and gorm!

Dec 7, 2022
This is an example of a keep-it-simple directory layout for Go projects that was created using DDD principles, please copy and share if you like it.

DDD Go Template This project was created to illustrate a great architectural structure I developed together with @fabiorodrigues in the period I was w

Dec 5, 2022
I will be uploading some basic programming in Golang so if you want to contribute please Fork this repo and contriute.
I will be uploading some basic programming in Golang so if you want to contribute please Fork this repo and contriute.

Go-language I will be uploading some basic programming in Golang so if you want to contribute please Fork this repo and contriute. This repo is for pr

Jan 21, 2022
Simple boilerplate code to get started with building and deploying a serverless CRUD API

Simple boilerplate code to get started with building and deploying a serverless CRUD API with Go, MongoDB and Netlify

Jan 20, 2022
How to work with channels, goroutines, tickers, mutexes and context cancelation

Concurrency tasks This page holds 4 concurrency practical tasks to help you to understand how to write concurrent code. They will help you to understa

Nov 9, 2021
Tutorial and sample codes for Go language

Tutorial and sample codes for Go language

Jan 4, 2022