Ticket #7769 (closed defect: worksforme)

Opened 7 years ago

Last modified 7 years ago

guest control give bogus error message over username

Reported by: ToddAndMargo Owned by:
Priority: major Component: VM control
Version: VirtualBox 3.2.10 Keywords:
Cc: Guest type: Windows
Host type: other

Description (last modified by frank) (diff)

Host: CentOS 5.5, VB 3.2.10 Guest: Windows Server 2003 R2, SP2

Hi Guys,

Would you guys please improve your guestcontrol error messages?

This from a larger script to control VM before backup:

su $DefaultUser -c "/usr/bin/VBoxManage  --nologo guestcontrol \
                    execute "$VM_Name" "C:\Windows\system32\shutdown.exe" \
                    --arguments "/t 5 /s /d p:2:3" --username "$WinAdminUser" \
                    --password "$WinAdminPassword" --wait-for stdout"

echo "su $DefaultUser -c "/usr/bin/VBoxManage  --nologo guestcontrol  \
                            execute "$VM_Name" "C:\Windows\system32\shutdown.exe" \
                            --arguments "/t 5 /s /d p:2:3" --username "$WinAdminUser" \
                            --password $WinAdminPassword --wait-for stdout""

And here is the result:

Oracle VM VirtualBox Command Line Management Interface Version 3.2.10
(C) 2005-2010 Oracle Corporation
All rights reserved.


VBoxManage guestcontrol     execute <vmname>|<uuid>
                            <path to program>
                            --username <name> --password <password>
                            [--arguments "<arguments>"]
                            [--environment "<NAME>=<VALUE> [<NAME>=<VALUE>]"]
                            [--flags <flags>] [--timeout <msec>]
                            [--verbose] [--wait-for exit,stdout,stderr||]

Syntax error: No user name specified!
su todd -c /usr/bin/VBoxManage --nologo guestcontrol execute VB-ABC \
   C:\Windows\system32\shutdown.exe --arguments /t 5 /s /d p:2:3 \
   --username admin --password nottellin --wait-for stdout

You will note that "Syntax error: No user name specified!" does not match up to "--username winadmin"

If I ever figure out what is really wrong, I will report back. In the mean time, I would appreciate it if you made your error messages match up with the real error.

Many thanks, -T

Change History

comment:1 Changed 7 years ago by ToddAndMargo

Figured out a workaround. This should help you guys come up with a reasonable error message that matches the problem. The problem is how you resolve the quotes inside the "su" command. The workaround is to use single quotes and drop the use of double quotes where possible.


su $DefaultUser -c "/usr/bin/VBoxManage  --nologo guestcontrol execute "$VM_Name" \
   'C:\Windows\system32\shutdown.exe' --arguments '/f /t 5 /s /d p:2:3' \
   --username $WinAdminUser --password $WinAdminPassword --wait-for stdout"

comment:2 Changed 7 years ago by frank

  • Description modified (diff)

comment:3 Changed 7 years ago by frank

Well, that's a quoting problem.

comment:4 Changed 7 years ago by frank

  • Status changed from new to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use