Ubuntu 9.10 Server 安装VBoxHeadless虚拟机

Sun VirtualBox 3.1 安装在Ubuntu 9.10 server.

1.添加Installing VirtualBox源列表.

2.#sudo vi /etc/apt/sources.list

#deb http://download.virtualbox.org/virtualbox/debian karmic non-free
#sudo aptitude update
#sudo aptitude install linux-headers-$(uname -r)  build-essential virtualbox-3.1 dkms


(在安装VirtualBox 会提示你输入相关的内容.)

Creating group 'vboxusers'
 Users of VirtualBox must be members of that group. Host network  interfaces will be assigned to that group. <-- Ok

Should the vboxdrv kernel module be compiled  now? <-- Yes

3.添加Vboxusers用户.

#sudo adduser administrator vboxusers
4.安装完可以查看帮助.
#VBoxManage --help

5.我们现在有一台基于Ubuntu9.10 Server VM with 256MB 内存和10GB的硬盘,安装ubuntu9.10 Server iso文档 (文档存放的目标在/home/ubuntu-9.10-server-amd64.iso):
 VBoxManage createvm --name "Ubuntu 9.10 Server"  --register
 VBoxManage modifyvm "Ubuntu 9.10 Server" --memory 256 --acpi on  --boot1 dvd --nic1 bridged --bridgeadapter1 eth0
 VBoxManage createhd --filename Ubuntu_9_10_Server.vdi --size 10000  --register
 VBoxManage storagectl "Ubuntu 9.10 Server" --name "IDE Controller"  --add ide
 VBoxManage storageattach "Ubuntu 9.10 Server" --storagectl "IDE  Controller" --port 0 --device 0 --type hdd --medium  Ubuntu_9_10_Server.vdi
 VBoxManage storageattach "Ubuntu 9.10 Server" --storagectl "IDE  Controller" --port 1 --device 0 --type dvddrive --medium  /home/ubuntu-9.10-server-amd64.iso
 6.启动VM.
 VBoxManage registervm Machines/examplevm/examplevm.xml
 VBoxHeadless --startvm "Ubuntu 9.10 Server"

停止VM, run
VBoxManage controlvm "Ubuntu 9.10 Server" poweroff
暂停VM, run
VBoxManage controlvm "Ubuntu 9.10 Server" pause 

重启VM, run

VBoxManage controlvm "Ubuntu 9.10 Server" reset

如果你想了解更多有关 VBoxHeadless, 那么请查看帮助.

VBoxHeadless --help

原创文章,转载请注明: 转载自PT Ubuntu Blog

本文链接地址: http://www.ptubuntu.com/2010/02/3367.html

  • Share/Bookmark

One Response to “Ubuntu 9.10 Server 安装VBoxHeadless虚拟机”

  1. 阳光不锈 说:

    这样弄出来的VPS和XEN的的可以有比较么?

Leave a Reply


Verify Code   If you cannot see the CheckCode image,please refresh the page again!

Powered by WordPress | Buy free cell phones from at&t. | Thanks to PalmPreBlog.com, MMO Games and Conveyancing