Skip to content

Commit 61f91b9

Browse files
authored
Merge pull request containerd#10817 from AkihiroSuda/fix-10816
CI: fix vagrant
2 parents 08037e7 + 1db0064 commit 61f91b9

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -563,30 +563,14 @@ jobs:
563563
# Canonical's Vagrant 2.2.19 dpkg cannot download Fedora 38 image: https://bugs.launchpad.net/vagrant/+bug/2017828
564564
# So we have to install Vagrant >= 2.3.1 from the upstream: https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49
565565
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
566-
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com jammy main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
566+
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
567567
sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
568-
# we use vagrant from jammy since the sources are not yet available in noble for vagrant
569-
# TODO: once vagrant package sources are available in ubuntu-24 this can be removed
570-
sudo tee -a /etc/apt/sources.list.d/ubuntu.sources <<EOF
571-
Types: deb deb-src
572-
URIs: http://archive.ubuntu.com/ubuntu
573-
Suites: jammy
574-
Components: main restricted universe multiverse
575-
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
576-
EOF
577-
echo "" | sudo tee -a /etc/apt/sources.list.d/ubuntu.sources > /dev/null
578-
# jammy security needs to be added so that the compatible ovmf package can be fetched
579-
sudo tee -a /etc/apt/sources.list.d/ubuntu.sources <<EOF
580-
Types: deb deb-src
581-
URIs: http://security.archive.ubuntu.com/ubuntu
582-
Suites: jammy-security
583-
Components: main restricted universe multiverse
584-
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
585-
EOF
586568
sudo apt-get update
587-
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant ovmf=2022.02-3ubuntu0.22.04.2
569+
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant ovmf
570+
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
571+
sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/
588572
sudo systemctl enable --now libvirtd
589-
sudo apt-get build-dep -y vagrant ruby-libvirt
573+
sudo apt-get build-dep -y ruby-libvirt
590574
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
591575
sudo vagrant plugin install vagrant-libvirt
592576
- name: Boot VM

Vagrantfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ Vagrant.configure("2") do |config|
3535
v.memory = memory
3636
v.cpus = cpus
3737
v.machine_virtual_size = disk_size
38-
v.loader = "/usr/share/OVMF/OVMF_CODE.fd"
38+
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
39+
# Needs `sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/`
40+
v.loader = '/usr/share/OVMF/OVMF_CODE_4M.fd'
41+
v.nvram = '/var/lib/libvirt/qemu/nvram/OVMF_VARS_4M.fd'
3942
end
4043

4144
config.vm.synced_folder ".", "/vagrant", type: "rsync"

0 commit comments

Comments
 (0)