Commit Graph

9 Commits (b9a046c7f4140f810bee43d8b928a10c8d1908b4)

Author SHA1 Message Date
Dustin 0a956297c1 r/vmhost: Update for latest libvirt
Some time ago, _libvirt_ was refactored to use separate daemons and
sockets for each of its responsibilities, and the original "monolithic"
`libvirtd` was made obsolete.  The Fedora packages have more recently
been adjusted to favor this new approach, and now default to omitting
the monolithic daemon entirely (when `install_weak_deps` is disabled).

One interesting packaging snafu, though, is that without the weak
dependencies, there is _no_ way for clients to connect by default.
Clients run `which virt-ssh-helper` to see if it is installed, which it
is, but `which` is not.  They then fall back to running `nc`, which is
_also_ not installed.  So even though the tools they actually need are
present, their logic for detecting this is broken.  As such, we need to
explicitly install `which` to satisfy them.
2025-03-29 07:34:58 -05:00
Dustin 1e6ab546bc r/vmhost: Create directory for console logs
Need a directory where _libvirt_ can write logs from VM serial console
output.
2024-10-13 18:30:04 -05:00
Dustin 0cd58564c9 r/vmhost: Add autostart script
*libvirt*'s native autostart functionality does not work well for
machines that migrate between hosts.  Machines lose their auto-start
flag when they are migrated, and the flag is not restored if they are
migrated back.  This makes the feature pretty useless for us.

To work around this limitation, I've added a script that is run during
boot that will start the machines listed in `/etc/vm-autostart`, if they
exist.  That file can also insert a delay between starting two machines,
which may be useful to allow services to fully start on one machine
before starting another that may depend on them.
2022-08-20 21:15:31 -05:00
Dustin 3be9c40f2b r/vmhost: Install mount helpers
Filesystems like NFS and CIFS require "helper" utilities (i.e.
`mount.nfs` and `mount.cifs`, respectively).  These need to be installed
in order for a system to be able to mount those filesystems.

The current shared storage system uses NFSv4, and as such, the
*nfs-utils* package needs to be installed on the VM hosts.
2021-10-10 16:09:15 -05:00
Dustin 9c97d0318c r/vmhost: mount shared filesystems
With the transition away from *dhcpcd* on the VM hosts, there is no
longer any need for a custom wait script that must run prior to
attempting to mount the shared filesystem.  This dramatically simplifies
the configuration necessary for shared storage.

I don't really see any reason why the shared storage configuration needs
to be managed by a separate role.  The *vmhost* role is not really
generic anyway, and will probably not work for any other VM host
deployment besides the two machines running now.  As such, I think it
makes sense to move the task to mount the shared filesystem into the
*vmhost* role and drop the *dch-storage-net* role.
2021-10-10 16:09:15 -05:00
Dustin dac34a3620 r/vmhost: Switch to pure YAML syntax 2021-10-10 16:09:15 -05:00
Dustin 7e585445b9 roles/vmhost: Enable KSM
This commit adds a systemd unit to enable the Kernel Same-page Merging
daemon on VM hosts. This allows much greater virtual machine density,
especially when many VMs are running the same guest OS.
2019-03-22 09:29:56 -05:00
Dustin f078522d97 roles/vmhost: Open libvirt migration firewall port 2018-07-29 10:39:36 -05:00
Dustin abd05f8443 roles/vmhost: Configure libvirtd+QEMU
The *vmhost* role installs and configures the libvirt daemon to host
QEMU/KVM virtual machines.
2018-07-23 17:35:10 -05:00