[systemd-devel] FR: machine unit
Alexey Shabalin
a.shabalin at gmail.com
Fri Apr 3 04:31:17 PDT 2015
Hi.
I have several containers with different setting.
For example:
systemd-nspawn at server1.service:
ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot
--link-journal=try-guest --network-bridge=br140
--bind=/srv/node:/srv/node --machine=%i
systemd-nspawn at server2.service:
ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot
--link-journal=try-guest --network-bridge=br20
--bind=/mnt/BACKDISK/backup:/var/backup
--bind=/mnt/BACKDISK/ALTLinux:/var/ftp/ALTLinux --machine=%i
By default, systemd-nspawn at .service contain only one network type.
ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot
--link-journal=try-guest --network-veth --machine=%I
And i can not use machinect enable|disable
What default way for redefine ExecStart for systemd-nspawn?
I want unit type "machine".
For example, server1.machine:
Directory=foo (/var/lib/machines/ if not defined)
Machine=server1 (or Name=server1)
NetworkPrivate=yes|no
NetworkType=bridge|veth|ipvlan|macvlan or other options NetworkBridge=br140
Capability= ...
Bind=/srv/node (for same path)
Bind=/mnt/BACKDISK/ALTLinux:/var/ftp/ALTLinux
and other options from systemd-nspawn
Systemd maybe native support machine unit or over generator.
generator could generate systemd-nspawn at foo.service unit with specific
options for systemd-nspawn in ExecStart=
What you think about it?
--
Alexey Shabalin
More information about the systemd-devel
mailing list