VirtualBox

5 年 前 建立

5 年 前 結束

#18761 closed defect (invalid)

ACPI Shutdown lead to "Failed to open session"

回報者: Olleg 負責人:
元件: VM control 版本: VirtualBox 6.0.10
關鍵字: 副本:
Guest type: Linux Host type: Mac OS X

描述

I have 9 virtual machines joined in a group, configured as headless. When I use 'ACPI Shutdown' on the group, sometimes (not always) I get error:

Failed to open a session for the virtual machine Witness4Tuchanka.

Failed to get a console object from the direct session (NS_ERROR_ABORT).

Result Code: VBOX_E_VM_ERROR (0x80BB0003)
Component: MachineWrap
Interface: IMachine {5047460a-265d-4538-b23e-ddba5fb84976}

Also I created few script, which simply start/stop all VMs in a loop:

$ less is_vm_running.bash
# $1 VM name to test
. "${script_dir}/is_function_absent.bash"
if is_function_absent 'is_vm_running'
then
        function is_vm_running {
                test 0 -ne $(VBoxManage list runningvms | { grep --count --fixed-strings "\"$1\"" || [ $? -eq 1 ]; })
        }
        readonly -f is_vm_running
fi
$ less start_vms.bash
. "${script_dir}/is_function_absent.bash"
. "${script_dir}/is_vm_running.bash"
. "${script_dir}/vm_ssh.bash"
if is_function_absent 'start_vms'
then
        function start_vms {
                local i
                for i in "${!vm_name[@]}"
                do
                        if ! is_vm_running "${vm_name[$i]}"
                        then
                                echo "Start ${vm_name[$i]}"
                                VBoxManage startvm "${vm_name[$i]}"
                        fi
                done
                for i in "${!vm_name[@]}"
                do
                        echo "Waiting for system on ${vm_name[$i]}"
                        until vm_ssh "${vm_hostname[$i]}" 'systemctl is-system-running' 2>/dev/null
                        do
                                sleep 1
                        done
                done
                sleep 5
        }
        readonly -f start_vms
fi
$ less soft_off.bash
. "${script_dir}/is_function_absent.bash"
. "${script_dir}/is_vm_running.bash"
. "${script_dir}/vm_ssh.bash"
if is_function_absent 'soft_off'
then
        function soft_off {
                local i
                for i in "${!vm_name[@]}"
                do
                        if is_vm_running "${vm_name[$i]}"
                        then
                                VBoxManage controlvm "${vm_name[$i]}" acpipowerbutton
                        fi
                done
                for i in "${!vm_name[@]}"
                do
                        echo "Waiting Off of ${vm_name[$i]}"
                        while is_vm_running "${vm_name[$i]}"
                        do
                                sleep 1
                        done
                done
                sleep 5
        }
        readonly -f soft_off
fi

$ less power_loop

#!/bin/bash
# safe bash
set -o errexit -o noclobber -o nounset -o pipefail

readonly script_dir="$(dirname "${BASH_SOURCE[0]}")"

. "${script_dir}/load_config.bash"
. "${script_dir}/start_vms.bash"
. "${script_dir}/soft_off.bash"
i=0
echo "i=$i $(date +'%FT%T')" |tee 'test.log'
while true
do
        start_vms
        soft_off
        let i=$i+1
        echo "i=$i $(date +'%FT%T')" |tee -a 'test.log'
done

And also I get the same error, less often. Just GUI window with message about error (I has opened GUI), but all other keep working.

更動歷史 (1)

comment:1 5 年 前aeichner 編輯

狀態: newclosed
處理結果: invalid

No follow up from the reporter and no logs provided, closing for now. Please reopen if still an issue with the latest VirtualBox release and please attach at least one VBox.log of a affected VM + VBoxSVC.log.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette