megvan, nem tudott csatlakozni, mert a libvirtd.service hamarabb leallt:
febr 13 21:18:33 xen systemd[1]: Stopping libvirt-guests.service - Suspend/Resume Running libvirt Guests...
febr 13 21:18:33 xen libvirt-guests.sh[7969]: Can't connect to default. Skipping.
febr 13 21:18:33 xen systemd[1]: libvirt-guests.service: Deactivated successfully.
febr 13 21:18:33 xen systemd[1]: Stopped libvirt-guests.service - Suspend/Resume Running libvirt Guests.
ezert csinaltam egy ilyet, igy jo lett:
/etc/systemd/system/libvirt-guests.service.d/local.conf
[Unit]
After=libvirtd.service
kovetkezo feladat, hogy az ssh.service ne alljon le, mig a libvirtd.service fut, hogy addig tudjam hasznalni a libvirtet mig fut, es ne addig, mig az ssh fut. csinaltam egy ilyet, de nem lett jo:
/etc/systemd/system/libvirtd.service.d/local.conf
[Unit]
After=ssh.service
tudom, masoljam be az egeszet:
# systemctl cat libvirtd.service
# /lib/systemd/system/libvirtd.service
[Unit]
Description=Virtualization daemon
Requires=virtlogd.socket
Requires=virtlockd.socket
# Use Wants instead of Requires so that users
# can disable these three .socket units to revert
# to a traditional non-activation deployment setup
Wants=libvirtd.socket
Wants=libvirtd-ro.socket
Wants=libvirtd-admin.socket
Wants=systemd-machined.service
After=network.target
After=firewalld.service
After=iptables.service
After=ip6tables.service
After=dbus.service
After=iscsid.service
After=apparmor.service
After=local-fs.target
After=remote-fs.target
After=systemd-logind.service
After=systemd-machined.service
After=xencommons.service
Conflicts=xendomains.service
Documentation=man:libvirtd(8)
Documentation=https://libvirt.org
[Service]
Type=notify
Environment=LIBVIRTD_ARGS="--timeout 120"
EnvironmentFile=-/etc/default/libvirtd
ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
# At least 1 FD per guest, often 2 (eg qemu monitor + qemu agent).
# eg if we want to support 4096 guests, we'll typically need 8192 FDs
# If changing this, also consider virtlogd.service & virtlockd.service
# limits which are also related to number of guests
LimitNOFILE=8192
# The cgroups pids controller can limit the number of tasks started by
# the daemon, which can limit the number of domains for some hypervisors.
# A conservative default of 8 tasks per guest results in a TasksMax of
# 32k to support 4096 guests.
TasksMax=32768
# With cgroups v2 there is no devices controller anymore, we have to use
# eBPF to control access to devices. In order to do that we create a eBPF
# hash MAP which locks memory. The default map size for 64 devices together
# with program takes 12k per guest. After rounding up we will get 64M to
# support 4096 guests.
LimitMEMLOCK=64M
[Install]
WantedBy=multi-user.target
Also=virtlockd.socket
Also=virtlogd.socket
Also=libvirtd.socket
Also=libvirtd-ro.socket
# /etc/systemd/system/libvirtd.service.d/local.conf
[Unit]
After=ssh.service
es a masik:
# systemctl cat ssh.service
# /lib/systemd/system/ssh.service
[Unit]
Description=OpenBSD Secure Shell server
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/sshd -t
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
RuntimeDirectory=sshd
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
Alias=sshd.service