Chinaunix首页 | 论坛 | 博客
  • 博客访问: 16157
  • 博文数量: 7
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 75
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-11 22:33
文章分类

全部博文(7)

文章存档

2009年(7)

我的朋友
最近访客

分类: LINUX

2009-12-23 14:01:58

    非图形界面使用virtualbox,主机和待安装的os都是redhat 5,内核2.6.18-53-e15,64位,amd的cpu。之所以有本文,是因为按照virtualbox文档去做总是出错。下面的资料来源于:



    windows端ssh登录linux主机,安装好virtualbox,可按照下列步骤安装linux:
1.VBoxManage createvm --name "redhat" --register
2.VBoxManage modifyvm "redhat" --memory "512" --acpi on --boot1 dvd --nic1 nat
3.VBoxManage createhd --filename "redhat.vdi" --size 10000 --variant Fixed --type writethrough --remember
4.VBoxManage storagectl "redhat" --name "IDE Controller" --add ide
5.VBoxManage modifyvm "redhat" --hda "redhat.vdi"
6.VBoxManage storageattach "redhat" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "redhat.vdi"
7.VBoxManage storageattach "redhat" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /home/redhat.iso
8.VBoxManage modifyvm "redhat" --dvd /home/redhat.iso
9.VBoxHeadless --startvm "redhat"
10.windows端点开“开始”->“运行”,输入命令“mstsc”,出来一个远程登录的窗口,输入linux主机的ip,即可看到安装界面了

以上步骤只是个人磕磕碰碰总结出来的流程,估计有些步骤不是很需要,或冗余。

配置虚拟机网络:
VBoxManage modifyvm "redhat_zjluo" --nic1 bridged --bridgeadapter1 eth0

配置串口:
VBoxManage setextradata "redhat" "VBoxInternal/Devices/serial/0/Config/IRQ" 4
VBoxManage setextradata "redhat" "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
VBoxManage setextradata "redhat" "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
VBoxManage setextradata "redhat" "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
VBoxManage setextradata "redhat" "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "/tmp/vbox"
VBoxManage setextradata "redhat" "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1


克隆虚拟机:
cd ~/.VirtualBox/VDI/
   默认地这里存放着VirtualBox的硬盘镜像文件,再克隆一个镜像:
VBoxManage clonevdi redhat.vdi clone_redhat.vdi
   然后新建一个虚拟机,在创建硬盘时可以注册这个克隆的硬盘,这样开发机就是目标机的克隆体了。

当然,命令行比较麻烦,实际上可以用vnc登录linux,可以图形界面操作,即使linux没有安装界面。
阅读(709) | 评论(0) | 转发(0) |
0

上一篇:linux 内核调试方法之串口

下一篇:建立nfs

给主人留下些什么吧!~~