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 Utility address already in use #96

Open
adrianlungu opened this issue Nov 11, 2021 · 1 comment
Open

VMWare Utility address already in use #96

adrianlungu opened this issue Nov 11, 2021 · 1 comment

Comments

@adrianlungu
Copy link

Vagrant version

Vagrant 2.2.19

Host operating system

macOS Big Sur 11.5.2

Guest operating system

generic/ubuntu1804

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

HOST_PATH = '/Users/adrian/Projects'
GUEST_PATH = '/home/vagrant/projects'

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

    config.vm.network "public_network", ip: "192.168.2.69", :bridge => "en0"
    config.vm.network :private_network
#     config.vm.network "private_network", ip: "192.168.69.69"
    
    config.vm.usable_port_range = 0..15000

    # VMWare Desktop
    config.vm.provider "vmware_desktop" do |v|
        v.vmx["memsize"] = "4096"
        v.vmx["numvcpus"] = "4"
        v.gui = false
    end

    # Sync folder
    config.vm.synced_folder HOST_PATH, GUEST_PATH, fsnotify: [:modified]

    # Disable default Vagrant folder, use a unique path per project
    # config.vm.synced_folder '.', '/home/vagrant', disabled: true

    # Provisioning

    config.vm.provision "docker" do |d|
        d.run "hello-world"
    end

    # Shell Provisioning

    $shell_provisioning = <<-SHELL

        sudo apt-get update

        # Install WireGuard
        sudo apt-get install -y wireguard
        sudo apt-get install -y resolvconf
            
        # Install Docker Compose

        sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
        sudo chmod +x /usr/local/bin/docker-compose

        # Install Portainer
        docker volume create portainer_data
        docker run -d -p 9998:8000 -p 9999:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

        # Install Dozzle
        docker run --name dozzle -d --volume=/var/run/docker.sock:/var/run/docker.sock -p 9990:8080 amir20/dozzle:latest

        # Install Micro Editor
        curl https://getmic.ro | bash
        sudo mv micro /usr/bin

        # Install Tmux TPM
        git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
        touch ~/.tmux.conf

        alias tmux-save="~/.tmux/plugins/tmux-resurrect/scripts/save.sh"
        alias tmux-restore="~/.tmux/plugins/tmux-resurrect/scripts/restore.sh"

        sudo echo "        
        unbind C-b
        set -g prefix `
        bind-key ` send-prefix

        set-option -g history-limit 20000
        setw -g mouse on

        # List of plugins
        set -g @plugin 'tmux-plugins/tpm'
        set -g @plugin 'tmux-plugins/tmux-sensible'
        set -g @plugin 'tmux-plugins/tmux-resurrect'
        set -g @plugin 'tmux-plugins/tmux-continuum'
        set -g @resurrect-capture-pane-contents 'on'
        set -g @continuum-boot 'on'
        set -g @continuum-restore 'on'
        set -g @continuum-save-interval '30'
        set -g @resurrect-hook-pre-restore-pane-processes 'tmux switch-client -n && tmux kill-session -t=0'

        # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
        run '~/.tmux/plugins/tpm/tpm'

        # Fixes iterm2 integration. Should go after "run '~/.tmux/plugins/tpm/tpm'"
        setw -g aggressive-resize off
        " >> ~/.tmux.conf

    SHELL

    config.vm.provision "shell", inline: $shell_provisioning, privileged: false

    config.fsnotify.touch = [:modification]

end

Debug output

vagrant up error

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]

vagrant-vmware-utility service log

2021-11-11T09:56:40.591+0200 [INFO]  vagrant-vmware-utility.api: created: vmx=<nil>
2021-11-11T09:56:40.730+0200 [INFO]  vagrant-vmware-utility.api: attempting to upgrade to vmrest driver
2021-11-11T09:56:40.730+0200 [WARN]  vagrant-vmware-utility.api.vmrest: standard vmware license detected, using fallback
2021-11-11T09:56:40.730+0200 [INFO]  vagrant-vmware-utility.api: enabling internal port forwarding service
2021-11-11T09:56:40.732+0200 [ERROR] vagrant-vmware-utility.api.pfwd-service.fwd: failed to setup host listener: type=udp host=0.0.0.0:29324 error="listen udp 0.0.0.0:29324: bind: address already in use"
2021-11-11T09:56:40.732+0200 [ERROR] vagrant-vmware-utility.api: failed to enable internal port forwarding service: error="listen udp 0.0.0.0:29324: bind: address already in use"
2021-11-11T09:56:40.732+0200 [ERROR] vagrant-vmware-utility.api: failed to enable internal port forwarding service: error="listen udp 0.0.0.0:29324: bind: address already in use"
Failed to setup Vagrant VMWare API service - failed to enable internal port forwarding - listen udp 0.0.0.0:29324: bind: address already in use

Expected behavior

vagrant up should work as expected

Actual behavior

vagrant up returns an error related to the vmware utility driver.

Everything has been updated prior to submitting this ticket (vagrant, vmware-utility-driver and vmware-utility-plugin).

Steps to reproduce

I'm not sure what caused this issue as the same configuration has worked before without any changes to vagrant.

@kaitlincart kaitlincart transferred this issue from hashicorp/vagrant Jul 14, 2023
@GreenAndYellow
Copy link

I'm facing the same issue. Do we have a solution discovered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants