0

I have a server that I want to run virtual machines on

I want to use virtualbox but I want to start and stop them using only ssh as the server is headless.

The question:
How to start and stop virtualbox machines, only from CLI via ssh? And what are the command or where to get info on commands?

Sorry for the dumb question.

6
  • 1
    If you are set up (via SSH) to run things on your server, then you can run VBOX and start the machines.
    – anon
    Commented Aug 14, 2021 at 1:09
  • 2
    What is the question?
    – Gantendo
    Commented Aug 14, 2021 at 1:16
  • How to start and stop virtualbox machines, only from CLI via ssh...sorry
    – vstubbs
    Commented Aug 14, 2021 at 2:44
  • Googling for "virtualbox commandline" has e.g. this as second hit. RTFM?
    – dirkt
    Commented Aug 14, 2021 at 4:25
  • Use use VBoxManage startvm to start from command line. Your question really has nothing to to do with SSH or other machines
    – anon
    Commented Aug 14, 2021 at 11:02

1 Answer 1

0

You can start a VBOX virtual machine by Command Line using the command line structure: vboxmanage

VBOX command line

To list all the registered VMs, simply run vboxmanage list vms. Note that if you are using Vagrant with VirtualBox, this command will also show VirtualBox VMs that have been instantiated by Vagrant. Similarly, if you are using Docker Machine with VirtualBox, this command will show you VMs created by Docker Machine

.

To list all the running VMs, use vboxmanage list runningvms

.

To start a VM, run vboxmanage startvm . You can optionally specify a --type parameter to control how the VM is started. Using --type gui will show it via the host GUI; using --type headless means you’ll need to interact over the network (typically via SSH). To emulate Vagrant/Docker Machine-like behavior, you’d use --type headless.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .