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

[rocky9.2-arm64] fails at "configuring network adapters within the VM" #1

Closed
SnowJuli opened this issue Nov 17, 2023 · 6 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@SnowJuli
Copy link

Hello,
when I start the gyptazy/rocky9.2-arm64 box with vagrant up the following logs are displayed:

❯ vagrant up
Bringing machine 'default' up with 'vmware_desktop' provider...
==> default: Cloning VMware VM: 'gyptazy/rocky9.2-arm64'. This can take some time...
==> default: Checking if box 'gyptazy/rocky9.2-arm64' version '1.0.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:
    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...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'

Stdout from the command:



Stderr from the command:

When executed with the --debug flag it shows that the command mentioned above fails because vagrant can't enter the sudo password for it.

DEBUG guest: Searching for cap: network_interfaces
DEBUG guest: Checking in: rocky
DEBUG guest: Checking in: redhat
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: network_interfaces in linux
 INFO guest: Execute capability: network_interfaces [#<Vagrant::Machine: default (HashiCorp::VagrantVMwareDesktop::Provider)>] (rocky)
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: /sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://' (sudo=true)
DEBUG ssh: stderr:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.


DEBUG ssh: stderr: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

DEBUG ssh: stderr: sudo
DEBUG ssh: stderr: :
DEBUG ssh: stderr: a password is required
DEBUG ssh: stderr:

DEBUG ssh: Exit status: 1
ERROR warden: Error occurred: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'

My Vagrantfile:

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

Vagrant.configure("2") do |config|
  config.vm.box = "gyptazy/rocky9.2-arm64"
  config.vm.provider :vmware_desktop do |vmware|
      vmware.allowlist_verified = true
      vmware.vmx["ethernet0.pcislotnumber"] = "160"
  end

  config.vm.provision :ansible do |ansible|
    ansible.playbook = "playbook.yml"
    ansible.ask_become_pass = true
  end
end
@gyptazy
Copy link
Owner

gyptazy commented Nov 17, 2023

Hey @SnowJuli,

thanks for reporting. Indeed, this is a bug because of a missing passwordless sudo config within the VMs. Some newer images are already supporting the passwordless way and with the next image update this one will also support this.

However, simply running vagrant ssh should still bring you in the environment where you can just use the VM (and if needed fix this issue).

Sorry for that.

Cheers,
gyptazy

@wojciechpolak
Copy link

I look forward to see v1.0.1 for rocky9.2-arm64. Any ETA? Thanks in advance!

@gyptazy
Copy link
Owner

gyptazy commented Jan 28, 2024

I look forward to see v1.0.1 for rocky9.2-arm64. Any ETA? Thanks in advance!

Would be 9.3 ok for you?

@gyptazy
Copy link
Owner

gyptazy commented Jan 28, 2024

@SnowJuli @wojciechpolak
Please check if this fixes your issues: https://app.vagrantup.com/gyptazy/boxes/rocky9.3-arm64

I guess the minor version jump shouldn't be a problem but if it does, please let me know.

@gyptazy gyptazy closed this as completed Jan 28, 2024
@wojciechpolak
Copy link

9.3 would be fine, but there is another issue with it: #6

@gyptazy
Copy link
Owner

gyptazy commented Jan 28, 2024

@wojciechpolak confirmed that this is fixed now (see also #6).

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants