[elbe-devel] [PATCH 2/3] examples: add x86_64-docker-elbe.xml
Torben Hohn
torben.hohn at linutronix.de
Thu Aug 20 13:10:45 CEST 2020
Based on x86_64-docker-systemd.
Also install elbe and add kvmgid.service that adjust the gid of /dev/kvm.
Add elbe user.
Activate libvirtd.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
examples/x86_64-docker-elbe.xml | 197 ++++++++++++++++++++++++++++++++
1 file changed, 197 insertions(+)
create mode 100644 examples/x86_64-docker-elbe.xml
diff --git a/examples/x86_64-docker-elbe.xml b/examples/x86_64-docker-elbe.xml
new file mode 100644
index 000000000..408796cf3
--- /dev/null
+++ b/examples/x86_64-docker-elbe.xml
@@ -0,0 +1,197 @@
+<ns0:RootFileSystem xmlns:ns0="https://www.linutronix.de/projects/Elbe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" created="2009-05-20T08:50:56" revision="6" xsi:schemaLocation="https://www.linutronix.de/projects/Elbe dbsfed.xsd">
+ <project>
+ <name>debian docker systemd base image</name>
+ <version>1.0</version>
+ <description>
+ Debian buster base includeing systemd.
+ Several systemd related files are removed, so that it does
+ not try to mount /.
+ </description>
+ <buildtype>amd64</buildtype>
+ <mirror>
+ <primary_host>ftp.de.debian.org</primary_host>
+ <primary_path>/debian</primary_path>
+ <primary_proto>http</primary_proto>
+ <url-list>
+ <url>
+ <binary>http://security.debian.org buster/updates main</binary>
+ <source>http://security.debian.org buster/updates main</source>
+ </url>
+ <url>
+ <binary>http://debian.linutronix.de/elbe buster main</binary>
+ <source>http://debian.linutronix.de/elbe buster main</source>
+ <raw-key>
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQENBFCvUfkBCADRyoA/epDT9Fj2sN6Qob3Toep5SSA40eNkF/M0B0Zy9UgBU+pS
+kDEEuKqQnu9MZrHcDRpYopbp3cde0rCh332ESLAYqIk92+ehVpHzK6QzJhyWH+6n
+AFS6IFZLHEJqVrHixFZT9tUyknxcZz7szR5PzmfxYLz/PxbRg9j34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Q
+0STVEkmIbAiB84WlNAkv8MgE/1D1d+l2I9RysZgB7AdY2AuUCfQccxShyyp0dMiJ
+XvooTX/RS6IgSdtOnDD+lcJbXSO05ec/npCAQw16eiK1OweZKWkULTIdhCo7gbqL
+a6EqDGtKLEkEM5G1qtDILnp3cIEZm3CFO8ll
+=02FH
+-----END PGP PUBLIC KEY BLOCK-----
+ </raw-key>
+ </url>
+ <url>
+ <binary>http://debian.linutronix.de/elbe-common buster main</binary>
+ <source>http://debian.linutronix.de/elbe-common buster main</source>
+ <raw-key>
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQENBFCvUfkBCADRyoA/epDT9Fj2sN6Qob3Toep5SSA40eNkF/M0B0Zy9UgBU+pS
+kDEEuKqQnu9MZrHcDRpYopbp3cde0rCh332ESLAYqIk92+ehVpHzK6QzJhyWH+6n
+AFS6IFZLHEJqVrHixFZT9tUyknxcZz7szR5PzmfxYLz/PxbRg9j34D2rOpat0bdX
+tIfI1h+W073yMHv1C8zkx+RkaMng8k5X9Bra/FE9dzqzsyLoKXqNyKI+JLCYcRzI
+p3gSIs5w4GIgNTQx5IgIZnV6SYzYx89PD/UG/Dl1amo9K874/aVbcMFMUM9UrNX8
+x37+3r7QZ3md2ucarBW4iJsUdxJ6Wj+A8eB5ABEBAAG0QkVMQkUgRGV2ZWwgKExp
+bnV0cm9uaXggRWxiZSBkZXZlbG9wZXJzKSA8ZWxiZS1kZXZlbEBsaW51dHJvbml4
+LmRlPokBVQQTAQIAPwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AWIQQQ4KU1
+Vgn3xqVaF/Y2qjX/IruPhAUCWi67RAUJEuVqywAKCRA2qjX/IruPhBBzCACuFf+B
+nl5COTKJ8Vfqncuo8IB0CTFbjpGgEykhaNfYXB1CsmtexyXZnSHGvlfFxUCmPO2B
+btnxuHW4oILDiZjuYxyq+hCI7EZuI3C2R9GYls5j/rfr7f/OeYgY6aK5BArw6cC/
+xIS4elaw8rdmIP1v+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4bD03CdrZUuUiw1MsRZmuSY2ZO2l9DE3UJvQRPtXXIo5WMx
+pH+4mfjZys94CwbOEtBElsoU8Ku/mmxmX40WIWBD22aPorC5+3DtKtyFEsqf4jC/
+FeRNm3x8Z1OPI8IWW3Zw2lPDAjDFSk1GxlgW20zScxJZsIu2fUwcPJ9ouGaRMlH1
+BQHdJguTiWhAqCF9tDko6hotBl/0mJnwZdwZiI/6NwS32WRi36WDABEBAAGJATwE
+GAECACYCGwwWIQQQ4KU1Vgn3xqVaF/Y2qjX/IruPhAUCWE1Z7gUJCX87dQAKCRA2
+qjX/IruPhCreB/9WNcWHijC0onbzpamKKEiIvGIo81zVp3TIG9h60C47pesF5gyQ
+uSf/UwkorIe0bBBbD62QjeMr3AeAzI7GaYbsgsgSRB1kOGaMXgQzExqJKcJ8utIQ
+VD/i6z7JLTgsQ5EbMN3vDkfWNE+GPNZGtYw2gC8IblRfD6ulIBmWuxCIOWarsATQ
+0STVEkmIbAiB84WlNAkv8MgE/1D1d+l2I9RysZgB7AdY2AuUCfQccxShyyp0dMiJ
+XvooTX/RS6IgSdtOnDD+lcJbXSO05ec/npCAQw16eiK1OweZKWkULTIdhCo7gbqL
+a6EqDGtKLEkEM5G1qtDILnp3cIEZm3CFO8ll
+=02FH
+-----END PGP PUBLIC KEY BLOCK-----
+ </raw-key>
+ </url>
+ </url-list>
+ </mirror>
+ <suite>buster</suite>
+ </project>
+ <target>
+ <hostname>elbedocker</hostname>
+ <domain>docker</domain>
+ <passwd>docker</passwd>
+ <package>
+ <tar>
+ <name>docker-systemd.tgz</name>
+ </tar>
+ </package>
+ <pkg-list>
+ <pkg>elbe</pkg>
+ </pkg-list>
+ <finetuning>
+ <rm>var/cache/apt/archives/*.deb</rm>
+
+ <rm>lib/systemd/system/multi-user.target.wants/*</rm>
+ <rm>etc/systemd/system/*.wants/*</rm>
+ <rm>lib/systemd/system/local-fs.target.wants/*</rm>
+ <rm>lib/systemd/system/sockets.target.wants/*udev*</rm>
+ <rm>lib/systemd/system/sockets.target.wants/*initctl*</rm>
+ <command>cd /lib/systemd/system/sysinit.target.wants/ && ls | grep -v systemd-tmpfiles-setup.service | xargs rm -f</command>
+ <rm>lib/systemd/system/systemd-update-utmp*</rm>
+
+ <command>systemctl set-default multi-user.target</command>
+ <command>sed -ri /etc/systemd/journald.conf -e 's!^#?Storage=.*!Storage=volatile!'</command>
+
+ <file dst="/etc/systemd/system/kvmgid.service" mode="644">
+ [Unit]
+ Description=Set /dev/kvm group to kvm
+ Requires=local-fs.target
+ Documentation=man:chgrp(1)
+
+ [Service]
+ Type=oneshot
+ ExecStart=/bin/chgrp kvm /dev/kvm
+
+ [Install]
+ WantedBy=sysinit.target
+ </file>
+ <command>systemctl enable kvmgid.service</command>
+
+ <adduser groups="kvm,libvirt" passwd="elbe" shell="/bin/bash">elbe</adduser>
+ <command>systemctl enable libvirtd</command>
+ </finetuning>
+ </target>
+</ns0:RootFileSystem>
--
2.20.1
More information about the elbe-devel
mailing list