OpenVZ allows you to run commands inside a container from the host machine using the `vzctl exec` command. Here are the steps:
1. Log into your OpenVZ host server via SSH.
1. Run the `vzlist -a` command to see a list of all your containers and their CTIDs.
Output: ``` CTID Status IP Address Hostname 101 running 192.168.1.101 ct101.example.com 102 stopped 192.168.1.102 ct102.example.com ```1. Identify the CTID of the container which you want to run commands in. Suppose that the CTID is 101.
1. Use the `vzctl exec` command followed by the CTID and the command you want to run. For example, if you want to run the `ls` command, use the following command:
\`\`\` vzctl exec 101 ls \`\`\`Using this method you can run almost any command inside an OpenVZ container from the host machine. Remember that you need root privileges to run the `vzctl exec` command.