- Timestamp:
- Mar 13, 2022 8:16:15 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150465
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Config.kmk
r94208 r94209 78 78 man_VBoxManage-setproperty.xml \ 79 79 man_VBoxManage-usbfilter.xml \ 80 man_VBoxManage-guestproperty.xml 80 man_VBoxManage-guestproperty.xml \ 81 man_VBoxManage-guestcontrol.xml 81 82 82 83 ## List of user manual XML files. -
trunk/doc/manual/en_US/man_VBoxManage-guestcontrol.xml
r93737 r94209 20 20 <refentry id="vboxmanage-guestcontrol" lang="en"> 21 21 <refentryinfo> 22 <pubdate> September 2019</pubdate>22 <pubdate>$Date$</pubdate> 23 23 <title>VBoxManage guestcontrol</title> 24 24 </refentryinfo> … … 32 32 <refname>VBoxManage-guestcontrol</refname> 33 33 <refpurpose>control a virtual machine from the host system</refpurpose> 34 <refclass> Oracle VM VirtualBox</refclass>34 <refclass>&product-name;</refclass> 35 35 </refnamediv> 36 36 -
trunk/doc/manual/en_US/user_VBoxManage.xml
r94208 r94209 1113 1113 <xi:include href="user_man_VBoxManage-guestproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 1114 1114 1115 <sect1 id="vboxmanage-guestcontrol"> 1116 1117 <title>VBoxManage guestcontrol</title> 1118 1119 <para> 1120 The <command>guestcontrol</command> commands enable control of the 1121 guest from the host. See 1122 <xref 1123 linkend="guestadd-guestcontrol" /> for an introduction. 1124 </para> 1125 1126 <para> 1127 The <command>guestcontrol</command> command has two sets of 1128 subcommands. The first set requires guest credentials to be 1129 specified, the second does not. 1130 </para> 1131 1132 <para> 1133 The first set of subcommands is of the following form: 1134 </para> 1135 1136 <screen>VBoxManage guestcontrol <uuid|vmname> <sub-command> 1137 [--username <name> ] 1138 [--passwordfile <file> | --password <password>] 1139 [--domain <domain> ] 1140 [-v|--verbose] [-q|quiet] ... 1141 </screen> 1142 1143 <para> 1144 The common options are as follows: 1145 </para> 1146 1147 <screen> 1148 [--username <name> ] 1149 [--passwordfile <file> | --password <password>] 1150 [--domain <domain> ] 1151 [-v|--verbose] [-q|quiet] 1152 </screen> 1153 1154 <para> 1155 The common options for the first set of subcommands are explained 1156 in the following list. 1157 </para> 1158 1159 <variablelist> 1160 1161 <varlistentry> 1162 <term> 1163 <computeroutput><uuid|vmname></computeroutput> 1164 </term> 1165 1166 <listitem> 1167 <para> 1168 Specifies the VM UUID or VM name. Mandatory. 1169 </para> 1170 </listitem> 1171 </varlistentry> 1172 1173 <varlistentry> 1174 <term> 1175 <computeroutput>--username <name></computeroutput> 1176 </term> 1177 1178 <listitem> 1179 <para> 1180 Specifies the user name on guest OS under which the process 1181 should run. This user name must already exist on the guest 1182 OS. If unspecified, the host user name is used. Optional 1183 </para> 1184 </listitem> 1185 </varlistentry> 1186 1187 <varlistentry> 1188 <term> 1189 <computeroutput>--passwordfile 1190 <file>|--password</computeroutput> 1191 </term> 1192 1193 <listitem> 1194 <para> 1195 Specifies the absolute path on guest file system of password 1196 file containing the password for the specified user account 1197 or password for the specified user account. Optional. If 1198 both are omitted, empty password is assumed. 1199 </para> 1200 </listitem> 1201 </varlistentry> 1202 1203 <varlistentry> 1204 <term> 1205 <computeroutput>--domain <domain></computeroutput> 1206 </term> 1207 1208 <listitem> 1209 <para> 1210 User domain for Windows guests. Optional. 1211 </para> 1212 </listitem> 1213 </varlistentry> 1214 1215 <varlistentry> 1216 <term> 1217 <computeroutput>-v|--verbose</computeroutput> 1218 </term> 1219 1220 <listitem> 1221 <para> 1222 Makes the subcommand execution more verbose. Optional 1223 </para> 1224 </listitem> 1225 </varlistentry> 1226 1227 <varlistentry> 1228 <term> 1229 <computeroutput>-q|--quiet</computeroutput> 1230 </term> 1231 1232 <listitem> 1233 <para> 1234 Makes the subcommand execution quieter. Optional. 1235 </para> 1236 </listitem> 1237 </varlistentry> 1238 1239 </variablelist> 1240 1241 <para> 1242 The first set of subcommands are as follows: 1243 </para> 1244 1245 <itemizedlist> 1246 1247 <listitem> 1248 <para> 1249 <computeroutput>run</computeroutput>: Executes a guest 1250 program, forwarding stdout, stderr, and stdin to and from the 1251 host until it completes. 1252 </para> 1253 1254 <screen>VBoxManage guestcontrol <uuid|vmname> run [common-options] 1255 --exe <path to executable> [--timeout <msec>] 1256 [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args] 1257 [--ignore-operhaned-processes] [--profile] 1258 [--no-wait-stdout|--wait-stdout] 1259 [--no-wait-stderr|--wait-stderr] 1260 [--dos2unix] [--unix2dos] 1261 -- <program/arg0> [argument1] ... [argumentN]] 1262 </screen> 1263 1264 <variablelist> 1265 1266 <varlistentry> 1267 <term> 1268 <computeroutput><uuid|vmname></computeroutput> 1269 </term> 1270 1271 <listitem> 1272 <para> 1273 Specifies the VM UUID or VM name. Mandatory. 1274 </para> 1275 </listitem> 1276 </varlistentry> 1277 1278 <varlistentry> 1279 <term> 1280 <computeroutput>--exe <path to 1281 executable></computeroutput> 1282 </term> 1283 1284 <listitem> 1285 <para> 1286 Specifies the absolute path of the executable on the 1287 guest OS file system. Mandatory. For example: 1288 <filename>C:\Windows\System32\calc.exe</filename>. 1289 </para> 1290 </listitem> 1291 </varlistentry> 1292 1293 <varlistentry> 1294 <term> 1295 <computeroutput>--timeout <msec></computeroutput> 1296 </term> 1297 1298 <listitem> 1299 <para> 1300 Specifies the maximum time, in microseconds, that the 1301 executable can run, during which 1302 <command>VBoxManage</command> receives its output. 1303 Optional. If unspecified, <command>VBoxManage</command> 1304 waits indefinitely for the process to end, or an error 1305 occurs. 1306 </para> 1307 </listitem> 1308 </varlistentry> 1309 1310 <varlistentry> 1311 <term> 1312 <computeroutput>-E|--putenv 1313 <NAME>=<VALUE></computeroutput> 1314 </term> 1315 1316 <listitem> 1317 <para> 1318 Sets, modifies, and unsets environment variables in the 1319 environment in which the program will run. Optional. 1320 </para> 1321 1322 <para> 1323 The guest process is created with the standard default 1324 guest OS environment. Use this option to modify that 1325 default environment. To set or modify a variable use: 1326 <computeroutput><NAME>=<VALUE></computeroutput>. 1327 To unset a variable use: 1328 <computeroutput><NAME>=</computeroutput> 1329 </para> 1330 1331 <para> 1332 Any spaces in names and values should be enclosed by 1333 quotes. 1334 </para> 1335 1336 <para> 1337 To set, modify, and unset multiple variables, use 1338 multiple instances of the 1339 <computeroutput>--E|--putenv</computeroutput> option. 1340 </para> 1341 </listitem> 1342 </varlistentry> 1343 1344 <varlistentry> 1345 <term> 1346 <computeroutput>--unquoted-args</computeroutput> 1347 </term> 1348 1349 <listitem> 1350 <para> 1351 Disables escaped double quoting, such as \"fred\", on 1352 arguments passed to the executed program. Optional. 1353 </para> 1354 </listitem> 1355 </varlistentry> 1356 1357 <varlistentry> 1358 <term> 1359 <computeroutput>--ignore-operhaned-processes</computeroutput> 1360 </term> 1361 1362 <listitem> 1363 <para> 1364 Ignore orphaned processes. Not yet implemented. 1365 Optional. 1366 </para> 1367 </listitem> 1368 </varlistentry> 1369 1370 <varlistentry> 1371 <term> 1372 <computeroutput>--profile</computeroutput> 1373 </term> 1374 1375 <listitem> 1376 <para> 1377 Use Profile. Not yet implemented. Optional. 1378 </para> 1379 </listitem> 1380 </varlistentry> 1381 1382 <varlistentry> 1383 <term> 1384 <computeroutput>--no-wait-stdout|--wait-stdout</computeroutput> 1385 </term> 1386 1387 <listitem> 1388 <para> 1389 Does not wait or waits until the guest process ends and 1390 receives its exit code and reason/flags. In the case of 1391 <computeroutput>--wait-stdout</computeroutput>, 1392 <command>VBoxManage</command> receives its stdout while 1393 the process runs. Optional. 1394 </para> 1395 </listitem> 1396 </varlistentry> 1397 1398 <varlistentry> 1399 <term> 1400 <computeroutput>--no-wait-stderr|--wait-stderr</computeroutput> 1401 </term> 1402 1403 <listitem> 1404 <para> 1405 Does not wait or waits until the guest process ends and 1406 receives its exit code, error messages, and flags. In 1407 the case of 1408 <computeroutput>--wait-stderr</computeroutput>, 1409 <command>VBoxManage</command> receives its stderr while 1410 the process runs. Optional. 1411 </para> 1412 </listitem> 1413 </varlistentry> 1414 1415 <varlistentry> 1416 <term> 1417 <computeroutput>--dos2unix</computeroutput> 1418 </term> 1419 1420 <listitem> 1421 <para> 1422 Converts output from DOS/Windows guests to 1423 UNIX/Linux-compatible line endings, CR + LF to LF. Not 1424 yet implemented. Optional. 1425 </para> 1426 </listitem> 1427 </varlistentry> 1428 1429 <varlistentry> 1430 <term> 1431 <computeroutput>--unix2dos</computeroutput> 1432 </term> 1433 1434 <listitem> 1435 <para> 1436 Converts output from a UNIX/Linux guests to 1437 DOS/Windows-compatible line endings, LF to CR + LF. Not 1438 yet implemented. Optional. 1439 </para> 1440 </listitem> 1441 </varlistentry> 1442 1443 <varlistentry> 1444 <term> 1445 <computeroutput>[-- <program/arg0> 1446 [<argument1>] ... 1447 [<argumentN>]]</computeroutput> 1448 </term> 1449 1450 <listitem> 1451 <para> 1452 Specifies the program name, followed by one or more 1453 arguments to pass to the program. Optional. 1454 </para> 1455 1456 <para> 1457 Any spaces in arguments should be enclosed by quotes. 1458 </para> 1459 </listitem> 1460 </varlistentry> 1461 1462 </variablelist> 1463 1464 <note> 1465 <para> 1466 On Windows there are certain limitations for graphical 1467 applications. See <xref linkend="KnownIssues" />. 1468 </para> 1469 </note> 1470 1471 <para> 1472 Examples of using the <command>guestcontrol run</command> 1473 command are as follows: 1474 </para> 1475 1476 <screen>VBoxManage --nologo guestcontrol "My VM" run --exe "/bin/ls" 1477 --username foo --passwordfile bar.txt --wait-exit --wait-stdout -- -l /usr</screen> 1478 1479 <screen>VBoxManage --nologo guestcontrol "My VM" run --exe "c:\\windows\\system32\\ipconfig.exe" 1480 --username foo --passwordfile bar.txt --wait-exit --wait-stdout</screen> 1481 1482 <para> 1483 Note that the double backslashes in the second example are 1484 only required on UNIX hosts. 1485 </para> 1486 1487 <note> 1488 <para> 1489 For certain commands a user name of an existing user account 1490 on the guest must be specified. Anonymous executions are not 1491 supported for security reasons. A user account password, 1492 however, is optional and depends on the guest's OS security 1493 policy or rules. If no password is specified for a given 1494 user name, an empty password will be used. On certain OSes 1495 like Windows the security policy may needs to be adjusted in 1496 order to allow user accounts with an empty password set. 1497 Also, global domain rules might apply and therefore cannot 1498 be changed. 1499 </para> 1500 </note> 1501 1502 <para> 1503 Starting at &product-name; 4.1.2 guest process execution by 1504 default is limited to serve up to five guest processes at a 1505 time. If a new guest process gets started which would exceed 1506 this limit, the oldest not running guest process will be 1507 discarded in order to be able to run that new process. Also, 1508 retrieving output from this old guest process will not be 1509 possible anymore then. If all five guest processes are still 1510 active and running, starting a new guest process will result 1511 in an appropriate error message. 1512 </para> 1513 1514 <para> 1515 To raise or lower the guest process execution limit, either 1516 use the guest property 1517 <computeroutput>/VirtualBox/GuestAdd/VBoxService/--control-procs-max-kept</computeroutput> 1518 or <command>VBoxService</command> command line by specifying 1519 <computeroutput>--control-procs-max-kept</computeroutput> 1520 needs to be modified. A restart of the guest OS is required 1521 afterwards. To serve unlimited guest processes, a value of 1522 <computeroutput>0</computeroutput> needs to be set, but this 1523 is not recommended. 1524 </para> 1525 </listitem> 1526 1527 <listitem> 1528 <para> 1529 <computeroutput>start</computeroutput>: Executes a guest 1530 program until it completes. 1531 </para> 1532 1533 <screen>VBoxManage guestcontrol <uuid|vmname> start [common-options] 1534 [--exe <path to executable>] [--timeout <msec>] 1535 [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args] 1536 [--ignore-operhaned-processes] [--profile] 1537 -- <program/arg0> [argument1] ... [argumentN]] 1538 </screen> 1539 1540 <para> 1541 Where the options are as follows: 1542 </para> 1543 1544 <variablelist> 1545 1546 <varlistentry> 1547 <term> 1548 <computeroutput><uuid|vmname></computeroutput> 1549 </term> 1550 1551 <listitem> 1552 <para> 1553 Specifies the VM UUID or VM name. Mandatory. 1554 </para> 1555 </listitem> 1556 </varlistentry> 1557 1558 <varlistentry> 1559 <term> 1560 <computeroutput>--exe <path to 1561 executable></computeroutput> 1562 </term> 1563 1564 <listitem> 1565 <para> 1566 Specifies the absolute path of the executable on the 1567 guest OS file system. Mandatory. For example: 1568 <filename>C:\Windows\System32\calc.exe</filename> 1569 </para> 1570 </listitem> 1571 </varlistentry> 1572 1573 <varlistentry> 1574 <term> 1575 <computeroutput>--timeout <msec></computeroutput> 1576 </term> 1577 1578 <listitem> 1579 <para> 1580 Specifies the maximum time, in microseconds, that the 1581 executable can run. Optional. If unspecified, 1582 <command>VBoxManage</command> waits indefinitely for the 1583 process to end, or an error occurs. 1584 </para> 1585 </listitem> 1586 </varlistentry> 1587 1588 <varlistentry> 1589 <term> 1590 <computeroutput>-E|--putenv 1591 <NAME>=<VALUE></computeroutput> 1592 </term> 1593 1594 <listitem> 1595 <para> 1596 Sets, modifies, and unsets environment variables in the 1597 environment in which the program will run. Optional. 1598 </para> 1599 1600 <para> 1601 The guest process is created with the standard default 1602 guest OS environment. Use this option to modify that 1603 default environment. To set or modify a variable use: 1604 <computeroutput><NAME>=<VALUE></computeroutput>. 1605 To unset a variable use: 1606 <computeroutput><NAME>=</computeroutput> 1607 </para> 1608 1609 <para> 1610 Any spaces in names and values should be enclosed by 1611 quotes. 1612 </para> 1613 1614 <para> 1615 To set, modify, or unset multiple variables, use 1616 multiple instances of the 1617 <computeroutput>--E|--putenv</computeroutput> option. 1618 </para> 1619 </listitem> 1620 </varlistentry> 1621 1622 <varlistentry> 1623 <term> 1624 <computeroutput>--unquoted-args</computeroutput> 1625 </term> 1626 1627 <listitem> 1628 <para> 1629 Disables escaped double quoting, such as \"fred\", on 1630 arguments passed to the executed program. Optional. 1631 </para> 1632 </listitem> 1633 </varlistentry> 1634 1635 <varlistentry> 1636 <term> 1637 <computeroutput>--ignore-operhaned-processes</computeroutput> 1638 </term> 1639 1640 <listitem> 1641 <para> 1642 Ignores orphaned processes. Not yet implemented. 1643 Optional. 1644 </para> 1645 </listitem> 1646 </varlistentry> 1647 1648 <varlistentry> 1649 <term> 1650 <computeroutput>--profile</computeroutput> 1651 </term> 1652 1653 <listitem> 1654 <para> 1655 Use a profile. Not yet implemented. Optional. 1656 </para> 1657 </listitem> 1658 </varlistentry> 1659 1660 <varlistentry> 1661 <term> 1662 <computeroutput>[-- <program/arg0> 1663 [<argument1>] ... 1664 [<argumentN>]]</computeroutput> 1665 </term> 1666 1667 <listitem> 1668 <para> 1669 Specifies the program name, followed by one or more 1670 arguments to pass to the program. Optional. 1671 </para> 1672 1673 <para> 1674 Any spaces in arguments should be enclosed by quotes. 1675 </para> 1676 </listitem> 1677 </varlistentry> 1678 1679 </variablelist> 1680 1681 <note> 1682 <para> 1683 On Windows there are certain limitations for graphical 1684 applications. See <xref linkend="KnownIssues" />. 1685 </para> 1686 </note> 1687 1688 <para> 1689 Examples of using the <command>guestcontrol start</command> 1690 command are as follows: 1691 </para> 1692 1693 <screen>VBoxManage --nologo guestcontrol "My VM" start --exe "/bin/ls" 1694 --username foo --passwordfile bar.txt --wait-exit --wait-stdout -- -l /usr</screen> 1695 1696 <screen>VBoxManage --nologo guestcontrol "My VM" start --exe "c:\\windows\\system32\\ipconfig.exe" 1697 --username foo --passwordfile bar.txt --wait-exit --wait-stdout</screen> 1698 1699 <para> 1700 Note that the double backslashes in the second example are 1701 only required on UNIX hosts. 1702 </para> 1703 1704 <note> 1705 <para> 1706 For certain commands a user name of an existing user account 1707 on the guest must be specified. Anonymous executions are not 1708 supported for security reasons. A user account password, 1709 however, is optional and depends on the guest's OS security 1710 policy or rules. If no password is specified for a given 1711 user name, an empty password will be used. On certain OSes 1712 like Windows the security policy may needs to be adjusted in 1713 order to allow user accounts with an empty password set. 1714 Also, global domain rules might apply and therefore cannot 1715 be changed. 1716 </para> 1717 </note> 1718 1719 <para> 1720 Starting at &product-name; 4.1.2 guest process execution by 1721 default is limited to serve up to five guest processes at a 1722 time. If a new guest process gets started which would exceed 1723 this limit, the oldest not running guest process will be 1724 discarded in order to be able to run that new process. Also, 1725 retrieving output from this old guest process will not be 1726 possible anymore then. If all five guest processes are still 1727 active and running, starting a new guest process will result 1728 in an appropriate error message. 1729 </para> 1730 1731 <para> 1732 To raise or lower the guest process execution limit, either 1733 use the guest property 1734 <computeroutput>/VirtualBox/GuestAdd/VBoxService/--control-procs-max-kept</computeroutput> 1735 or <command>VBoxService</command> command line by specifying 1736 <computeroutput>--control-procs-max-kept</computeroutput> 1737 needs to be modified. A restart of the guest OS is required 1738 afterwards. To serve unlimited guest processes, a value of 1739 <computeroutput>0</computeroutput> needs to be set, but this 1740 is not recommended. 1741 </para> 1742 </listitem> 1743 1744 <listitem> 1745 <para> 1746 <computeroutput>copyfrom</computeroutput>: Copies files from 1747 the guest to the host file system. Only available with Guest 1748 Additions 4.0 or later installed. 1749 </para> 1750 1751 <screen>VBoxManage guestcontrol <uuid|vmname> copyfrom [common-options] 1752 [--follow] [--R|recursive] 1753 --target-directory <host-dst-dir> 1754 <guest-src0> [<guest-src1> [...]] </screen> 1755 1756 <para> 1757 Where the parameters are as follows: 1758 </para> 1759 1760 <variablelist> 1761 1762 <varlistentry> 1763 <term> 1764 <computeroutput><uid|vmname></computeroutput> 1765 </term> 1766 1767 <listitem> 1768 <para> 1769 Specifies the VM UUID or VM name. Mandatory. 1770 </para> 1771 </listitem> 1772 </varlistentry> 1773 1774 <varlistentry> 1775 <term> 1776 <computeroutput>--follow</computeroutput> 1777 </term> 1778 1779 <listitem> 1780 <para> 1781 Enables symlink following on the guest file system. 1782 Optional. 1783 </para> 1784 </listitem> 1785 </varlistentry> 1786 1787 <varlistentry> 1788 <term> 1789 <computeroutput>-R|--recursive</computeroutput> 1790 </term> 1791 1792 <listitem> 1793 <para> 1794 Enables recursive copying of files and directories from 1795 the specified guest file system directory. Optional. 1796 </para> 1797 </listitem> 1798 </varlistentry> 1799 1800 <varlistentry> 1801 <term> 1802 <computeroutput>--target-directory 1803 <host-dst-dir></computeroutput> 1804 </term> 1805 1806 <listitem> 1807 <para> 1808 Specifies the absolute path of the host file system 1809 destination directory. Mandatory. For example: 1810 <filename>C:\Temp</filename>. 1811 </para> 1812 </listitem> 1813 </varlistentry> 1814 1815 <varlistentry> 1816 <term> 1817 <computeroutput><guest-src0> [<guest-src1> 1818 [...]]</computeroutput> 1819 </term> 1820 1821 <listitem> 1822 <para> 1823 Specifies the absolute paths of guest file system files 1824 to be copied. Mandatory. For example: 1825 <filename>C:\Windows\System32\calc.exe</filename>. 1826 Wildcards can be used in the expressions. For example: 1827 <filename>C:\Windows\System*\*.dll</filename>. 1828 </para> 1829 </listitem> 1830 </varlistentry> 1831 1832 </variablelist> 1833 </listitem> 1834 1835 <listitem> 1836 <para> 1837 <computeroutput>copyto</computeroutput>: Copies files from the 1838 host to the guest file system. Only available with Guest 1839 Additions 4.0 or later installed. 1840 </para> 1841 1842 <screen>VBoxManage guestcontrol <uuid|vmname> copyto [common-options] 1843 [--follow] [--R|recursive] 1844 --target-directory <guest-dst> 1845 <host-src0> [<host-src1> [...]] </screen> 1846 1847 <para> 1848 Where the parameters are as follows: 1849 </para> 1850 1851 <variablelist> 1852 1853 <varlistentry> 1854 <term> 1855 <computeroutput><uuid|vmname></computeroutput> 1856 </term> 1857 1858 <listitem> 1859 <para> 1860 Specifies the VM UUID or VM name. Mandatory. 1861 </para> 1862 </listitem> 1863 </varlistentry> 1864 1865 <varlistentry> 1866 <term> 1867 <computeroutput>--follow</computeroutput> 1868 </term> 1869 1870 <listitem> 1871 <para> 1872 Enables symlink following on the host file system. 1873 Optional. 1874 </para> 1875 </listitem> 1876 </varlistentry> 1877 1878 <varlistentry> 1879 <term> 1880 <computeroutput>-R|--recursive</computeroutput> 1881 </term> 1882 1883 <listitem> 1884 <para> 1885 Enables recursive copying of files and directories from 1886 the specified host file system directory. Optional. 1887 </para> 1888 </listitem> 1889 </varlistentry> 1890 1891 <varlistentry> 1892 <term> 1893 <computeroutput>--target-directory 1894 <guest-dst></computeroutput> 1895 </term> 1896 1897 <listitem> 1898 <para> 1899 Specifies the absolute path of the guest file system 1900 destination directory. Mandatory. For example: 1901 <filename>C:\Temp</filename>. 1902 </para> 1903 </listitem> 1904 </varlistentry> 1905 1906 <varlistentry> 1907 <term> 1908 <computeroutput><host-src0> [<host-src1> 1909 [...]]</computeroutput> 1910 </term> 1911 1912 <listitem> 1913 <para> 1914 Specifies the absolute paths of host file system files 1915 to be copied. Mandatory. For example: 1916 <filename>C:\Windows\System32\calc.exe</filename>. 1917 Wildcards can be used in the expressions. For example: 1918 <filename>C:\Windows\System*\*.dll</filename>. 1919 </para> 1920 </listitem> 1921 </varlistentry> 1922 1923 </variablelist> 1924 </listitem> 1925 1926 <listitem> 1927 <para> 1928 <computeroutput>md|mkdir|createdir|createdirectory</computeroutput>: 1929 Creates one or more directories on the guest file system. Only 1930 available with Guest Additions 4.0 or later installed. 1931 </para> 1932 1933 <screen>VBoxManage guestcontrol <uuid|vmname> md|mkdir|createdir|createdirectory [common-options] 1934 [--parents] [--mode <mode>] 1935 <guest-dir0> [<guest-dir1> [...]] </screen> 1936 1937 <para> 1938 Where the parameters are as follows: 1939 </para> 1940 1941 <variablelist> 1942 1943 <varlistentry> 1944 <term> 1945 <computeroutput><uuid|vmname></computeroutput> 1946 </term> 1947 1948 <listitem> 1949 <para> 1950 Specifies the VM UUID or VM name. Mandatory. 1951 </para> 1952 </listitem> 1953 </varlistentry> 1954 1955 <varlistentry> 1956 <term> 1957 <computeroutput>--parents</computeroutput> 1958 </term> 1959 1960 <listitem> 1961 <para> 1962 Creates any absent parent directories of the specified 1963 directory. Optional. 1964 </para> 1965 1966 <para> 1967 For example: If specified directory is 1968 <filename>D:\Foo\Bar</filename> and 1969 <filename>D:\Foo</filename> is absent, it will be 1970 created. In such a case, had the 1971 <computeroutput>--parents</computeroutput> option not 1972 been used, this command would have failed. 1973 </para> 1974 </listitem> 1975 </varlistentry> 1976 1977 <varlistentry> 1978 <term> 1979 <computeroutput>--mode <mode></computeroutput> 1980 </term> 1981 1982 <listitem> 1983 <para> 1984 Specifies the permission mode on the specified 1985 directories, and any parents, if the 1986 <computeroutput>--parents</computeroutput> option is 1987 used. Currently octal modes only, such as. 1988 <computeroutput>0755</computeroutput>, are supported. 1989 </para> 1990 </listitem> 1991 </varlistentry> 1992 1993 <varlistentry> 1994 <term> 1995 <computeroutput><guest-dir0> [<guest-dir1> 1996 [...]]</computeroutput> 1997 </term> 1998 1999 <listitem> 2000 <para> 2001 Specifies a list of absolute paths of directories to be 2002 created on guest file system. Mandatory. For example: 2003 <filename>D:\Foo\Bar</filename>. 2004 </para> 2005 2006 <para> 2007 All parent directories must already exist unless the 2008 switch <computeroutput>--parents</computeroutput> is 2009 used. For example, in the above example 2010 <filename>D:\Foo</filename>. The specified user must 2011 have sufficient rights to create the specified 2012 directories, and any parents that need to be created. 2013 </para> 2014 </listitem> 2015 </varlistentry> 2016 2017 </variablelist> 2018 </listitem> 2019 2020 <listitem> 2021 <para> 2022 <computeroutput>rmdir|removedir|removedirectory</computeroutput>: 2023 Deletes specified guest file system directories. Only 2024 available with installed Guest Additions 4.3.2 and later. 2025 </para> 2026 2027 <screen>VBoxManage guestcontrol <uuid|vmname> rmdir|removedir|removedirectory [common-options] 2028 [--recursive|-R] 2029 <guest-dir0> [<guest-dir1> [...]] 2030 </screen> 2031 2032 <para> 2033 Where the parameters are as follows: 2034 </para> 2035 2036 <variablelist> 2037 2038 <varlistentry> 2039 <term> 2040 <computeroutput><uuid|vmname></computeroutput> 2041 </term> 2042 2043 <listitem> 2044 <para> 2045 Specifies the VM UUID or VM name. Mandatory. 2046 </para> 2047 </listitem> 2048 </varlistentry> 2049 2050 <varlistentry> 2051 <term> 2052 <computeroutput>--recursive</computeroutput> 2053 </term> 2054 2055 <listitem> 2056 <para> 2057 Recursively removes directories and contents. Optional. 2058 </para> 2059 </listitem> 2060 </varlistentry> 2061 2062 <varlistentry> 2063 <term> 2064 <computeroutput><guest-dir0> [<guest-dir1> 2065 [...]]</computeroutput> 2066 </term> 2067 2068 <listitem> 2069 <para> 2070 Specifies a list of the absolute paths of directories to 2071 be deleted on guest file system. Mandatory. Wildcards 2072 are allowed. For example: 2073 <filename>D:\Foo\*Bar</filename>. The specified user 2074 must have sufficient rights to delete the specified 2075 directories. 2076 </para> 2077 </listitem> 2078 </varlistentry> 2079 2080 </variablelist> 2081 </listitem> 2082 2083 <listitem> 2084 <para> 2085 <computeroutput>rm|removefile</computeroutput>: Deletes 2086 specified files on the guest file system. Only available with 2087 installed Guest Additions 4.3.2 and later. 2088 </para> 2089 2090 <screen>VBoxManage guestcontrol <uuid|vmname> rm|removefile [common-options] 2091 [-f|--force] 2092 <guest-file0> [<guest-file1> [...]] </screen> 2093 2094 <para> 2095 Where the parameters are as follows: 2096 </para> 2097 2098 <variablelist> 2099 2100 <varlistentry> 2101 <term> 2102 <computeroutput><uuid|vmname></computeroutput> 2103 </term> 2104 2105 <listitem> 2106 <para> 2107 Specifies the VM UUID or VM name. Mandatory. 2108 </para> 2109 </listitem> 2110 </varlistentry> 2111 2112 <varlistentry> 2113 <term> 2114 <computeroutput>-f|--force</computeroutput> 2115 </term> 2116 2117 <listitem> 2118 <para> 2119 Enforce operation and override any requests for 2120 confirmations. Optional. 2121 </para> 2122 </listitem> 2123 </varlistentry> 2124 2125 <varlistentry> 2126 <term> 2127 <computeroutput><guest-file0> [<guest-file1> 2128 [...]]</computeroutput> 2129 </term> 2130 2131 <listitem> 2132 <para> 2133 Specifies a list of absolute paths of files to be 2134 deleted on guest file system. Mandatory. Wildcards are 2135 allowed. For example: 2136 <filename>D:\Foo\Bar\text*.txt</filename>. The specified 2137 user should have sufficient rights to delete the 2138 specified files. 2139 </para> 2140 </listitem> 2141 </varlistentry> 2142 2143 </variablelist> 2144 </listitem> 2145 2146 <listitem> 2147 <para> 2148 <computeroutput>mv|move|ren|rename</computeroutput>: Renames 2149 files and/or directories on the guest file system. Only 2150 available with installed Guest Additions 4.3.2 and later. 2151 </para> 2152 2153 <screen>VBoxManage guestcontrol <uuid|vmname> mv|move|ren|rename [common-options] 2154 <guest-source0> [<guest-source1> [...]] <guest-dest></screen> 2155 2156 <para> 2157 Where the parameters are as follows: 2158 </para> 2159 2160 <variablelist> 2161 2162 <varlistentry> 2163 <term> 2164 <computeroutput><uuid|vmname></computeroutput> 2165 </term> 2166 2167 <listitem> 2168 <para> 2169 Specifies the VM UUID or VM name. Mandatory. 2170 </para> 2171 </listitem> 2172 </varlistentry> 2173 2174 <varlistentry> 2175 <term> 2176 <computeroutput><guest-source0> 2177 [<guest-source1> [...]]</computeroutput> 2178 </term> 2179 2180 <listitem> 2181 <para> 2182 Specifies absolute paths of files or a single directory 2183 to be moved and renamed on guest file system. Mandatory. 2184 Wildcards are allowed in file names. The specified user 2185 should have sufficient rights to access the specified 2186 files. 2187 </para> 2188 </listitem> 2189 </varlistentry> 2190 2191 <varlistentry> 2192 <term> 2193 <computeroutput><dest></computeroutput> 2194 </term> 2195 2196 <listitem> 2197 <para> 2198 Specifies the absolute path of the destination file or 2199 directory to which the files are to be moved. Mandatory. 2200 If only one file to be moved, <dest> can be file 2201 or directory, else it must be a directory. The specified 2202 user must have sufficient rights to access the 2203 destination file or directory. 2204 </para> 2205 </listitem> 2206 </varlistentry> 2207 2208 </variablelist> 2209 </listitem> 2210 2211 <listitem> 2212 <para> 2213 <computeroutput>mktemp|createtemp|createtemporary</computeroutput>: 2214 Creates a temporary file or directory on the guest file 2215 system, to assist subsequent copying of files from the host to 2216 the guest file systems. By default, the file or directory is 2217 created in the guest's platform specific temp directory. Not 2218 currently supported. Only available with installed Guest 2219 Additions 4.2 and later. 2220 </para> 2221 2222 <screen>VBoxManage guestcontrol <uuid|vmname> mktemp|createtemp|createtemporary [common-options] 2223 [--directory] [--secure] [--mode <mode>] [--tmpdir <directory>] 2224 <template> 2225 </screen> 2226 2227 <para> 2228 The parameters are as follows: 2229 </para> 2230 2231 <variablelist> 2232 2233 <varlistentry> 2234 <term> 2235 <computeroutput><uuid|vmname></computeroutput> 2236 </term> 2237 2238 <listitem> 2239 <para> 2240 Specifies the VM UUID or VM name. Mandatory. 2241 </para> 2242 </listitem> 2243 </varlistentry> 2244 2245 <varlistentry> 2246 <term> 2247 <computeroutput>--directory</computeroutput> 2248 </term> 2249 2250 <listitem> 2251 <para> 2252 Creates a temporary directory instead of a file, 2253 specified by the <template> parameter. Optional. 2254 </para> 2255 </listitem> 2256 </varlistentry> 2257 2258 <varlistentry> 2259 <term> 2260 <computeroutput>--secure</computeroutput> 2261 </term> 2262 2263 <listitem> 2264 <para> 2265 Enforces secure file and directory creation. Optional. 2266 The permission mode is set to 2267 <computeroutput>0755</computeroutput>. Operation fails 2268 if it cannot be performed securely. 2269 </para> 2270 </listitem> 2271 </varlistentry> 2272 2273 <varlistentry> 2274 <term> 2275 <computeroutput>--mode <mode></computeroutput> 2276 </term> 2277 2278 <listitem> 2279 <para> 2280 Specifies the permission mode of the specified 2281 directory. Optional. Currently only octal modes, such as 2282 <computeroutput>0755</computeroutput>, are supported. 2283 </para> 2284 </listitem> 2285 </varlistentry> 2286 2287 <varlistentry> 2288 <term> 2289 <computeroutput>--tmpdir 2290 <directory></computeroutput> 2291 </term> 2292 2293 <listitem> 2294 <para> 2295 Specifies the absolute path of the directory on the 2296 guest file system where the file or directory specified 2297 will be created. Optional. If unspecified, the 2298 platform-specific temp directory is used. 2299 </para> 2300 </listitem> 2301 </varlistentry> 2302 2303 <varlistentry> 2304 <term> 2305 <computeroutput><template></computeroutput> 2306 </term> 2307 2308 <listitem> 2309 <para> 2310 Specifies a file name without a directory path, 2311 containing at least one sequence of three consecutive X 2312 characters, or ending in X. Mandatory. 2313 </para> 2314 </listitem> 2315 </varlistentry> 2316 2317 </variablelist> 2318 </listitem> 2319 2320 <listitem> 2321 <para> 2322 <computeroutput>stat</computeroutput>: Displays file or file 2323 system statuses on the guest. 2324 </para> 2325 2326 <screen>VBoxManage guestcontrol <uuid|vmname> stat [common-options] 2327 <file0> [<file1> [...]]</screen> 2328 2329 <para> 2330 Where the parameters are as follows: 2331 </para> 2332 2333 <variablelist> 2334 2335 <varlistentry> 2336 <term> 2337 <computeroutput><uuid|vmname></computeroutput> 2338 </term> 2339 2340 <listitem> 2341 <para> 2342 Specifies the VM UUID or VM name. Mandatory. 2343 </para> 2344 </listitem> 2345 </varlistentry> 2346 2347 <varlistentry> 2348 <term> 2349 <computeroutput><file0> [<file1> 2350 [...]]</computeroutput> 2351 </term> 2352 2353 <listitem> 2354 <para> 2355 Specifies absolute paths of files or file systems on the 2356 guest file system. Mandatory. For example: 2357 <filename>/home/foo/a.out</filename>. The specified user 2358 should have sufficient rights to access the specified 2359 files or file systems. 2360 </para> 2361 </listitem> 2362 </varlistentry> 2363 2364 </variablelist> 2365 </listitem> 2366 2367 </itemizedlist> 2368 2369 <para> 2370 The second set of subcommands is of the form: 2371 </para> 2372 2373 <screen>VBoxManage guestcontrol <uuid|vmname> <sub-command> 2374 [-v|--verbose] [-q|quiet] ... 2375 </screen> 2376 2377 <para> 2378 The common options are as follows: 2379 </para> 2380 2381 <screen> 2382 [-v|--verbose] [-q|--quiet] 2383 </screen> 2384 2385 <para> 2386 Details of the common options for the second set of subcommands 2387 are as follows: 2388 </para> 2389 2390 <variablelist> 2391 2392 <varlistentry> 2393 <term> 2394 <computeroutput>-v|--verbose</computeroutput> 2395 </term> 2396 2397 <listitem> 2398 <para> 2399 Makes the subcommand execution more verbose. Optional. 2400 </para> 2401 </listitem> 2402 </varlistentry> 2403 2404 <varlistentry> 2405 <term> 2406 <computeroutput>-q|--quiet</computeroutput> 2407 </term> 2408 2409 <listitem> 2410 <para> 2411 Makes the subcommand execution quieter. Optional. 2412 </para> 2413 </listitem> 2414 </varlistentry> 2415 2416 </variablelist> 2417 2418 <para> 2419 The second set of subcommands are as follows: 2420 </para> 2421 2422 <itemizedlist> 2423 2424 <listitem> 2425 <para> 2426 <computeroutput>list</computeroutput>: Lists guest control 2427 configuration and status data. For example: open guest 2428 sessions, guest processes, and files. 2429 </para> 2430 2431 <screen>VBoxManage guestcontrol <uuid|vmname> list [common-opts] 2432 <all|sessions|processes|files> </screen> 2433 2434 <para> 2435 Where the parameters are as follows: 2436 </para> 2437 2438 <variablelist> 2439 2440 <varlistentry> 2441 <term> 2442 <computeroutput><uuid|vmname></computeroutput> 2443 </term> 2444 2445 <listitem> 2446 <para> 2447 Specifies the VM UUID or VM name. Mandatory. 2448 </para> 2449 </listitem> 2450 </varlistentry> 2451 2452 <varlistentry> 2453 <term> 2454 <computeroutput>all|sessions|processes|files</computeroutput> 2455 </term> 2456 2457 <listitem> 2458 <para> 2459 Indicates whether to list all available data or guest 2460 sessions, processes or files. Mandatory. 2461 </para> 2462 </listitem> 2463 </varlistentry> 2464 2465 </variablelist> 2466 </listitem> 2467 2468 <listitem> 2469 <para> 2470 <computeroutput>closeprocess</computeroutput>: Terminates 2471 guest processes specified by PIDs running in a guest session, 2472 specified by the session ID or name. 2473 </para> 2474 2475 <screen>VBoxManage guestcontrol <uuid|vmname> closeprocess [common-options] 2476 --session-id <ID> | --session-name <name or pattern> 2477 <PID0> [<PID1> [...]] </screen> 2478 2479 <para> 2480 Where the parameters are as follows: 2481 </para> 2482 2483 <variablelist> 2484 2485 <varlistentry> 2486 <term> 2487 <computeroutput><uuid|vmname></computeroutput> 2488 </term> 2489 2490 <listitem> 2491 <para> 2492 Specifies the VM UUID or VM name. Mandatory. 2493 </para> 2494 </listitem> 2495 </varlistentry> 2496 2497 <varlistentry> 2498 <term> 2499 <computeroutput>--session-id <ID></computeroutput> 2500 </term> 2501 2502 <listitem> 2503 <para> 2504 Specifies the guest session by its ID. Optional. 2505 </para> 2506 </listitem> 2507 </varlistentry> 2508 2509 <varlistentry> 2510 <term> 2511 <computeroutput>--session-name <name or 2512 pattern></computeroutput> 2513 </term> 2514 2515 <listitem> 2516 <para> 2517 Specifies the guest session by its name, or multiple 2518 sessions using a pattern containing wildcards. Optional. 2519 </para> 2520 </listitem> 2521 </varlistentry> 2522 2523 <varlistentry> 2524 <term> 2525 <computeroutput><PID0> [<PID1> 2526 [...]]</computeroutput> 2527 </term> 2528 2529 <listitem> 2530 <para> 2531 Specifies a list of process identifiers (PIDs) of guest 2532 processes to be terminated. Mandatory. 2533 </para> 2534 </listitem> 2535 </varlistentry> 2536 2537 </variablelist> 2538 </listitem> 2539 2540 <listitem> 2541 <para> 2542 <computeroutput>closesession</computeroutput>: Closes 2543 specified guest sessions, specified either by session ID or 2544 name. 2545 </para> 2546 2547 <screen>VBoxManage guestcontrol <uuid|vmname> closesession [common-options] 2548 --session-id <ID> | --session-name <name or pattern> | --all </screen> 2549 2550 <para> 2551 Where the parameters are as follows: 2552 </para> 2553 2554 <variablelist> 2555 2556 <varlistentry> 2557 <term> 2558 <computeroutput><uuid|vmname></computeroutput> 2559 </term> 2560 2561 <listitem> 2562 <para> 2563 Specifies the VM UUID or VM name. Mandatory. 2564 </para> 2565 </listitem> 2566 </varlistentry> 2567 2568 <varlistentry> 2569 <term> 2570 <computeroutput>--session-id <ID></computeroutput> 2571 </term> 2572 2573 <listitem> 2574 <para> 2575 Specifies the guest session to be closed by ID. 2576 Optional. 2577 </para> 2578 </listitem> 2579 </varlistentry> 2580 2581 <varlistentry> 2582 <term> 2583 <computeroutput>--session-name <name or 2584 pattern></computeroutput> 2585 </term> 2586 2587 <listitem> 2588 <para> 2589 Specifies the guest session to be closed by name. 2590 Optional. Multiple sessions can be specified by using a 2591 pattern containing wildcards. 2592 </para> 2593 </listitem> 2594 </varlistentry> 2595 2596 <varlistentry> 2597 <term> 2598 <computeroutput>--all</computeroutput> 2599 </term> 2600 2601 <listitem> 2602 <para> 2603 Close all guest sessions. Optional. 2604 </para> 2605 </listitem> 2606 </varlistentry> 2607 2608 </variablelist> 2609 </listitem> 2610 2611 <listitem> 2612 <para> 2613 <computeroutput>updatega|updateadditions|updateguestadditions</computeroutput>: 2614 Ugrades Guest Additions already installed on the guest. Only 2615 available for already installed Guest Additions 4.0 and later. 2616 </para> 2617 2618 <screen>VBoxManage guestcontrol <uuid|vmname> updatega|updateadditions|updateguestadditions 2619 [common-options] 2620 [--source <New .ISO path>] 2621 [--wait-start] 2622 [-- <argument0> [<argument1> [...]]]</screen> 2623 2624 <para> 2625 Where the parameters are as follows: 2626 </para> 2627 2628 <variablelist> 2629 2630 <varlistentry> 2631 <term> 2632 <computeroutput><uuid|vmname></computeroutput> 2633 </term> 2634 2635 <listitem> 2636 <para> 2637 Specifies the VM UUID or VM name. Mandatory. 2638 </para> 2639 </listitem> 2640 </varlistentry> 2641 2642 <varlistentry> 2643 <term> 2644 <computeroutput>--source</computeroutput> <New .ISO 2645 path> 2646 </term> 2647 2648 <listitem> 2649 <para> 2650 Specifies the absolute path on the guest file system of 2651 the .ISO file for the Guest Additions update. Mandatory. 2652 </para> 2653 </listitem> 2654 </varlistentry> 2655 2656 <varlistentry> 2657 <term> 2658 <computeroutput>--wait-start</computeroutput> 2659 </term> 2660 2661 <listitem> 2662 <para> 2663 Indicates that <command>VBoxManage</command> starts the 2664 usual updating process on the guest and then waits until 2665 the actual Guest Additions updating begins, at which 2666 point <command>VBoxManage</command> self-terminates. 2667 Optional. 2668 </para> 2669 2670 <para> 2671 Default behavior is that <command>VBoxManage</command> 2672 waits for completion of the Guest Additions update 2673 before terminating. Use of this option is sometimes 2674 necessary, as a running <command>VBoxManage</command> 2675 can affect the interaction between the installer and the 2676 guest OS. 2677 </para> 2678 </listitem> 2679 </varlistentry> 2680 2681 <varlistentry> 2682 <term> 2683 <computeroutput>[-- <argument0> [<argument1> 2684 [...]]]</computeroutput> 2685 </term> 2686 2687 <listitem> 2688 <para> 2689 Specifies optional command line arguments to be supplied 2690 to the Guest Additions updater. Useful for retrofitting 2691 features which are not currently installed. 2692 </para> 2693 2694 <para> 2695 Arguments containing spaces should be enclosed by 2696 quotes. 2697 </para> 2698 </listitem> 2699 </varlistentry> 2700 2701 </variablelist> 2702 </listitem> 2703 2704 <listitem> 2705 <para> 2706 <computeroutput>watch</computeroutput>: Prints current guest 2707 control activity. 2708 </para> 2709 2710 <screen>VBoxManage guestcontrol <uuid|vmname> watch [common-options] 2711 </screen> 2712 2713 <para> 2714 Where the parameters are as follows: 2715 </para> 2716 2717 <variablelist> 2718 2719 <varlistentry> 2720 <term> 2721 <computeroutput><uuid|vmname></computeroutput> 2722 </term> 2723 2724 <listitem> 2725 <para> 2726 Specifies the VM UUID or VM name. Mandatory. 2727 </para> 2728 </listitem> 2729 </varlistentry> 2730 2731 </variablelist> 2732 </listitem> 2733 2734 </itemizedlist> 2735 2736 </sect1> 1115 <xi:include href="user_man_VBoxManage-guestcontrol.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 2737 1116 2738 1117 <xi:include href="user_man_VBoxManage-debugvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> -
trunk/doc/manual/ru_RU/man_VBoxManage-guestcontrol.xml
r93478 r94209 1325 1325 </screen> 1326 1326 <para> 1327 Опция <option>--exe</option задает абсолютный путь команды для1327 Опция <option>--exe</option> задает абсолютный путь команды для 1328 1328 запуска в гостевой ВМ, 1329 1329 <filename>c:\windows\system32\ipconfig.exe</filename>. Двойные -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r94208 r94209 235 235 #endif 236 236 #ifdef VBOX_WITH_GUEST_CONTROL 237 { "guestcontrol", USAGE_ GUESTCONTROL, VBMG_CMD_TODO, handleGuestControl, 0 },237 { "guestcontrol", USAGE_S_NEWCMD, HELP_CMD_GUESTCONTROL, handleGuestControl, 0 }, 238 238 #endif 239 239 { "metrics", USAGE_METRICS, VBMG_CMD_TODO, handleMetrics, 0 }, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r94208 r94209 115 115 USAGE_I_DUMPHDINFO, 116 116 USAGE_STORAGEATTACH, 117 #ifdef VBOX_WITH_GUEST_CONTROL118 USAGE_GUESTCONTROL,119 #endif /* VBOX_WITH_GUEST_CONTROL defined */120 117 USAGE_I_DEBUGLOG, 121 118 USAGE_I_SETHDPARENTUUID, … … 135 132 136 133 137 #ifdef VBOX_WITH_GUEST_CONTROL138 # define HELP_SCOPE_GSTCTRL_RUN RT_BIT(0)139 # define HELP_SCOPE_GSTCTRL_START RT_BIT(1)140 # define HELP_SCOPE_GSTCTRL_COPYFROM RT_BIT(2)141 # define HELP_SCOPE_GSTCTRL_COPYTO RT_BIT(3)142 # define HELP_SCOPE_GSTCTRL_MKDIR RT_BIT(4)143 # define HELP_SCOPE_GSTCTRL_RMDIR RT_BIT(5)144 # define HELP_SCOPE_GSTCTRL_RM RT_BIT(6)145 # define HELP_SCOPE_GSTCTRL_MV RT_BIT(7)146 # define HELP_SCOPE_GSTCTRL_MKTEMP RT_BIT(8)147 # define HELP_SCOPE_GSTCTRL_LIST RT_BIT(9)148 # define HELP_SCOPE_GSTCTRL_CLOSEPROCESS RT_BIT(10)149 # define HELP_SCOPE_GSTCTRL_CLOSESESSION RT_BIT(11)150 # define HELP_SCOPE_GSTCTRL_STAT RT_BIT(12)151 # define HELP_SCOPE_GSTCTRL_UPDATEGA RT_BIT(13)152 # define HELP_SCOPE_GSTCTRL_WATCH RT_BIT(14)153 # define HELP_SCOPE_GSTCTRL_WAITRUNLEVEL RT_BIT(15)154 #endif155 156 134 /** command handler argument */ 157 135 struct HandlerArg … … 251 229 /* VBoxManageDebugVM.cpp */ 252 230 RTEXITCODE handleDebugVM(HandlerArg *a); 253 254 /* VBoxManageGuestCtrl.cpp */255 extern void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope);256 231 257 232 #ifndef VBOX_ONLY_DOCS -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r93720 r94209 220 220 221 221 DECLARE_TRANSLATION_CONTEXT(GuestCtrl); 222 223 void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope)224 {225 const uint64_t fAnonSubCmds = HELP_SCOPE_GSTCTRL_CLOSESESSION226 | HELP_SCOPE_GSTCTRL_LIST227 | HELP_SCOPE_GSTCTRL_CLOSEPROCESS228 | HELP_SCOPE_GSTCTRL_CLOSESESSION229 | HELP_SCOPE_GSTCTRL_UPDATEGA230 | HELP_SCOPE_GSTCTRL_WATCH231 | HELP_SCOPE_GSTCTRL_WAITRUNLEVEL;232 233 /* 0 1 2 3 4 5 6 7 8XXXXXXXXXX */234 /* 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 */235 if (~fAnonSubCmds & fSubcommandScope)236 RTStrmPrintf(pStrm,237 "%s guestcontrol %s <uuid|vmname> [--verbose|-v] [--quiet|-q]\n"238 " [--user[name] <name>] [--domain <domain>]\n"239 " [--passwordfile <file> | --password <password>]\n%s",240 pcszSep1, pcszSep2, (fSubcommandScope & RTMSGREFENTRYSTR_SCOPE_MASK) == RTMSGREFENTRYSTR_SCOPE_GLOBAL ? "\n" : "");241 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RUN)242 RTStrmPrintf(pStrm,243 " run [common-options]\n"244 " [--exe <path to executable>] [--timeout <msec>]\n"245 " [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]\n"246 " [--ignore-operhaned-processes] [--profile]\n"247 " [--no-wait-stdout|--wait-stdout]\n"248 " [--no-wait-stderr|--wait-stderr]\n"249 " [--dos2unix] [--unix2dos]\n"250 " -- <program/arg0> [argument1] ... [argumentN]]\n"251 "\n");252 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_START)253 RTStrmPrintf(pStrm,254 " start [common-options]\n"255 " [--exe <path to executable>] [--timeout <msec>]\n"256 " [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]\n"257 " [--ignore-operhaned-processes] [--profile]\n"258 " -- <program/arg0> [argument1] ... [argumentN]]\n"259 "\n");260 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_COPYFROM)261 RTStrmPrintf(pStrm,262 " copyfrom [common-options]\n"263 " [-L|--dereference] [-R|--recursive]\n"264 " <guest-src0> [guest-src1 [...]] <host-dst>\n"265 "\n"266 " copyfrom [common-options]\n"267 " [-L|--dereference] [-R|--recursive]\n"268 " [-t|--target-directory <host-dst-dir>]\n"269 " <guest-src0> [guest-src1 [...]]\n"270 "\n");271 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_COPYTO)272 RTStrmPrintf(pStrm,273 " copyto [common-options]\n"274 " [-L|--dereference] [-R|--recursive]\n"275 " <host-src0> [host-src1 [...]] <guest-dst>\n"276 "\n"277 " copyto [common-options]\n"278 " [-L|--dereference] [-R|--recursive]\n"279 " [-t|--target-directory <guest-dst>]\n"280 " <host-src0> [host-src1 [...]]\n"281 "\n");282 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MKDIR)283 RTStrmPrintf(pStrm,284 " mkdir|createdir[ectory] [common-options]\n"285 " [--parents] [--mode <mode>]\n"286 " <guest directory> [...]\n"287 "\n");288 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RMDIR)289 RTStrmPrintf(pStrm,290 " rmdir|removedir[ectory] [common-options]\n"291 " [-R|--recursive]\n"292 " <guest directory> [...]\n"293 "\n");294 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RM)295 RTStrmPrintf(pStrm,296 " removefile|rm [common-options] [-f|--force]\n"297 " <guest file> [...]\n"298 "\n");299 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MV)300 RTStrmPrintf(pStrm,301 " mv|move|ren[ame] [common-options]\n"302 " <source> [source1 [...]] <dest>\n"303 "\n");304 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MKTEMP)305 RTStrmPrintf(pStrm,306 " mktemp|createtemp[orary] [common-options]\n"307 " [--secure] [--mode <mode>] [--tmpdir <directory>]\n"308 " <template>\n"309 "\n");310 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_STAT)311 RTStrmPrintf(pStrm,312 " stat [common-options]\n"313 " <file> [...]\n"314 "\n");315 316 /*317 * Command not requiring authentication.318 */319 if (fAnonSubCmds & fSubcommandScope)320 {321 /* 0 1 2 3 4 5 6 7 8XXXXXXXXXX */322 /* 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 */323 RTStrmPrintf(pStrm,324 "%s guestcontrol %s <uuid|vmname> [--verbose|-v] [--quiet|-q]\n%s",325 pcszSep1, pcszSep2, (fSubcommandScope & RTMSGREFENTRYSTR_SCOPE_MASK) == RTMSGREFENTRYSTR_SCOPE_GLOBAL ? "\n" : "");326 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_LIST)327 RTStrmPrintf(pStrm,328 " list <all|sessions|processes|files> [common-opts]\n"329 "\n");330 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_CLOSEPROCESS)331 RTStrmPrintf(pStrm,332 " closeprocess [common-options]\n"333 " < --session-id <ID>\n"334 " | --session-name <name or pattern>\n"335 " <PID1> [PID1 [...]]\n"336 "\n");337 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_CLOSESESSION)338 RTStrmPrintf(pStrm,339 " closesession [common-options]\n"340 " < --all | --session-id <ID>\n"341 " | --session-name <name or pattern> >\n"342 "\n");343 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_UPDATEGA)344 RTStrmPrintf(pStrm,345 " updatega|updateguestadditions|updateadditions\n"346 " [--source <guest additions .ISO>]\n"347 " [--wait-start] [common-options]\n"348 " [-- [<argument1>] ... [<argumentN>]]\n"349 "\n");350 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_WATCH)351 RTStrmPrintf(pStrm,352 " watch [--timeout <msec>] [common-options]\n"353 "\n");354 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_WAITRUNLEVEL)355 RTStrmPrintf(pStrm,356 " waitrunlevel [--timeout <msec>] [common-options]\n"357 " <system|userland|desktop>\n"358 "\n");359 }360 }361 222 362 223 #ifndef VBOX_ONLY_DOCS … … 992 853 } 993 854 else 994 rcExit = errorSyntax Ex(USAGE_GUESTCONTROL, pCtx->pCmdDef->fSubcommandScope,GuestCtrl::tr("No user name specified!"));855 rcExit = errorSyntax(GuestCtrl::tr("No user name specified!")); 995 856 996 857 pCtx->fPostOptionParsingInited = rcExit == RTEXITCODE_SUCCESS; … … 1280 1141 * @param argv The argument vector for this command. 1281 1142 * @param fRunCmd Set if it's 'run' clear if 'start'. 1282 * @param fHelp The help flag for the command.1283 1143 */ 1284 static RTEXITCODE gctlHandleRunCommon(PGCTLCMDCTX pCtx, int argc, char **argv, bool fRunCmd, uint32_t fHelp) 1285 { 1286 RT_NOREF(fHelp); 1144 static RTEXITCODE gctlHandleRunCommon(PGCTLCMDCTX pCtx, int argc, char **argv, bool fRunCmd) 1145 { 1287 1146 AssertPtrReturn(pCtx, RTEXITCODE_FAILURE); 1288 1147 … … 1359 1218 if ( ValueUnion.psz[0] == '\0' 1360 1219 || ValueUnion.psz[0] == '=') 1361 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN, 1362 GuestCtrl::tr("Invalid argument variable[=value]: '%s'"), ValueUnion.psz); 1220 return errorSyntax(GuestCtrl::tr("Invalid argument variable[=value]: '%s'"), ValueUnion.psz); 1363 1221 aEnv.push_back(Bstr(ValueUnion.psz).raw()); 1364 1222 break; … … 1429 1287 1430 1288 default: 1431 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN,ch, &ValueUnion);1289 return errorGetOpt(ch, &ValueUnion); 1432 1290 1433 1291 } /* switch */ … … 1436 1294 /* Must have something to execute. */ 1437 1295 if (!pszImage || !*pszImage) 1438 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN,GuestCtrl::tr("No executable specified!"));1296 return errorSyntax(GuestCtrl::tr("No executable specified!")); 1439 1297 1440 1298 /* … … 1714 1572 static DECLCALLBACK(RTEXITCODE) gctlHandleRun(PGCTLCMDCTX pCtx, int argc, char **argv) 1715 1573 { 1716 return gctlHandleRunCommon(pCtx, argc, argv, true /*fRunCmd*/ , HELP_SCOPE_GSTCTRL_RUN);1574 return gctlHandleRunCommon(pCtx, argc, argv, true /*fRunCmd*/); 1717 1575 } 1718 1576 … … 1720 1578 static DECLCALLBACK(RTEXITCODE) gctlHandleStart(PGCTLCMDCTX pCtx, int argc, char **argv) 1721 1579 { 1722 return gctlHandleRunCommon(pCtx, argc, argv, false /*fRunCmd*/ , HELP_SCOPE_GSTCTRL_START);1580 return gctlHandleRunCommon(pCtx, argc, argv, false /*fRunCmd*/); 1723 1581 } 1724 1582 … … 1751 1609 bool fFollow = false; 1752 1610 bool fRecursive = false; 1753 uint64_t uUsage = fHostToGuest ? HELP_SCOPE_GSTCTRL_COPYTO : HELP_SCOPE_GSTCTRL_COPYFROM;1754 1611 1755 1612 int vrc = VINF_SUCCESS; … … 1778 1635 1779 1636 default: 1780 return errorGetOpt Ex(USAGE_GUESTCONTROL, uUsage,ch, &ValueUnion);1637 return errorGetOpt(ch, &ValueUnion); 1781 1638 } 1782 1639 } … … 1786 1643 1787 1644 if (!cSources) 1788 return errorSyntax Ex(USAGE_GUESTCONTROL, uUsage,GuestCtrl::tr("No sources specified!"));1645 return errorSyntax(GuestCtrl::tr("No sources specified!")); 1789 1646 1790 1647 /* Unless a --target-directory is given, the last argument is the destination, so … … 1794 1651 1795 1652 if (pszDst == NULL) 1796 return errorSyntax Ex(USAGE_GUESTCONTROL, uUsage,GuestCtrl::tr("No destination specified!"));1653 return errorSyntax(GuestCtrl::tr("No destination specified!")); 1797 1654 1798 1655 char szAbsDst[RTPATH_MAX]; … … 2072 1929 2073 1930 default: 2074 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKDIR,ch, &ValueUnion);1931 return errorGetOpt(ch, &ValueUnion); 2075 1932 } 2076 1933 } 2077 1934 2078 1935 if (!cDirsCreated) 2079 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKDIR,GuestCtrl::tr("No directory to create specified!"));1936 return errorSyntax(GuestCtrl::tr("No directory to create specified!")); 2080 1937 return rcExit; 2081 1938 } … … 2200 2057 2201 2058 default: 2202 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RMDIR,ch, &ValueUnion);2059 return errorGetOpt(ch, &ValueUnion); 2203 2060 } 2204 2061 } 2205 2062 2206 2063 if (!cDirRemoved) 2207 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RMDIR,GuestCtrl::tr("No directory to remove specified!"));2064 return errorSyntax(GuestCtrl::tr("No directory to remove specified!")); 2208 2065 return rcExit; 2209 2066 } … … 2277 2134 2278 2135 default: 2279 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RM,ch, &ValueUnion);2136 return errorGetOpt(ch, &ValueUnion); 2280 2137 } 2281 2138 } 2282 2139 2283 2140 if (!cFilesDeleted && !fForce) 2284 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RM,GuestCtrl::tr("No file to remove specified!"));2141 return errorSyntax(GuestCtrl::tr("No file to remove specified!")); 2285 2142 return rcExit; 2286 2143 } … … 2330 2187 2331 2188 default: 2332 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV,ch, &ValueUnion);2189 return errorGetOpt(ch, &ValueUnion); 2333 2190 } 2334 2191 } … … 2344 2201 size_t cSources = vecSources.size(); 2345 2202 if (!cSources) 2346 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV, 2347 GuestCtrl::tr("No source(s) to move specified!")); 2203 return errorSyntax(GuestCtrl::tr("No source(s) to move specified!")); 2348 2204 if (cSources < 2) 2349 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV, 2350 GuestCtrl::tr("No destination specified!")); 2205 return errorSyntax(GuestCtrl::tr("No destination specified!")); 2351 2206 2352 2207 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 2502 2357 strTemplate = ValueUnion.psz; 2503 2358 else 2504 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP, 2505 GuestCtrl::tr("More than one template specified!\n")); 2359 return errorSyntax(GuestCtrl::tr("More than one template specified!\n")); 2506 2360 break; 2507 2361 2508 2362 default: 2509 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP,ch, &ValueUnion);2363 return errorGetOpt(ch, &ValueUnion); 2510 2364 } 2511 2365 } 2512 2366 2513 2367 if (strTemplate.isEmpty()) 2514 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP, 2515 GuestCtrl::tr("No template specified!")); 2368 return errorSyntax(GuestCtrl::tr("No template specified!")); 2516 2369 2517 2370 if (!fDirectory) 2518 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP, 2519 GuestCtrl::tr("Creating temporary files is currently not supported!")); 2371 return errorSyntax(GuestCtrl::tr("Creating temporary files is currently not supported!")); 2520 2372 2521 2373 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 2594 2446 case 'c': /* Format */ 2595 2447 case 't': /* Terse */ 2596 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT, 2597 GuestCtrl::tr("Command \"%s\" not implemented yet!"), ValueUnion.psz); 2448 return errorSyntax(GuestCtrl::tr("Command \"%s\" not implemented yet!"), ValueUnion.psz); 2598 2449 2599 2450 default: 2600 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT,ch, &ValueUnion);2451 return errorGetOpt(ch, &ValueUnion); 2601 2452 } 2602 2453 } 2603 2454 2604 2455 if (ch != VINF_GETOPT_NOT_OPTION) 2605 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT,GuestCtrl::tr("Nothing to stat!"));2456 return errorSyntax(GuestCtrl::tr("Nothing to stat!")); 2606 2457 2607 2458 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 2891 2742 2892 2743 default: 2893 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_UPDATEGA,ch, &ValueUnion);2744 return errorGetOpt(ch, &ValueUnion); 2894 2745 } 2895 2746 } … … 3156 3007 enmRunLevel = gctlGetRunLevelFromStr(ValueUnion.psz); 3157 3008 if (enmRunLevel == AdditionsRunLevelType_None) 3158 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WAITRUNLEVEL, 3159 GuestCtrl::tr("Invalid run level specified. Valid values are: system, userland, desktop")); 3009 return errorSyntax(GuestCtrl::tr("Invalid run level specified. Valid values are: system, userland, desktop")); 3160 3010 break; 3161 3011 } 3162 3012 3163 3013 default: 3164 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WAITRUNLEVEL,ch, &ValueUnion);3014 return errorGetOpt(ch, &ValueUnion); 3165 3015 } 3166 3016 } … … 3171 3021 3172 3022 if (enmRunLevel == AdditionsRunLevelType_None) 3173 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WAITRUNLEVEL,GuestCtrl::tr("Missing run level to wait for"));3023 return errorSyntax(GuestCtrl::tr("Missing run level to wait for")); 3174 3024 3175 3025 vrc = gctlWaitForRunLevel(pCtx, enmRunLevel, cMsTimeout); … … 3218 3068 fListAll = true; 3219 3069 else 3220 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_LIST, 3221 GuestCtrl::tr("Unknown list: '%s'"), ValueUnion.psz); 3070 return errorSyntax(GuestCtrl::tr("Unknown list: '%s'"), ValueUnion.psz); 3222 3071 fSeenListArg = true; 3223 3072 break; 3224 3073 3225 3074 default: 3226 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_UPDATEGA,ch, &ValueUnion);3075 return errorGetOpt(ch, &ValueUnion); 3227 3076 } 3228 3077 } 3229 3078 3230 3079 if (!fSeenListArg) 3231 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_LIST,GuestCtrl::tr("Missing list name"));3080 return errorSyntax(GuestCtrl::tr("Missing list name")); 3232 3081 Assert(fListAll || fListSessions); 3233 3082 … … 3404 3253 } 3405 3254 else 3406 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3407 GuestCtrl::tr("Invalid PID value: 0")); 3255 return errorSyntax(GuestCtrl::tr("Invalid PID value: 0")); 3408 3256 } 3409 3257 else 3410 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3411 GuestCtrl::tr("Error parsing PID value: %Rrc"), rc); 3258 return errorSyntax(GuestCtrl::tr("Error parsing PID value: %Rrc"), rc); 3412 3259 break; 3413 3260 } 3414 3261 3415 3262 default: 3416 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS,ch, &ValueUnion);3263 return errorGetOpt(ch, &ValueUnion); 3417 3264 } 3418 3265 } 3419 3266 3420 3267 if (vecPID.empty()) 3421 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3422 GuestCtrl::tr("At least one PID must be specified to kill!")); 3268 return errorSyntax(GuestCtrl::tr("At least one PID must be specified to kill!")); 3423 3269 3424 3270 if ( strSessionName.isEmpty() 3425 3271 && idSession == UINT32_MAX) 3426 return errorSyntax Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS,GuestCtrl::tr("No session ID specified!"));3272 return errorSyntax(GuestCtrl::tr("No session ID specified!")); 3427 3273 3428 3274 if ( strSessionName.isNotEmpty() 3429 3275 && idSession != UINT32_MAX) 3430 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3431 GuestCtrl::tr("Either session ID or name (pattern) must be specified")); 3276 return errorSyntax(GuestCtrl::tr("Either session ID or name (pattern) must be specified")); 3432 3277 3433 3278 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 3573 3418 * break; */ 3574 3419 default: 3575 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION,ch, &ValueUnion);3420 return errorGetOpt(ch, &ValueUnion); 3576 3421 } 3577 3422 } … … 3579 3424 if ( strSessionName.isEmpty() 3580 3425 && idSession == UINT32_MAX) 3581 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION, 3582 GuestCtrl::tr("No session ID specified!")); 3426 return errorSyntax(GuestCtrl::tr("No session ID specified!")); 3583 3427 3584 3428 if ( !strSessionName.isEmpty() 3585 3429 && idSession != UINT32_MAX) 3586 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION, 3587 GuestCtrl::tr("Either session ID or name (pattern) must be specified")); 3430 return errorSyntax(GuestCtrl::tr("Either session ID or name (pattern) must be specified")); 3588 3431 3589 3432 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 3678 3521 case VINF_GETOPT_NOT_OPTION: 3679 3522 default: 3680 return errorGetOpt Ex(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WATCH,ch, &ValueUnion);3523 return errorGetOpt(ch, &ValueUnion); 3681 3524 } 3682 3525 } … … 3773 3616 static const GCTLCMDDEF s_aCmdDefs[] = 3774 3617 { 3775 { "run", gctlHandleRun, HELP_SCOPE_G STCTRL_RUN, 0 },3776 { "start", gctlHandleStart, HELP_SCOPE_G STCTRL_START, 0 },3777 { "copyfrom", gctlHandleCopyFrom, HELP_SCOPE_G STCTRL_COPYFROM, 0 },3778 { "copyto", gctlHandleCopyTo, HELP_SCOPE_G STCTRL_COPYTO, 0 },3779 3780 { "mkdir", gctrlHandleMkDir, HELP_SCOPE_G STCTRL_MKDIR, 0 },3781 { "md", gctrlHandleMkDir, HELP_SCOPE_G STCTRL_MKDIR, 0 },3782 { "createdirectory", gctrlHandleMkDir, HELP_SCOPE_G STCTRL_MKDIR, 0 },3783 { "createdir", gctrlHandleMkDir, HELP_SCOPE_G STCTRL_MKDIR, 0 },3784 3785 { "rmdir", gctlHandleRmDir, HELP_SCOPE_G STCTRL_RMDIR, 0 },3786 { "removedir", gctlHandleRmDir, HELP_SCOPE_G STCTRL_RMDIR, 0 },3787 { "removedirectory", gctlHandleRmDir, HELP_SCOPE_G STCTRL_RMDIR, 0 },3788 3789 { "rm", gctlHandleRm, HELP_SCOPE_G STCTRL_RM, 0 },3790 { "removefile", gctlHandleRm, HELP_SCOPE_G STCTRL_RM, 0 },3791 { "erase", gctlHandleRm, HELP_SCOPE_G STCTRL_RM, 0 },3792 { "del", gctlHandleRm, HELP_SCOPE_G STCTRL_RM, 0 },3793 { "delete", gctlHandleRm, HELP_SCOPE_G STCTRL_RM, 0 },3794 3795 { "mv", gctlHandleMv, HELP_SCOPE_G STCTRL_MV, 0 },3796 { "move", gctlHandleMv, HELP_SCOPE_G STCTRL_MV, 0 },3797 { "ren", gctlHandleMv, HELP_SCOPE_G STCTRL_MV, 0 },3798 { "rename", gctlHandleMv, HELP_SCOPE_G STCTRL_MV, 0 },3799 3800 { "mktemp", gctlHandleMkTemp, HELP_SCOPE_G STCTRL_MKTEMP, 0 },3801 { "createtemp", gctlHandleMkTemp, HELP_SCOPE_G STCTRL_MKTEMP, 0 },3802 { "createtemporary", gctlHandleMkTemp, HELP_SCOPE_G STCTRL_MKTEMP, 0 },3803 3804 { "stat", gctlHandleStat, HELP_SCOPE_G STCTRL_STAT, 0 },3805 3806 { "closeprocess", gctlHandleCloseProcess, HELP_SCOPE_G STCTRL_CLOSEPROCESS, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER },3807 { "closesession", gctlHandleCloseSession, HELP_SCOPE_G STCTRL_CLOSESESSION, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER },3808 { "list", gctlHandleList, HELP_SCOPE_G STCTRL_LIST, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER },3809 { "watch", gctlHandleWatch, HELP_SCOPE_G STCTRL_WATCH, GCTLCMDCTX_F_SESSION_ANONYMOUS },3810 3811 {"updateguestadditions",gctlHandleUpdateAdditions, HELP_SCOPE_G STCTRL_UPDATEGA, GCTLCMDCTX_F_SESSION_ANONYMOUS },3812 { "updateadditions", gctlHandleUpdateAdditions, HELP_SCOPE_G STCTRL_UPDATEGA, GCTLCMDCTX_F_SESSION_ANONYMOUS },3813 { "updatega", gctlHandleUpdateAdditions, HELP_SCOPE_G STCTRL_UPDATEGA, GCTLCMDCTX_F_SESSION_ANONYMOUS },3814 3815 { "waitrunlevel", gctlHandleWaitRunLevel, HELP_SCOPE_G STCTRL_WAITRUNLEVEL, GCTLCMDCTX_F_SESSION_ANONYMOUS },3816 { "waitforrunlevel", gctlHandleWaitRunLevel, HELP_SCOPE_G STCTRL_WAITRUNLEVEL, GCTLCMDCTX_F_SESSION_ANONYMOUS },3618 { "run", gctlHandleRun, HELP_SCOPE_GUESTCONTROL_RUN, 0 }, 3619 { "start", gctlHandleStart, HELP_SCOPE_GUESTCONTROL_START, 0 }, 3620 { "copyfrom", gctlHandleCopyFrom, HELP_SCOPE_GUESTCONTROL_COPYFROM_HOSTDEST, 0 }, 3621 { "copyto", gctlHandleCopyTo, HELP_SCOPE_GUESTCONTROL_COPYTO_HOSTDEST, 0 }, 3622 3623 { "mkdir", gctrlHandleMkDir, HELP_SCOPE_GUESTCONTROL_MKDIR, 0 }, 3624 { "md", gctrlHandleMkDir, HELP_SCOPE_GUESTCONTROL_MKDIR, 0 }, 3625 { "createdirectory", gctrlHandleMkDir, HELP_SCOPE_GUESTCONTROL_MKDIR, 0 }, 3626 { "createdir", gctrlHandleMkDir, HELP_SCOPE_GUESTCONTROL_MKDIR, 0 }, 3627 3628 { "rmdir", gctlHandleRmDir, HELP_SCOPE_GUESTCONTROL_RMDIR, 0 }, 3629 { "removedir", gctlHandleRmDir, HELP_SCOPE_GUESTCONTROL_RMDIR, 0 }, 3630 { "removedirectory", gctlHandleRmDir, HELP_SCOPE_GUESTCONTROL_RMDIR, 0 }, 3631 3632 { "rm", gctlHandleRm, HELP_SCOPE_GUESTCONTROL_RM, 0 }, 3633 { "removefile", gctlHandleRm, HELP_SCOPE_GUESTCONTROL_RM, 0 }, 3634 { "erase", gctlHandleRm, HELP_SCOPE_GUESTCONTROL_RM, 0 }, 3635 { "del", gctlHandleRm, HELP_SCOPE_GUESTCONTROL_RM, 0 }, 3636 { "delete", gctlHandleRm, HELP_SCOPE_GUESTCONTROL_RM, 0 }, 3637 3638 { "mv", gctlHandleMv, HELP_SCOPE_GUESTCONTROL_MV, 0 }, 3639 { "move", gctlHandleMv, HELP_SCOPE_GUESTCONTROL_MV, 0 }, 3640 { "ren", gctlHandleMv, HELP_SCOPE_GUESTCONTROL_MV, 0 }, 3641 { "rename", gctlHandleMv, HELP_SCOPE_GUESTCONTROL_MV, 0 }, 3642 3643 { "mktemp", gctlHandleMkTemp, HELP_SCOPE_GUESTCONTROL_MKTEMP, 0 }, 3644 { "createtemp", gctlHandleMkTemp, HELP_SCOPE_GUESTCONTROL_MKTEMP, 0 }, 3645 { "createtemporary", gctlHandleMkTemp, HELP_SCOPE_GUESTCONTROL_MKTEMP, 0 }, 3646 3647 { "stat", gctlHandleStat, HELP_SCOPE_GUESTCONTROL_STAT, 0 }, 3648 3649 { "closeprocess", gctlHandleCloseProcess, HELP_SCOPE_GUESTCONTROL_CLOSEPROCESS, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER }, 3650 { "closesession", gctlHandleCloseSession, HELP_SCOPE_GUESTCONTROL_CLOSESESSION, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER }, 3651 { "list", gctlHandleList, HELP_SCOPE_GUESTCONTROL_LIST, GCTLCMDCTX_F_SESSION_ANONYMOUS | GCTLCMDCTX_F_NO_SIGNAL_HANDLER }, 3652 { "watch", gctlHandleWatch, HELP_SCOPE_GUESTCONTROL_WATCH, GCTLCMDCTX_F_SESSION_ANONYMOUS }, 3653 3654 {"updateguestadditions",gctlHandleUpdateAdditions, HELP_SCOPE_GUESTCONTROL_UPDATEGA, GCTLCMDCTX_F_SESSION_ANONYMOUS }, 3655 { "updateadditions", gctlHandleUpdateAdditions, HELP_SCOPE_GUESTCONTROL_UPDATEGA, GCTLCMDCTX_F_SESSION_ANONYMOUS }, 3656 { "updatega", gctlHandleUpdateAdditions, HELP_SCOPE_GUESTCONTROL_UPDATEGA, GCTLCMDCTX_F_SESSION_ANONYMOUS }, 3657 3658 { "waitrunlevel", gctlHandleWaitRunLevel, HELP_SCOPE_GUESTCONTROL_WAITRUNLEVEL, GCTLCMDCTX_F_SESSION_ANONYMOUS }, 3659 { "waitforrunlevel", gctlHandleWaitRunLevel, HELP_SCOPE_GUESTCONTROL_WAITRUNLEVEL, GCTLCMDCTX_F_SESSION_ANONYMOUS }, 3817 3660 }; 3818 3661 … … 3861 3704 CmdCtx.pCmdDef = &s_aCmdDefs[iCmd]; 3862 3705 3706 setCurrentSubcommand(s_aCmdDefs[iCmd].fSubcommandScope); 3863 3707 rcExit = s_aCmdDefs[iCmd].pfnHandler(&CmdCtx, pArg->argc - GetState.iNext + 1, 3864 3708 &pArg->argv[GetState.iNext - 1]); … … 3867 3711 return rcExit; 3868 3712 } 3869 return errorSyntax( USAGE_GUESTCONTROL,GuestCtrl::tr("Unknown sub-command: '%s'"), pszCmd);3713 return errorSyntax(GuestCtrl::tr("Unknown sub-command: '%s'"), pszCmd); 3870 3714 } 3871 3715 break; 3872 3716 3873 3717 default: 3874 return errorGetOpt( USAGE_GUESTCONTROL,ch, &ValueUnion);3718 return errorGetOpt(ch, &ValueUnion); 3875 3719 } 3876 3720 } 3877 3721 if (CmdCtx.pszVmNameOrUuid) 3878 rcExit = errorSyntax( USAGE_GUESTCONTROL,GuestCtrl::tr("Missing sub-command"));3722 rcExit = errorSyntax(GuestCtrl::tr("Missing sub-command")); 3879 3723 else 3880 rcExit = errorSyntax( USAGE_GUESTCONTROL,GuestCtrl::tr("Missing VM name and sub-command"));3724 rcExit = errorSyntax(GuestCtrl::tr("Missing VM name and sub-command")); 3881 3725 } 3882 3726 return rcExit; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r94208 r94209 639 639 "\n", SEP); 640 640 641 #ifdef VBOX_WITH_GUEST_CONTROL642 if (enmCommand == USAGE_GUESTCONTROL || enmCommand == USAGE_S_ALL)643 usageGuestControl(pStrm, SEP, fSubcommandScope);644 #endif /* VBOX_WITH_GUEST_CONTROL defined */645 646 641 if (enmCommand == USAGE_METRICS || enmCommand == USAGE_S_ALL) 647 642 RTStrmPrintf(pStrm,
Note:
See TracChangeset
for help on using the changeset viewer.