Ticket #893 (new enhancement)

Opened 11 years ago

Last modified 8 years ago

[feature-request] Revolutionary CLI for mass-management of Virtual Linux Servers

Reported by: Technologov Owned by:
Priority: major Component: other
Version: VirtualBox 1.5.2 Keywords:
Cc: Guest type: other
Host type: other


OpenVZ (containerization) includes very interesting concepts of mass-management of servers via CLI.

I would like similar concepts to be included into VirtualBox.

Imagine You can do: (explained & translated to VirtualBox commands set).

(from host)

Executing guest commands right from the host:

# VBoxManage exec [REDHAT-VM] service sshd status


# VBoxManage exec 101 service sshd status

sshd is stopped

Another example of sending command from host to guest:

# VBoxManage exec [REDHAT-VM] rpm -ivh [mypackage.rpm]


# VBoxManage exec 101 rpm -ivh [mypackage.rpm]

installing RPM package...


This command will give you immediate TTY line login, just like SSH, even if guest has no networking and no video card:

# VBoxManage enter vm [REDHAT-VM]


# VBoxManage enter vm 101

doing "exit" will exit to host.

OpenVZ, in addition to names such as [REDHAT-VM], has sequential numbers, like 100, 101, ...

Unlike VirtualBox random UUIDs, this concept theoretically gives ability for doing interesting things, such as mass-management via groups of sequentially numbered VMs:

# VBoxManage exec 101-104 rpm -ivh [mypackage.rpm]

[101] installing RPM package...

[102] installing RPM package...

[103] package already exists.

[104] installing RPM package...


# VBoxManage exec 101-104 service sshd status

[101] sshd is stopped

[102] sshd (pid 16036) is running...

[103] sshd is stopped

[104] sshd is stopped

This is just a concept. Even OpenVZ doesn't implement it fully. Not to mention that OpenVZ is unable to run on Windows hosts.

OpenVZ listing features are more powerful than VirtualBox, due to it's containerization nature. It looks like:

# VBoxManage list


101 8 running

102 7 running

103 - stopped

Isn't that powerful ? - to be able to see hostname, IP address, whatever... right from Host.

Implementing this in VirtualBox will require writing new Linux guest addition module, that enables to access directly to Linux guest TTY, without going through any standard channels (display or network). Also, to implement this, VirtualBox will need sequintial VM numbers, in addition to currently existing VM names and UUIDs.

For additional information about this powerful concept of CLI mass-management read here:

P.S: I know that some people think that VirtualBox is more Desktop-oriented, and while I agree, I believe that this feature requires relatively small developer's effort, and can seriously improve VirtualBox's positions in the server space. (especially when VirtualBox will support 64-bit guests)

While original idea is not my, I have an idea of how-to extend this concept further !

This will also improve headless capabilities of VirtualBox.

What do you think of it? :)

-Technologov. 14.11.2007.

Change History

comment:1 Changed 11 years ago by Technologov

Host-side Scripting Benefits:

Ohh, and I forgot: Host scripting could revolutionize the whole way Virtual Servers management.

Only image an admin, that can run a script on a Linux host, that will automatically update all Linux guests with 1 command... The scripts don't need to be complex anymore, don't need to use "expect" and tricky loops to enter via SSH into VMs one-by-one. Additionally pipelines and redirects could be used from either host or guest with zero difficulty.

Running scripts on the host makes it damn easy to administer a whole fleet of Linux guests, even for a newbie admin.


comment:2 Changed 10 years ago by markba

I'm in the proces of investigating if vb can displace VMware Server by using vb in headless (vrdp) mode. Currently there are a number of items that are not on par with VMware Server:

  • gui-console is not of any use in the headless situation (workaround: cli)
  • session output generally but especially during booting is not viewable
  • ip-adresses can only be viewed on a host with a graphical display

For obtaining ip-adresses, your suggestion is perfect, can't wait for it to come available!

For the other to, I filed a feature request for using virt-manager:

comment:3 Changed 9 years ago by Technologov

This one is an old request. Can you please take a second look at it ?


comment:4 Changed 9 years ago by Technologov

Can you take another look at it please ?


comment:5 Changed 9 years ago by rance_hall

+1 vote for the ability to exec commands on guests

comment:6 Changed 8 years ago by Technologov

This wish is still relevant for VBox 3.1.x. Maybe it can be done vie virtio-tty (virtio-console).


comment:7 Changed 8 years ago by gionn

+1 vote for the ability to exec cli commands on guests from host

comment:8 Changed 8 years ago by Technologov

This wish should be extended to Windows guests too...


comment:9 Changed 8 years ago by frank

The upcoming 3.2 release will be able to execute guest commands from the host.

comment:10 Changed 8 years ago by Technologov

Hmmm... yes. Great Work ! This wish is partially implemented in v3.2.0

It still lacks getting a full TTY, however, like this:

# VBoxManage enter "RHEL 5"


Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use