How to start the Virtualbox VMs under terminal
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的更多相关文章
- 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 ...
- Mac OS 使用 Vagrant 管理虚拟机(VirtualBox)
Vagrant(官网.github)是一款构建虚拟开发环境的工具,支持 Window,Linux,Mac OS,Vagrant 中的 Boxes 概念类似于 Docker(实质是不同的),你可以把它看 ...
- 快速打造跨平台开发环境 vagrant + virtualbox + box
工欲善其事必先利其器,开发环境 和 开发工具 就是 我们开发人员的剑,所以我们需要一个快并且好用的剑 刚开始做开发的时候的都是把开发环境 配置在 自己的电脑上,随着后面我们接触的东西越来越多,慢慢的电 ...
- [linux]如何为Virtualbox虚拟硬盘扩容(转载)
前言 这个教程介绍如何为Virtualbox虚拟硬盘扩容,虚拟硬盘分为动态分配大小和固定虚拟硬盘,扩容的方法不一样: 如何为动态分配的Virtualbox虚拟硬盘扩容 如何为固定大小的Virtualb ...
- Virtualbox虚机无法启动因断电
The virtual machine 'nn1' has terminated unexpectedly during startup with exit code 1 (0x1). More ...
- 【总结】虚拟机VirtualBox各种使用技巧
作为个人学习研究,VirtualBox是首选,它是Oracle下免费的.开源.跨平台的一款虚拟机软件,小巧.实用,一点也不逊于商业版的VMware Workstation. VirtualBox官网: ...
- 初识genymotion安装遇上的VirtualBox问题
想必做过Android开发的都讨厌那慢如蜗牛的 eclipse原生Android模拟器吧! 光是启动这个模拟器都得花上两三分钟,慢慢的用起来手机来调试,但那毕竟不是长久之计,也确实不方便,后来知道了g ...
- 增加VirtualBox虚拟机的磁盘空间大小(Host:Win7 VirtualBox5.0.16 VM:Win10)
1 前言 网上关于增加VirtualBox虚拟机的磁盘空间大小的文章非常非常多,这里我之所以再写一篇,是因为在参照这些文章做的时候,由于VirtualBox的版本更新以及其他一些环境问题,碰到到一些问 ...
- Virtualbox中不能为虚拟机打开一个新任务的原因及解决方法
VirtualBox新建虚拟机时报错,不能为虚拟机打开一个新任务的原因 解决办法如下 1.保证bios里的virtualization technology的选项开启,不同电脑BIOS设置可能会不一样 ...
随机推荐
- 取消IDEA中光标“指哪打哪”模式
很简单,在Settings->Editor里面去掉Allow placement of caret after end of line
- JQuery连接地址
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> http://co ...
- C# 文件读写异常“正由另一进程使用,因此该进程无法访问该文件”
最近在对文件进行读写操作时,利用using的方法可还是遇到了异常"文件正由另一进程使用,因此该进程无法访问该文件": public bool WriteUserInfo(strin ...
- $ npm install opencv ? 你试试?! 在windows环境下,使用node.js调用opencv攻略
博主之前写过一篇文章<html5与EmguCV前后端实现——人脸识别篇>,叙述的是opencv和C#的故事.最近在公司服务器上更新了一套nodejs环境,早就听闻npm上有opencv模块 ...
- Go Cookie 练习
package main import ( "io" "log" "net/http" ) func main() { http.Handl ...
- 委托 delegate, 继承
c# 的委托就是说把函数当参数来传递. 这个在js完全就用不着搞什么委托东西,直接转就是了嘛.对不对!怎么录嘛! 一个函数,如果它的参数是函数,那么是这样子写的 public void method( ...
- hdu 4544 湫湫系列故事——消灭兔子
http://acm.hdu.edu.cn/showproblem.php?pid=4544 优先队列+贪心. #include <cstdio> #include <queue&g ...
- 设计模式 ( 十八 ):State状态模式 -- 行为型
1.概述 在软件开发过程中,应用程序可能会根据不同的情况作出不同的处理.最直接的解决方案是将这些所有可能发生的情况全都考虑到.然后使用if... ellse语句来做状态判断来进行不同情况的处理.但是对 ...
- Java---设计模块(装饰模式)
★ 场景和问题 在不对原有对象类进行修改的基础上,如何给一个或多个已有的类对象提供增强额外的功能? ★ 引例 写一个MyBufferedReader类,使它能够对字符流(如FileReader.Inp ...
- 百度搜索URL参数 搜索关键字
http://www.baidu.com/s?wd=关键字 wd(Keyword):查询的关键词: http://www.baidu.com/s?wd=关键字&cl=3 cl(Class):搜 ...