VirtualBox

Ticket #2629 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

command line VBoxManage modifyvm -uartmode is not working

Reported by: guillaume.prigent Owned by:
Priority: minor Component: VM control
Version: VirtualBox 2.0.4 Keywords: uartmode, uart, serial, VBoxManage
Cc: Guest type: other
Host type: Linux

Description

VBoxManage modifyvm myVmName -uartmode1 server "/tmp/mySocket" is not working. Same setting, but configured through GUI is working fine. Calling it acording to VBoxManage usage help.

output of command:

minos@frodon:~/Devel/hynesim/hynesim-ng/trunk$ sudo VBoxManage modifyvm myVmName -uart1 0x3f8 4 -uartmode1 server "/tmp/mySocket"
VirtualBox Command Line Management Interface Version 2.0.4
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling uart->SetHostMode (PortMode::HostPipe) at line 5353!
[!] Primary RC  = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Full error info present: true , basic error info present: true 
[!] Result Code = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Text        = Cannot set the host pipe mode of the serial port 0 because the pipe path is empty or null
[!] Component   = SerialPort, Interface: ISerialPort, {937f6970-5103-4745-b78e-d28dcf1479a8}
[!] Callee      = ISerialPort, {937f6970-5103-4745-b78e-d28dcf1479a8}

This problem appears in the OSE 2.0.4 and Commercial 2.0.4 Licenses.

Change History

comment:1 in reply to: ↑ description Changed 5 years ago by guillaume.prigent

The problem occurs because in VBoxManage.cpp (VirtualBox-2.0.4/src/VBox/Frontends/VBoxManage/VBoxManage.cpp) this code call SerialPortImpl.cpp to check error with STDMETHODIMP SerialPort::COMSETTER(HostMode) (PortMode_T aHostMode). In this method path is checked (null
empty) but it's fail because it's not yet assigned !!!.

To solve here's a modification i've made in VBoxManage.cpp (now it's work fine) :

.
.
.
            if (uarts_mode[n])
            {
                if (strcmp(uarts_mode[n], "disconnected") == 0)
                {
                    CHECK_ERROR_RET(uart, COMSETTER(HostMode) (PortMode_Disconnected), 1);
                }
                else
                {
                    // BEGIN MODIFICATION
                    CHECK_ERROR_RET(uart, COMSETTER(Path) (Bstr(uarts_path[n])), 1);'''
                    // END MODIFICATION

                    if (strcmp(uarts_mode[n], "server") == 0)
                    {
                        CHECK_ERROR_RET(uart, COMSETTER(HostMode) (PortMode_HostPipe), 1);
                        CHECK_ERROR_RET(uart, COMSETTER(Server) (TRUE), 1);
                    }
                    else if (strcmp(uarts_mode[n], "client") == 0)
                    {
                        CHECK_ERROR_RET(uart, COMSETTER(HostMode) (PortMode_HostPipe), 1);
                        CHECK_ERROR_RET(uart, COMSETTER(Server) (FALSE), 1);
                    }
                    else
                    {
                        CHECK_ERROR_RET(uart, COMSETTER(HostMode) (PortMode_HostDevice), 1);
                    }

                    // BEGIN MODIFICATION
                    // CHECK_ERROR_RET(uart, COMSETTER(Path) (Bstr(uarts_path[n])), 1);
                    // END MODIFICATION
                }
            }
.
.
.

I hope it's can help you to commit it in next version.

comment:2 Changed 5 years ago by ponderability

I experience this same error with VirtualBox 2.0.6 on Mac OSX 10.4.11 (guest is ReactOS trunk builds).

myhost:~ me$ VBoxManage modifyvm ReactOS-37945 -uartmode1 server '/tmp/reactos'

VirtualBox Command Line Management Interface Version 2.0.6 (C) 2005-2008 Sun Microsystems, Inc. All rights reserved.

[!] FAILED calling uart->SetHostMode (PortMode::HostPipe) at line 5390! [!] Primary RC = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value [!] Full error info present: true , basic error info present: true [!] Result Code = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value [!] Text = Cannot set the host pipe mode of the serial port 0 because the pipe path is empty or null [!] Component = SerialPort, Interface: ISerialPort, {937f6970-5103-4745-b78e-d28dcf1479a8} [!] Callee = ISerialPort, {937f6970-5103-4745-b78e-d28dcf1479a8}

comment:3 Changed 5 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Please reopen if this problem is still current with the latest release 2.2.4.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use