二月 4th, 2010

Ubuntu 9.10 Server 安装VBoxHeadless虚拟机

Linux, by ptubuntu.

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
标签:Linux, Ubuntu, ubuntu9.10, virtualbox

相关日志

Back Top

回复自“Ubuntu 9.10 Server 安装VBoxHeadless虚拟机”

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

  1. 没有任何引用。

发表回复

Back Top


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