Previous page

Next page

Locate page in Contents

Print this page

Running Commands in Virtual Machines and Containers

Virtuozzo 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 or Container. For example, this can be useful in these cases:

  • If you do not know the virtual machine or 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 or Container.

In both these cases, you can use the prlctl exec command to run a command inside the respective virtual machine or 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:

# prlctl exec My_Linux /etc/init.d/sshd status

sshd is stopped

# prlctl exec My_Linux /etc/init.d/sshd start

Starting sshd:[OK]

# prlctl exec My_Linux /etc/init.d/sshd status

sshd (pid 26187) is running...

Notes:

1. You can use the prlctl exec command only inside virtual machines that have guest tools installed.

2. The prlctl exec command is executed inside a virtual machine or Container from the / directory rather than from the /root one.