Overview
Comment: | Added RemainAfterExit to service file to mark service running even if no autostart VMs exist. This allows to stop manually stared machines during system shutdown |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
942bcecae4e6a9edc1e7121cd32c3108 |
User & Date: | vitus on 2018-07-13 15:00:38 |
Other Links: | manifest | tags |
Context
2018-07-17
| ||
14:13 | Fix problem which occurs if stray (qemu) promt is left in the monitor socket before command execution check-in: 3e92401463 user: vitus tags: trunk | |
2018-07-13
| ||
15:00 | Added RemainAfterExit to service file to mark service running even if no autostart VMs exist. This allows to stop manually stared machines during system shutdown check-in: 942bcecae4 user: vitus tags: trunk | |
2017-08-30
| ||
18:12 | Added kvm user creation into postinst script check-in: 665cd70e2c user: vitus tags: trunk | |
Changes
Modified vws from [2dd169c463] to [f931d28fe4].
︙ | |||
197 198 199 200 201 202 203 204 205 206 207 208 209 210 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | + + + + + + + + + + + + + + + + + + + + + + + + + | elif nxt == 2 and line.startswith('ID'): nxt = 1 elif nxt == 1: nxt = 0 snapshot_id = line[:line.index(' ')] arg = arg + " -loadvm " + snapshot_id break # Check for correct brige name try: os.stat("monitor") except OSError: # We cannot find monitor socket. So this machine might be # never run on this host f=open("start","r+") data=f.read() idx0=data.find("-net bridge,br=") if idx != -1: idx=data.find("=",idx) idx+=1 idx2=data.find(" ",idx) bridgename=data[idx:idx2] if not bridgename in list_bridges(): net = config.get("create options","net") if net== "user": data=data[:idx0]+"-net user"+data[idx2:] else: data=data[:idx]+net+data[idx2:] f.seek(0) f.write(data) f.truncate() f.close() os.system("./start%s" % arg) os.chdir(cwd) time.sleep(2) options.sock = connect_vm(options.dir) if snapshot_id: send_command(options.sock, "delvm " + snapshot_id) |
︙ |
Modified vws.service.in from [0f922c5ab3] to [9176479204].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + | [Unit] Description=Virtual Workstation Autostart Documentation=man:vws(1) After=network.target dnsmasq.service [Service] Type=forking ExecStart=@bindir@/vws autostart ExecStop=@bindir@/vws shutdown --wait Restart=no RemainAfterExit=yes [Install] WantedBy=multi-user.target Alias=vws.service |