In the manual are some examples on how to use guestcontrol with "run --exe"
From the manual: run --exe "/bin/ls" --username foo --passwordfile bar.txt --wait-exit --wait-stdout -- -l /usr
Lets say instead of "-l /usr" I use "-lah /usr"
Here I don't get the correct output. I only get a list, never with the correct formatting or for example the file-size information.
Many other commands that use arguments are not working as well.
Why is that? What is the correct way to use "run --exe" with arguments after the last " -- "?
And also how to use quotation-marks correct here?
"-lah" "/usr" or "-lah /usr"
Or none? But some of my commands require quotation-marks.
I used:
VBoxManage guestcontrol testvm run --exe "/bin/ls" --username super --password superpass -- "-lah" "/usr"
I use the correct user credentials and I don't want do use SSH or any other solution for this.
How to use "run --exe"?
-
fth0
- Volunteer
- Posts: 5690
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: How to use "run --exe"?
In the VirtualBox User Manual, the examples do not match the command specification. Try VBoxManage guestcontrol testvm run --exe "/bin/ls" --username super --password superpass -- ls -lah /usrBillsComputerStore wrote:VBoxManage guestcontrol testvm run --exe "/bin/ls" --username super --password superpass -- "-lah" "/usr"
Regarding the quotes: Each argument of your commands should be quoted separately. In the example above, "ls" "-lah" "/usr" doesn't need the quotes.