I do a lot of work with Arch Linux VMs. Mostly as part of testing my AUR packages, or for building BDisk.
BDisk builds take a long time if your Internet connection isn’t the greatest- the vast majority of this is the package installation in the chroots.
So I referenced this article and sync the repos I need to my virtualizer host. (For those curious, the community, core, extra, multilib, and iso/latest dirs on a mirror combined consume about 70GB. Not a lot at all.)
But now I have a problem- I don’t want to use my primary mirror as my lab’s host machine’s IP, since that breaks pacman functionality for builds in the wild.
So instead I picked a mirror, put it at the top of the mirrorlist, and in my libvirt setu on the host I set a DNS entry for that. Assuming my VM host is 188.8.131.52 (accessible to the VM guest) and I’m running an appropriately mapped web daemon on it (again, accessible to guests):
virsh net-update default add dns-host "<host ip='184.108.40.206'><hostname>foo.domain.tld</hostname></host>" --live --config