Open lordgurke opened 1 year ago
Hi, I encounter the same situation with:
Vagrant, version 2.3.7
VirtualBox, version 6.1.36r152435
Linux, 5.19.0-46-generic, 22.04.1-Ubuntu
testVM: Setting hostname...
==> testVM: Configuring and enabling network interfaces...
==> testVM: Attempting graceful shutdown of VM...
==> testVM: Destroying VM and associated drives...
/opt/vagrant/embedded/gems/gems/vagrant-2.3.7/lib/vagrant/util/template_renderer.rb:61:in `initialize': No such file or directory @ rb_sysopen - /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/templates/guests/gentoo/network_static66.erb (Errno::ENOENT)
The same reproduction steps as in @lordgurke case
Same issue with a debian12 VM (host on Arch Kernel: x86_64 Linux 6.4.7-arch1-1)
(a quick & dirty workaround is to create a symbolic link :
╰─λ sudo ln -s /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/templates/guests/debian/network_static6.erb /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/templates/guests/debian/network_static66.erb
)
This very likely broke with pull https://github.com/hashicorp/vagrant/pull/13024 as now the network config type is defined in the call
function, but the existing code in hostonly_config
remained in place, which now adds a second "6" to the network config type, thus leading to this problem.
I made a pull request to fix this bug in https://github.com/hashicorp/vagrant/pull/13241, in the meantime you may (or may not) want to do the following edit to your local installation to make IPv6 work again:
In /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/plugins/providers/virtualbox/action/network.rb
, Line 303 remove or comment out the line:
# Append a 6 to the end of the type
options[:type] = "#{options[:type]}6".to_sym
Static IPv6 assignment to Vagrant boxes fails, because a "helper" is called, which does not exist by that name. This is likely a typo in the code, as
network_static66.erb
does not exist, butnetwork_static6.erb
does (and works).Debug output
Expected behavior
Static IPv6 address defined in Vagrantfile using
web.vm.network "private_network", ip: "a:b:c:d"
should be assigned on startup.Actual behavior
Box starts, then when configuration of the network starts, it fails with a looooong backtrace and error message:
Reproduction information
Vagrant version
Vagrant 2.3.6
Host operating system
Arch Linux, Kernel 6.4.1-arch2-1
Guest operating system
CentOS 7
Steps to reproduce
web.vm.network "private_network", ip: "a:b:c:d"
vagrant up
the boxVagrantfile