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 Virtal   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 many 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-e7fdd1aceb36
Waiting for VM "41a1c221-49cd-4605-b0fd-e7fdd1aceb36" to power on...
VBoxManage: error: The virtual machine 'blackbox' has terminated unexpectedly during startup with exit code 1
VBoxManage: 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 or

VBoxHeadless  -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 Corporation
All rights reserved.

-EOF

How to start the Virtualbox VMs under terminal的更多相关文章

  1. How to create and start VirtualBox VM without GUI

    Suppose you want to create and run virtual machines (VMs) on VirtualBox. However, a host machine doe ...

  2. Mac OS 使用 Vagrant 管理虚拟机(VirtualBox)

    Vagrant(官网.github)是一款构建虚拟开发环境的工具,支持 Window,Linux,Mac OS,Vagrant 中的 Boxes 概念类似于 Docker(实质是不同的),你可以把它看 ...

  3. 快速打造跨平台开发环境 vagrant + virtualbox + box

    工欲善其事必先利其器,开发环境 和 开发工具 就是 我们开发人员的剑,所以我们需要一个快并且好用的剑 刚开始做开发的时候的都是把开发环境 配置在 自己的电脑上,随着后面我们接触的东西越来越多,慢慢的电 ...

  4. [linux]如何为Virtualbox虚拟硬盘扩容(转载)

    前言 这个教程介绍如何为Virtualbox虚拟硬盘扩容,虚拟硬盘分为动态分配大小和固定虚拟硬盘,扩容的方法不一样: 如何为动态分配的Virtualbox虚拟硬盘扩容 如何为固定大小的Virtualb ...

  5. Virtualbox虚机无法启动因断电

      The virtual machine 'nn1' has terminated unexpectedly during startup with exit code 1 (0x1). More ...

  6. 【总结】虚拟机VirtualBox各种使用技巧

    作为个人学习研究,VirtualBox是首选,它是Oracle下免费的.开源.跨平台的一款虚拟机软件,小巧.实用,一点也不逊于商业版的VMware Workstation. VirtualBox官网: ...

  7. 初识genymotion安装遇上的VirtualBox问题

    想必做过Android开发的都讨厌那慢如蜗牛的 eclipse原生Android模拟器吧! 光是启动这个模拟器都得花上两三分钟,慢慢的用起来手机来调试,但那毕竟不是长久之计,也确实不方便,后来知道了g ...

  8. 增加VirtualBox虚拟机的磁盘空间大小(Host:Win7 VirtualBox5.0.16 VM:Win10)

    1 前言 网上关于增加VirtualBox虚拟机的磁盘空间大小的文章非常非常多,这里我之所以再写一篇,是因为在参照这些文章做的时候,由于VirtualBox的版本更新以及其他一些环境问题,碰到到一些问 ...

  9. Virtualbox中不能为虚拟机打开一个新任务的原因及解决方法

    VirtualBox新建虚拟机时报错,不能为虚拟机打开一个新任务的原因 解决办法如下 1.保证bios里的virtualization technology的选项开启,不同电脑BIOS设置可能会不一样 ...

随机推荐

  1. 用命令行批处理bat,设置代理服务器、DNS、网关、WINS等

    http://hi.baidu.com/83050158/blog/item/50cbd63f9da79ccb7d1e711b.html 将下面代码复制到记事本,另存为NetSet.bat,修改相应i ...

  2. 实现单实例多线程安全API问题

    前阵子写静态lib导出单实例多线程安全API时,出现了CRITICAL_SECTION初始化太晚的问题,之后查看了错误的资料,引导向了错误的理解,以至于今天凌晨看到另一份代码,也不多想的以为singl ...

  3. 像素转换mm

    public static double MillimetersToPixelsWidth(double length) //length是毫米,1厘米=10毫米 { System.Windows.F ...

  4. ng-class的使用

    例如: td(ng-class="{0:'text-warning',1:'text-primary'}[bj.flag]") {{bj.flag | bjFlagfilter}} ...

  5. Visual Studio 2015 Owin+MVC+WebAPI+ODataV4+EntityFrawork+Identity+Oauth2.0+AngularJS 1.x 学习笔记之"坑"

    1.AngularJS route 与 MVC route http://www.cnblogs.com/usea/p/4211989.html public class SingleRoute : ...

  6. RAILS局部视图操作样例

    按如下书操作的,讲得很易懂.. <html> <head> <title>SampleApp</title> <%= stylesheet_lin ...

  7. Activity的四种状态

    Running状态:一个新的Activity启动入栈后,它在屏幕最前端,处于栈的最顶端,此时它处于可见并可和用户交互的激活状态.Paused状态:当Activity被另一个透明或者Dialog样式的A ...

  8. PullToRefreshListView 内嵌checkbox 数据丢失问题

    在PullToRefreshListView 内部内嵌了Checkbox如下图所示: 原本设计思路是:对CheckBox 进行 setOnCheckedChangeListener 监听 当Check ...

  9. delphi7调用java写的webservice,在调用的时候弹出“wssecurityhandler:request does not contain required security header”

    delphi7调用java编写的webservice问题我用delphi7调用java写的webservice,在调用的时候弹出“wssecurityhandler:request does not ...

  10. 使用ant自动编译安卓项目并签名

     准备阶段: 1.下载ant,jdk,android sdk        ant下载地址:ant.apache.org/bindownload.cgi 2. 设置环境变量      ANT_HO ...