Previous page

Next page

Locate page in Contents

Running Commands in a Virtual Machine

Parallels Server for Mac Bare Metal Edition allows you to execute arbitrary commands inside virtual machines by running them on the physical server, i.e. without the need to log in to the respective virtual machine. For example, this can be useful in these cases:

  • If you do not know the virtual machine login information, but need to run some diagnosis commands to verify that it is operational.
  • If network access is absent for a virtual machine.

In both these cases, you can use the pctl exec command to run a command inside the respective virtual machine. 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 from the / directory rather than from the /root one.