vbox 命令行操作

老大让搭个服务器,做IoT端的接受服务器。我选了KAA,官网提供vbox的沙盒镜像,直接装即可。

服务器上装的是centos,我就想直接在centos上装virtuanl box ,然后导入沙盒。奈何服务器是个workstation,木有图形界面,一下懵逼了。镇定之下,想起可以命令行导入虚拟机。


1.导入虚拟机 VBoxManage  import kaa-sandbox-0.9.0.ova

kaa-sandbox-0.9.0.ova 文件是我从官网上下载的KAA对应virtual box的虚拟镜像


2.查询虚拟机 ID VBoxManage list vms 

"Kaa Sandbox Ubuntu 64 bit" {31ada67a-2c94-432d-ab5f-05ffad13b7f7


3.启动虚拟机VBoxManage  startvm "Kaa Sandbox Ubuntu 64 bit"


4.启动的时候发现warmning:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.10.0-327.el7.x86_64) or it failed to
         load. Please recompile the kernel module and install it by


           sudo /sbin/vboxconfig


         You will not be able to start VMs until this problem is fixed.


5.于是执行/sbin.vboxconfig,又发现warmning:

root@localhost ~]# sudo /sbin/vboxconfig 
vboxdrv.sh: Building VirtualBox kernel modules.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:


  yum install gcc make
  yum install kernel-devel-3.10.0-327.el7.x86_64
(The last command may fail if your system is not fully updated.)
  yum install kernel-devel



6.发现还是不行.google了下,发现是因为我的server没有图形界面的原因,启动时需要如下命令:

 VBoxManage startvm Machine --type headless 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值