Box fails to start - Public keyring not found
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "archlinux/archlinux"
config.vm.provider "libvirt" do |libvirt|
end
end
Output:
$ vagrant up
Bringing machine 'default' up with 'libvirt' provider...
==> default: Checking if box 'archlinux/archlinux' version '20201013.5698' is up to date...
==> default: Uploading base box image as volume into Libvirt storage...
==> default: Creating image (snapshot of base box volume).
==> default: Creating domain with the following settings...
==> default: -- Name: arch_default
==> default: -- Domain type: kvm
==> default: -- Cpus: 1
==> default: -- Feature: acpi
==> default: -- Feature: apic
==> default: -- Feature: pae
==> default: -- Memory: 512M
==> default: -- Management MAC:
==> default: -- Loader:
==> default: -- Nvram:
==> default: -- Base box: archlinux/archlinux
==> default: -- Storage pool: default
==> default: -- Image: /var/lib/libvirt/images/arch_default.img (20G)
==> default: -- Volume Cache: default
==> default: -- Kernel:
==> default: -- Initrd:
==> default: -- Graphics Type: vnc
==> default: -- Graphics Port: -1
==> default: -- Graphics IP: 127.0.0.1
==> default: -- Graphics Password: Not defined
==> default: -- Video Type: cirrus
==> default: -- Video VRAM: 9216
==> default: -- Sound Type:
==> default: -- Keymap: en-us
==> default: -- TPM Path:
==> default: -- INPUT: type=mouse, bus=ps2
==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Installing rsync to the VM...
==> default: Removing domain...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
pacman -Sy --noconfirm
pacman -S --noconfirm rsync
exit $?
Stdout from the command:
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
resolving dependencies...
looking for conflicting packages...
Packages (2) xxhash-0.8.0-1 rsync-3.2.3-1
Total Download Size: 0.37 MiB
Total Installed Size: 0.85 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
downloading rsync-3.2.3-1-x86_64.pkg.tar.zst...
downloading xxhash-0.8.0-1-x86_64.pkg.tar.zst...
checking keyring...
downloading required keys...
Errors occurred, no packages were upgraded.
Stderr from the command:
warning: Public keyring not found; have you run 'pacman-key --init'?
error: keyring is not writable
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (unexpected error)