標籤:http io os ar art sp on c linux
#cd /etc/yum.repos.d/
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
yum install kernel-devel dkms.noarch
yum install VirtualBox-4.1
service vboxdrv start #運行後,如果核心不支援會更新核心
download : Oracle_VM_VirtualBox_Extension_Pack-4.1.34-95024.vbox-extpack
#安裝擴充,不然命令看不見安裝的虛擬機器
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.34-95024.vbox-extpack
#查看當前已啟動的虛擬機器
VBoxManage list runningvms
#顯示作業系統ID,下面用到
VBoxManage list ostypes
#刪除虛擬機器
VBoxManage unregistervm -delete win08
#安裝WIN系統
#建立硬碟
VBoxManage createvdi --filename /var/vbox/win08/win08.vdi --size 20000
#建立虛擬機器
VBoxManage createvm --name win08 --ostype Windows2008_64 --register --basefolder /var/vbox/win08/
#修改配置
VBoxManage modifyvm win08 --memory 1024 --accelerate3d off --nic1 bridged --bridgeadapter1 eth1
#加IDE
VBoxManage storagectl win08 --name IDE --add ide --controller PIIX4 --bootable on
#加硬碟
VBoxManage storageattach win08 --storagectl IDE --type hdd --port 0 --device 0 --medium /var/vbox/win08/win08.vdi
#加光碟機
VBoxManage storageattach win08 --storagectl IDE --port 1 --device 0 --type dvddrive --medium /root/cdrom/win2008-64.iso
#硬體引導設定
VBoxManage modifyvm win08 --boot1 dvd
#系統搞定後設定從硬碟啟動
#VBoxManage modifyvm win08 --boot1 disk
#啟用遠端桌面
vboxmanage modifyvm win08 --vrde on --vrdeport 9003
#系統搞定後可以關掉
#vboxmanage modifyvm win08 --vrde off
#後台運行
VBoxManage startvm win08 --type headless
#關閉電源
VBoxManage controlvm win08 poweroff
#安裝CENTOS系統
#以下解釋同上
VBoxManage createvdi --filename /var/vbox/cen/cen64.vdi --size 10000
VBoxManage createvm --name cen64 --ostype Linux26_64 --register --basefolder /var/vbox/cen/
VBoxManage modifyvm cen64 --memory 512 --accelerate3d off --nic1 bridged --bridgeadapter1 eth1
VBoxManage storagectl cen64 --name IDE --add ide --controller PIIX4 --bootable on
VBoxManage storageattach cen64 --storagectl IDE --port 0 --device 0 --type hdd --medium /var/vbox/cen/cen64.vdi
VBoxManage storageattach cen64 --storagectl IDE --port 1 --device 0 --type dvddrive --medium /root/cdrom/centos-64.iso
#硬體引導設定
VBoxManage modifyvm cen64 --boot1 dvd
#系統搞定後設定從硬碟啟動
#VBoxManage modifyvm cen64 --boot1 disk
#啟用遠端桌面
vboxmanage modifyvm cen64 --vrde on --vrdeport 9002
#系統搞定後可以關掉
#vboxmanage modifyvm cen64 --vrde off
#後台運行
VBoxManage startvm cen64 --type headless
#關閉電源
VBoxManage controlvm cen64 poweroff
centos 裝VBOX