mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
T5024: Try to shutdown several times for qemu install script
The first shutdown for qemu doesn't work Try to shutdown several times
This commit is contained in:
parent
139e8dc63b
commit
84fba9f897
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2019-2022, VyOS maintainers and contributors
|
||||
# Copyright (C) 2019-2023, VyOS maintainers and contributors
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 or later as
|
||||
@ -185,6 +185,10 @@ def shutdownVM(c, log, message=''):
|
||||
log.info('Shutting down virtual machine')
|
||||
for i in range(30):
|
||||
log.info('Waiting for shutdown...')
|
||||
# Shutdown in qemu doesnt work first time
|
||||
# Use this workaround
|
||||
# https://vyos.dev/T5024
|
||||
c.sendline('poweroff now')
|
||||
if not c.isalive():
|
||||
log.info('VM is shut down!')
|
||||
break
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user