VirtualBox

Opened 16 years ago

Last modified 14 years ago

#893 new enhancement

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

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

Description

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

-or-

# 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]

-or-

# 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]

-or-

# 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...

and

# 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

VPSID NPROC STATUS IP_ADDR HOSTNAME

101 8 running 10.101.66.1 vps101.my.org

102 7 running 10.101.66.159 vps102.my.org

103 - stopped 10.101.66.103 vps103.my.org

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: http://openvz.org/documentation/guides/

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 (10)

comment:1 by Technologov, 16 years ago

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.

-Technologov

comment:2 by markba, 16 years ago

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: http://www.virtualbox.org/ticket/1019

comment:3 by Technologov, 15 years ago

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

-Technologov

comment:4 by Technologov, 15 years ago

Can you take another look at it please ?

-Technologov

comment:5 by Rance Hall, 14 years ago

+1 vote for the ability to exec commands on guests

comment:6 by Technologov, 14 years ago

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

-Technologov

comment:7 by Giovanni Toraldo (gionn), 14 years ago

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

comment:8 by Technologov, 14 years ago

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

-Technologov

comment:9 by Frank Mehnert, 14 years ago

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

comment:10 by Technologov, 14 years ago

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"

-Technologov

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use