How to start the Virtualbox VMs under terminal

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox myvm

Since we have servral machine on my testbed (fedora), and if I need start some VMs on that, I have to go to the server and using the VirtualBox GUI to start it. now I am bored of this, I want to start the VMs and connect with termial using my laptop. so I want to show how you start your VMs without using the specified Al Virtualbox has powerful command line tools, and most of time we'll use this "VBoxManage ", this tool will help you start and shutdown the virtual machines, or just let you configure the network and check the status of the machine, and etc. it has same options to make you life better. you can get more info just by typing "VBoxMange ". the simple way of start/shutdown of the VMs is just "VBoxManage startvm <vm_name> or <uuid>" (U can use VBoxMange list vms to get the info)

[majian@localhost ~]$ VBoxManage list vms"blackbox" {41a1c221-49cd-4605-b0fd-e7fdd1aceb36}[majian@localhost ~]$ VBoxManage startvm 41a1c221-49cd-4605-b0fd-e7fdd1aceb36Waiting for VM "41a1c221-49cd-4605-b0fd-e7fdd1aceb36" to power on...VBoxManage: error: The virtual machine 'blackbox' has terminated unexpectedly during startup with exit code 1VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Machine, interface IMachine

Well, we got one problem here, that's because we are using the ssh terminal without GUI, we need to use the Headless mode to do that, you have two option for that:

VBoxManage startvm "myvm" --type headless   // VBoxMange with headless mode orVBoxHeadless  -s “myvm”                     // use the direct command VBoxHeadless

And here's the sample output of that when I use the method 2, but please note that if you use VBoxHeadless, this terminal need to stay open when you use your VM or you need to run this command in the backgroud.

[majian@localhost ~]$ VBoxHeadless  -s "blackbox"Oracle VM VirtualBox Headless Interface 4.3.10_RPMFusion(C) 2008-2014 Oracle CorporationAll rights reserved.

-EOF

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.