How to use this box with Vagrant:
Vagrant.configure("2") do |config|
config.vm.box = "efn/almalinux-vbguest"
end
vagrant init efn/almalinux-vbguest
vagrant up
This version was created 7 months ago.
AlmaLinux 9 9.2.20230513 with Windows VirtualBox Guest Additions 7.0.8
Vagrant.require_version ">= 2.0"
Vagrant.configure("2") do |config|
config.vm.box = "almalinux/9"
config.vm.box_version = "9.2.20230513"
config.vm.provider "virtualbox" do |v|
v.name = "almalinux9-9.2.20230513-win-vb7.0.8"
end
# Use default vagrant keys for package
config.ssh.insert_key = false
# further packages
config.vbguest.installer_hooks[:before_install] = [
"yum install -y mc procps-ng psmisc wget git unzip"
]
config.vbguest.installer = VagrantVbguest::Installers::RedHat
# cleanup (hooks *_rebuild, *_start are not executed)
config.vbguest.installer_hooks[:after_install] = [
"rm -rf /vagrant/.vagrant /vagrant/*.box",
"yum remove -y kernel-devel elfutils-libelf-devel gcc binutils make",
"yum autoremove -y",
"yum --enablerepo='*' clean all",
# "swapoff /swapfile && rm -f /swapfile && sync", # disable swap
# "swapoff /swapfile && dd if=/dev/zero of=/swapfile bs=1MiB count=2048 && mkswap /swapfile && swapon /swapfile", # clear swapfile
"dd if=/dev/zero of=/EMPTY bs=1M; sync && rm -f /EMPTY && sync" # zerofill disk (ignore disk full)
]
end
# Create package:
# vagrant up
# vagrant ssh --command "dd if=/dev/zero of=/tmp/EMPTY bs=1M; sync && rm -f /tmp/EMPTY" # needed to do again to save more space
# vagrant halt
# vagrant package --base almalinux9-9.2.20230513-win-vb7.0.8
This version was created 7 months ago.
AlmaLinux 9 9.1.20221117 with Windows VirtualBox Guest Additions 7.0.8
Vagrant.require_version ">= 2.0"
Vagrant.configure("2") do |config|
config.vm.box = "almalinux/9"
config.vm.box_version = "9.1.20221117"
config.vm.provider "virtualbox" do |v|
v.name = "almalinux9-9.1.20221117-win-vb7.0.8"
end
# Use default vagrant keys for package
config.ssh.insert_key = false
# further packages
config.vbguest.installer_hooks[:before_install] = [
"yum install -y mc procps-ng psmisc wget git unzip"
]
config.vbguest.installer = VagrantVbguest::Installers::RedHat
# cleanup (hooks *_rebuild, *_start are not executed)
config.vbguest.installer_hooks[:after_install] = [
"rm -rf /vagrant/.vagrant /vagrant/*.box",
"yum remove -y kernel-devel elfutils-libelf-devel gcc binutils make",
"yum autoremove -y",
"yum --enablerepo='*' clean all",
# "swapoff /swapfile && rm -f /swapfile && sync", # disable swap
# "swapoff /swapfile && dd if=/dev/zero of=/swapfile bs=1MiB count=2048 && mkswap /swapfile && swapon /swapfile", # clear swapfile
"dd if=/dev/zero of=/EMPTY bs=1M; sync && rm -f /EMPTY && sync" # zerofill disk (ignore disk full)
]
end
# Create package:
# vagrant up
# vagrant ssh --command "dd if=/dev/zero of=/tmp/EMPTY bs=1M; sync && rm -f /tmp/EMPTY" # needed to do again to save more space
# vagrant halt
# vagrant package --base almalinux9-9.1.20221117-win-vb7.0.8