I am unsure whether this is an issue with Vagrant, trellis cli, or something else in my test setup.
First I tried a normal trellis up.
This fails with the following output:
nero@vmhost:~/WebDOCK/domain.com$ trellis up
Starting galaxy role install process
- composer (1.9.0) is already installed, skipping.
- ntp (2.3.1) is already installed, skipping.
- logrotate (v0.0.5) is already installed, skipping.
- swapfile (v2.0.36) is already installed, skipping.
- mailpit (v1.0.0) is already installed, skipping.
Running command => vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'InDsgnLTD/Ubuntu2404-LTS'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: domain.test
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> 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: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
^C
==> default: Waiting for cleanup before exiting...
nero@vmhost:~/WebDOCK/domain.com$ Vagrant exited after cleanup due to external interrupt.
However, there is an active and running virtualbox and I am able to ssh to it & preform sudo as would be expected:
nero@vmhost:~/WebDOCK/domain.com$ ssh vagrant@127.0.0.1 -p 2222
vagrant@vm01:~$ sudo shutdown -h now
[sudo] password for vagrant:
Broadcast message from root@vm01 on pts/1 (Thu 2024-05-16 20:13:54 UTC):
The system will power off now!
vagrant@vm01:~$ Connection to 127.0.0.1 closed by remote host.
Connection to 127.0.0.1 closed.
Obviously, ansible doesn’t provision anything.
I tried adding the following manually to Vagrantfile:
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
config.ssh.insert_key = 'true'
However, that also fails.
Host file is not updated.
Direct SSH works as mentioned but
trellis ssh works
as well as directly.
Lastly, machine IP is 10.0.2.15/24 w/ 10.0.2.2 as default gw
But here is vagrant.default.yml:
vagrant_ip: "192.168.56.201"
vagrant_cpus: 2
vagrant_memory: 8192 # in MB
vagrant_box: "InDsgnLTD/Ubuntu2404-LTS"
vagrant_box_version: ">= 0"
vagrant_box_auto_arch: true
vagrant_ansible_version: "2.10.7"
vagrant_skip_galaxy: false
vagrant_mount_type: "nfs"
vagrant_nfs_udp: false
vagrant_require_version: ">= 2.1.0"
vagrant_ssh_forward_agent: "no"
vagrant_install_plugins: true
vagrant_plugins:
- name: vagrant-bindfs
- name: vagrant-hostmanager
# Array of synced folders:
# - local_path: .
# destination: /path/on/vm
# create: false
# type: nfs
# nfs_udp: false
# bindfs: true
# mount_options: []
# bindfs_options: {}
# See https://www.vagrantup.com/docs/synced-folders/basic_usage.html#mount_options
vagrant_synced_folders: []
Any direction would be helpful.
Thanks,
T