Unknown subcommand: execute when using the guestcontrol parameter

I am trying to run /bin/lsthrough the command line interface provided by VirtualBox vboxmanage guestcontrol.

Following this documentation , I run the following commands:

vboxmanage startvm centos6;
vboxmanage  guestcontrol "centos6" execute --image "/bin/ls" --username root --passwordfile pwd.txt --wait-exit --wait-stdout -- -l /usr;

I have the following stdout:

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

Using:

VBoxManage guestcontrol [--verbose | -v] [--quiet | -q] [--username] [--domain] [--passwordfile | --password]

                          run [common-options]
                          [--exe <path to executable>] [--timeout <msec>]
                          [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]
                          [--ignore-operhaned-processes] [--no-profile]
                          [--no-wait-stdout|--wait-stdout]
                          [--no-wait-stderr|--wait-stderr]
                          [--dos2unix] [--unix2dos]
                          -- <program/arg0> [argument1] ... [argumentN]]

                          start [common-options]
                          [--exe <path to executable>] [--timeout <msec>]
                          [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]
                          [--ignore-operhaned-processes] [--no-profile]
                          -- <program/arg0> [argument1] ... [argumentN]]

                          copyfrom [common-options]
                          [--dryrun] [--follow] [-R|--recursive]
                          <guest-src0> [guest-src1 [...]] <host-dst>

                          copyfrom [common-options]
                          [--dryrun] [--follow] [-R|--recursive]
                          [--target-directory <host-dst-dir>]
                          <guest-src0> [guest-src1 [...]]

                          copyto [common-options]
                          [--dryrun] [--follow] [-R|--recursive]
                          <host-src0> [host-src1 [...]] <guest-dst>

                          copyto [common-options]
                          [--dryrun] [--follow] [-R|--recursive]
                          [--target-directory <guest-dst>]
                          <host-src0> [host-src1 [...]]

                          mkdir|createdir[ectory] [common-options]
                          [--parents] [--mode <mode>]
                          <guest directory> [...]

                          rmdir|removedir[ectory] [common-options]
                          [-R|--recursive]
                          <guest directory> [...]

                          removefile|rm [common-options] [-f|--force]
                          <guest file> [...]

                          mv|move|ren[ame] [common-options]
                          <source> [source1 [...]] <dest>

                          mktemp|createtemp[orary] [common-options]
                          [--secure] [--mode <mode>] [--tmpdir <directory>]
                          <template>

                          stat [common-options]
                          <file> [...]

VBoxManage guestcontrol [--verbose | -v] [--quiet | -q]

                          list <all|sessions|processes|files> [common-opts]

                          closeprocess [common-options]
                          <   --session-id <ID>
                            | --session-name <name or pattern>
                          <PID1> [PID1 [...]]

                          closesession [common-options]
                          <  --all | --session-id <ID>
                            | --session-name <name or pattern> >

                          updatega|updateguestadditions|updateadditions
                          [--source <guest additions .ISO>]
                          [--wait-start] [common-options]
                          [-- [<argument1>] ... [<argumentN>]]

                          watch [common-options]

Syntax error: Unknown subcommand: 'execute'

+4
1

, , , VirtualBox 5.0.10. "run" "execute" "--exe" "--image".

-wait-exit.

, : $ VBoxManage --nologo guestcontrol "Windows7-64" run --exe "C:\Windows\SysWOW64\cmd.exe" foo.bat --username myname --verbose --wait-stdout --wait-stderr -- "/c" "f:\path\foo.bat" "arg1" "f:" "arg3"

OS/X, 64- Windows foo.bat . "f:" - frive, OS/X, . "cmake" Windows 64 C. -, , , .

"run-exe" - "execute -image", , , emacs "", , --wait -exit . , VirtualBox VM . bash , .

VBoxManage ​​ "execute" "--image", , ( ) , , , .

: VirtualBox 5 ( - 5.2.6), $ VBoxManage --nologo guestcontrol "Windows7-64" run --exe "C:\\Windows\\system32\\cmd.exe" foo.bat --username myname --verbose --wait-stdout --wait-stderr -- "C:\Windows\SysWOW64\cmd.exe" "/c" "f:\path\foo.bat" "arg1" "f:" "arg3"

64- cmd.exe .

+5

Source: https://habr.com/ru/post/1614095/


All Articles