Ajout du .service systemd pour onenode

Mise en pause et reprise des VM lors des reboots.

ref #16800 @45m
This commit is contained in:
Philippe Caseiro 2016-07-22 14:09:54 +02:00
parent 75faa9e9d7
commit 0cac94f8e4
1 changed files with 15 additions and 0 deletions

15
init/onenode.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=OpenNebula Node starter
After=opennebula.service opennebula-sunstone.service
[Service]
Type=oneshot
Environment=CREDS='/var/lib/one/.one/one_auth'
TimeoutSec=1min
RemainAfterExit=yes
Restart=no
ExecStart=/usr/share/eole/sbin/onevm-all -w -c ${CREDS} -a "resume"
ExecStop=/usr/share/eole/sbin/onevm-all -w -c ${CREDS} -a "suspend"
[Install]
WantedBy=multi-user.target