User`s guide

39
Running Commands in a Virtual
Machine and Container
Parallels Server Bare Metal allows you to execute arbitrary commands inside virtual machines
and Containers by running them on the physical server, i.e. without the need to log in to the
respective virtual machine and Container. For example, this can be useful in these cases:
If you do not know the virtual machine and Container login information, but need to run
some diagnosis commands to verify that it is operational.
If network access is absent for a virtual machine and Container.
In both these cases, you can use the pctl exec command to run a command inside the
respective virtual machine and Container. The session below illustrates the situation when you
run the stopped SSH daemon inside a Linux virtual machine with the name of My_Linux:
# pctl exec My_Linux /etc/init.d/sshd status
sshd is stopped
# pctl exec My_Linux /etc/init.d/sshd start
Starting sshd:[OK]
# pctl exec My_Linux /etc/init.d/sshd status
sshd (pid 26187) is running...
Notes:
1. You can use the pctl exec command only inside virtual machines that have Parallels
Tools installed.
2. The pctl exec command is executed inside a virtual machine and Container from the /
directory rather than from the /root one.