[arch-general] Arch VM + QEMU/KVM + libvirt + Systemd
arnaud.gaboury at gmail.com
Tue Feb 11 17:24:53 EST 2014
> Then I installed Arch with pacstrap on /dahlia. No bootloader but
> Linux (i will remove the last one later as I want to share the kernel
> with the host). After many errors due to some missing libs,
> installation went fine.
> I managed everything about cgroups, even spent hours on
> /etc/cgconfig.conf which is not mandatory since systemd 205. I can see
> a dahlia folder in all controllers (sys/fs/cgroup/$CONTROLLER-NAME).
> As for systemd, I enabled cgconfig , libvirt-guest.service and
> gabx at hortensia ➤➤ ~ % systemctl status systemd-machined.service
> systemd-machined.service - Virtual Machine and Container Registration Service
> Loaded: loaded (/usr/lib/systemd/system/systemd-machined.service; static)
> Active: active (running) since Tue 2014-02-11 08:09:25 CET; 12min ago
> Docs: man:systemd-machined.service(8)
> Main PID: 980 (systemd-machine)
> CGroup: /system.slice/systemd-machined.service
> └─980 /usr/lib/systemd/systemd-machined
> Feb 11 08:09:25 hortensia systemd: Starting Virtual Machine and
> Container Registration Service...
> Feb 11 08:09:25 hortensia systemd: Started Virtual Machine and
> Container Registration Service.
> Hint: Some lines were ellipsized, use -l to show in full.
> Now comes the tricky part : registering my container with slice mechanism.
> $ machine ctl
> returns empty.
> gabx at hortensia ➤➤ ~ # systemd-nspawn -bD /dahlia
> Spawning namespace container on /dahlia (console is /dev/pts/1).
> Init process in the container running as PID 1208.
> execv() failed: No such file or directory
> Container failed with error code 1.
> I put a machine-dahlia.slice unit file in /etc/systemd/system, but I
> am not sure it is enough.
> I read I shall register the container with logind, but no idea how.
> How can I register my container for systemd to recognize it ? Shall I
> use the usual way with libvirt and virsh ?
Installing the guest from Arch-iso (i.e booting from iso then
installing) and not from my host session solved my issues. No idea
why, but bacstrap from my session left me with lots of errors about
missing libs and a borken filesystem.
All my settings were fine and now :
gabx at hortensia ➤➤ ~ % machinectl list
MACHINE CONTAINER SERVICE
dahlia container nspawn
1 machines listed.
More information about the arch-general