Closed marcossilvestrini closed 1 year ago
TL;DR: ensure your bridge is configured with the virtio
adapter.
Starting with UEK7 kernel (both OL8 and OL9), the kernel is packaged differently (see Changes to UEK Content Distribution and Packaging).
For the vagrant boxes (as well as the other cloud images we provide), we only install the kernel-uek-core
package which contains everything needed in a VM environment.
This means that for the network adapter, only the virtio
driver is packaged. If you configure Virtualbox to emulate anything else than virtio
the interface won't come up, generating the errors you have while Vagrant tries to configure it.
There shouldn't be any reason for not using virtio
as it is the driver with the least overhead; however should you absolutely want to use something else, you will have to install the kernel-uek-modules pacakge
.
TL;DR: ensure your bridge is configured with the
virtio
adapter.Starting with UEK7 kernel (both OL8 and OL9), the kernel is packaged differently (see Changes to UEK Content Distribution and Packaging). For the vagrant boxes (as well as the other cloud images we provide), we only install the
kernel-uek-core
package which contains everything needed in a VM environment. This means that for the network adapter, only thevirtio
driver is packaged. If you configure Virtualbox to emulate anything else thanvirtio
the interface won't come up, generating the errors you have while Vagrant tries to configure it.There shouldn't be any reason for not using
virtio
as it is the driver with the least overhead; however should you absolutely want to use something else, you will have to install thekernel-uek-modules pacakge
.
Thanks @AmedeeBulle . After set a nic_type my build finish with success.
ol9_lpic2_202.vm.network "public_network",ip: "192.168.0.135",mode: "bridge",bridge: "Marvell AQtion 5Gbit Network Adapter",nic_type: "virtio"
Regards,
Command: vagrant up
Expected to happen: The final output of the vagrant up command must be 0
Actually happened:
INFO interface: error: The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
/sbin/ifdown '' /sbin/ifdown '' mv -f '/tmp/vagrant-network-entry--1672706551-0' '/etc/sysconfig/network-scripts/ifcfg-' mv -f '/tmp/vagrant-network-entry--1672706551-1' '/etc/sysconfig/network-scripts/ifcfg-' (test -f /etc/init.d/NetworkManager && /etc/init.d/NetworkManager restart) || ((systemctl | grep NetworkManager.service) && systemctl restart NetworkManager) /sbin/ifup '' /sbin/ifup ''
Stdout from the command:
NetworkManager.service loaded active running Network Manager
Stderr from the command:
bash: line 4: /sbin/ifdown: No such file or directory bash: line 5: /sbin/ifdown: No such file or directory bash: line 9: /sbin/ifup: No such file or directory bash: line 10: /sbin/ifup: No such file or directory
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
/sbin/ifdown '' /sbin/ifdown '' mv -f '/tmp/vagrant-network-entry--1672706551-0' '/etc/sysconfig/network-scripts/ifcfg-' mv -f '/tmp/vagrant-network-entry--1672706551-1' '/etc/sysconfig/network-scripts/ifcfg-' (test -f /etc/init.d/NetworkManager && /etc/init.d/NetworkManager restart) || ((systemctl | grep NetworkManager.service) && systemctl restart NetworkManager) /sbin/ifup '' /sbin/ifup ''
Stdout from the command:
NetworkManager.service loaded active running Network Manager
Stderr from the command:
bash: line 4: /sbin/ifdown: No such file or directory bash: line 5: /sbin/ifdown: No such file or directory bash: line 9: /sbin/ifup: No such file or directory bash: line 10: /sbin/ifup: No such file or directory INFO interface: Machine: error-exit ["Vagrant::Errors::VagrantError", "The following SSH command responded with a non-zero exit status.\nVagrant assumes that this means the command failed!\n\n/sbin/ifdown ''\n/sbin/ifdown ''\nmv -f '/tmp/vagrant-network-entry--1672706551-0' '/etc/sysconfig/network-scripts/ifcfg-'\nmv -f '/tmp/vagrant-network-entry--1672706551-1' '/etc/sysconfig/network-scripts/ifcfg-'\n(test -f /etc/init.d/NetworkManager && /etc/init.d/NetworkManager restart) || ((systemctl | grep NetworkManager.service) && systemctl restart NetworkManager)\n/sbin/ifup ''\n/sbin/ifup ''\n\nStdout from the command:\n\n NetworkManager.service loaded active running Network Manager\n\n\nStderr from the command:\n\nbash: line 4: /sbin/ifdown: No such file or directory\nbash: line 5: /sbin/ifdown: No such file or directory\nbash: line 9: /sbin/ifup: No such file or directory\nbash: line 10: /sbin/ifup: No such file or directory\n"]
Host OS: [e.g. Oracle Linux 8, macOS 10.14.6, Windows 10 Pro, ...] Windows 11 Pro 22H2 22621.963
Vagrant version: [e.g. 2.2.9] Vagrant 2.3.1
Vagrant provider: VirtualBox
VirtualBox version: [e.g. 6.1.8r137981 -- run
vboxmanage -v
] 6.1.40r154048Vagrant project: [e.g. OLCNE, OracleDatabase/19.3.0, ...] oraclelinux/9
Additional information
If I disable the network configuration (bridge) the error does not occur. These lines here:
ol9_lpic2_202.vm.network "public_network" ,ip: "192.168.0.135",mode: "bridge" ,bridge: "Marvell AQtion 5Gbit Network Adapter" ol9_lpic2_202.vm.network "private_network", ip: "172.36.12.220"
In version 8 this scenario does not occur using this same scenario
Attached I send the Vagrantfile and the vagrant log files.zip
Thanks