VirtualBox

14 年 前 建立

8 年 前 結束

#7844 closed defect (worksforme)

/etc/default/virtualbox usage gives "Wrong owner of /tmp/.vbox-*-ipc"

回報者: Charles 負責人:
元件: VM control 版本: VirtualBox 3.2.12
關鍵字: /etc/default/virtualbox, rc.vboxdrv, shutdown 副本:
Guest type: Windows Host type: Linux

描述 (由 Frank Mehnert 作最後更新)

Hello :)

After creating /etc/default/virtualbox to shut down any VMs still running during host shutdown, these error messages appear during shutdown if a VM has been started and shutdown before shutting down the host:

Sending ACPI power button event to remaining VMsWrong owner (1000) of '/tmp/.vbox-c-ipc'.
Wrong owner (1000) of '/tmp/.vbox-c-ipc'.
ERROR: failed to create the VirtualBox object!
ERROR: code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
Most likely, the VirtualBox COM server is not running or failed to start.
Wrong owner (1000) of '/tmp/.vbox-c-ipc'.
[Repeated from "Wrong owner ..." ~40 times]
 ...done.
Waiting for 30 seconds for VM shutdown ...done

This use of /etc/default/virtualbox is not documented in the 3.2.12 User Manual which only mentions using the file during automated installations. The source of information was the comment before the shudown_vms function in /etc/rc.d/rc.virtualbox shown below. The full function is shown because of its possibly relevant comment, # don't create the ipcd directory with wrong permissions!

    # enter the following variables in /etc/default/virtualbox:
    #   SHUTDOWN_USERS="foo bar" 
    #     check for running VMs of user foo and user bar
    #   SHUTDOWN=poweroff
    #   SHUTDOWN=acpibutton
    #   SHUTDOWN=savestate
    #     select one of these shutdown methods for running VMs
    stop_vms()
    {
        wait=0
        for i in $SHUTDOWN_USERS; do
            # don't create the ipcd directory with wrong permissions!
            if [ -d /tmp/.vbox-$i-ipc ]; then
                export VBOX_IPC_SOCKETID="$i"
                VMS=`$VBOXMANAGE --nologo list runningvms | sed -e 's/^".*".*{\(.*\)}/\1/' 2>/dev/null`
                if [ -n "$VMS" ]; then
                    if [ "$SHUTDOWN" = "poweroff" ]; then
                        begin_msg "Powering off remaining VMs"
                        for v in $VMS; do
                            $VBOXMANAGE --nologo controlvm $v poweroff
                        done
                        succ_msg
                    elif [ "$SHUTDOWN" = "acpibutton" ]; then
                        begin_msg "Sending ACPI power button event to remaining VMs"
                        for v in $VMS; do
                            $VBOXMANAGE --nologo controlvm $v acpipowerbutton
                            wait=30
                        done
                        succ_msg
                    elif [ "$SHUTDOWN" = "savestate" ]; then
                        begin_msg "Saving state of remaining VMs"
                        for v in $VMS; do
                            $VBOXMANAGE --nologo controlvm $v savestate
                        done
                        succ_msg
                    fi
                fi
            fi
        done
        # wait for some seconds when doing ACPI shutdown
        if [ "$wait" -ne 0 ]; then
            begin_msg "Waiting for $wait seconds for VM shutdown"
            sleep $wait
            succ_msg
        fi

My /etc/default/virtualbox looks like this

    # /etc/default/virtualbox

    # Configuration file for /etc/rc.d/rc.vboxdrv

    # 5dec10 Charles
    #    * Created, based on comment in /etc/default/virtualbox:

    # Check for running VMs of user c
    SHUTDOWN_USERS="c" 

    # Shutdown method to use on any running VMs
    SHUTDOWN=acpibutton

Searching for "wrong owner of" finds only 6 pages, none of which are about VirtualBox.

Versions: the host is Slackware64 13.1 running VirtualBox PUEL 3.2.12 (first encountered running 3.2.8), used by user c. The guest is Windows XP.

This problem was reported at here which did not get any replies. The same problem is discussed (Debian? Ubuntu?) here.

Best

Charles

更動歷史 (4)

comment:1 14 年 前Charles 編輯

This was posted around 3 months ago; should I have expected any response yet?

comment:2 14 年 前Frank Mehnert 編輯

Sorry, there is no guaranteed response time for non-paying customers. Note that there are a lot of other tickets open.

Re your problem: I cannot reproduce it. I've just tried it out, works fine here. The comment about wrong permissions for /tmp/.vbox-ipc-xyz is there because if that directory still does not exist, the script must not call VBoxManage, otherwise it would create this directory with the wrong permissions and the user would not be able to start his VM next time. The script also presumes that it is executed by root (which is normally the case because this script is executed during shutdown).

comment:3 14 年 前Frank Mehnert 編輯

描述: 修改 (差異)

comment:4 8 年 前Frank Mehnert 編輯

描述: 修改 (差異)
狀態: newclosed
處理結果: worksforme
注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

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