Ubuntu下用VirtualBox安装Windows XP虚拟机

前阵子做了两个中文站,需要一再在各种版本的IE下测试。但我装在ubuntu下的ies4linux界面一直就有些问题——比如页面字体总是楷体,还显示不完整,每个字都好像被硫酸水泼过一样。

不得已切去windows XP下工作了一段时间。谁知昨天升级了一下ruby gems,在rails里就死活连不上mysql,折腾了一下午,都快疯了还是没有结果。

于是索性回到ubuntu,使用VirtualBox新建虚拟机,装上windows XP。

安装VirtualBox

$sudo apt-get install virtualbox

约30多M,片刻即好。
装好后可以在菜单Applications->Accessories下找到VirtualBox OSE,启用。

安装Windows XP

VirtualBox菜单Mechine->New创建新的虚拟机。然后依次设置名称、操作系统,虚拟机内存、硬盘,完成。

选中刚刚建立的虚拟机,Setting。

  • General->Advanced选项卡下,Boot order选上CD/DVD-ROM、Harddisk,以允许从光盘启动。
  • CD/DVD->ROM选项卡下,勾上Mount CD/DVD Drive。下边的两个选项,如果从物理光驱启动,勾上Host CD/DVD driver。否则勾上ISO Image File,点后边的文件夹图标设置将要使用的XP安装镜像,如GHOSP XP SP3.iso。
  • 点Start启动虚拟机,进入从光盘安装系统的界面,按部就班安装即可。

虚拟机使用小窍门

  1. 没有声音的话,Setting->Audio里先启用,Host Audio Driver选ALSA
  2. 虚拟机窗口上的菜单快捷键都是HOST+,比如全屏是HOST+F。所谓HOST键,默认是右CTRL键。可以在OSE菜单File->Preferences->Input里设置。
  3. 当焦点在虚拟机内时,鼠标是无法移出虚拟机窗口的。要切换焦点到主机,按HOST键即可。
  4. http或ftp访问主机用127.0.0.1是不行的,localhost自然也不行。可行的是找到主机的ip,比如192.168.1.100,用这个ip就可以访问了。
  5. 虚拟机要访问主机的文件,可以在客户机窗口Devices->Shared Folders里先设置主机共享的目录,然后打开资源管理器,工具菜单里映射网络驱动器到//vboxsvr/shared_folder_name。——我还是宁愿使用ftp。
Twitter Digg Delicious Stumbleupon Technorati Facebook

3 Responses to “Ubuntu下用VirtualBox安装Windows XP虚拟机”

  1. All I can say is Thank You!

    Thank You Windows 7 Team for this great release; and special thanks to you, for answering all the questions more than once and for telling the newest news from inside Redmond for more than 36 hours without any long sleeping breaks (as I conclude from your posts) ;-)

    Windows Vista = Modern Windows ME (Mistake Edition)
    Windows 7 = Modern Windows XP

    Here is my benchmarked view about Windows XP, Vista and 7

    Windows XP Pro SP3, Install, right off the bat, consuming 89MB of RAM for the OS with no other programs running.

    Windows Vista, Install, right off the bat, consuming 800MB of RAM! for the OS with no other programs running.

    Windows 7 Final, Install, right off the bat, consuming 222 MB of RAM, for the OS with no other programs running.

    I guess Microsoft made a huge improvement in the system resources needed for Windows 7 after its fatal mistake with Windows Vista! But I will continue running windows XP as all of my programs runs perfectly fine under it and I have no genuine excuse to upgrade. I am a minimalist that I have “nLited” my installation of Windows XP and when I did that installation my nLited XP was consuming 43 MB of RAM for nLited XP just to run with no other programs running, no other Operating System-of-the-NOW can beat that! I am currently waiting for a vLite version tailored for Windows 7 so I can do a redo of performance after removing the “fat” out of Windows 7, but until then, I will just leave the case open and continue my normal activities under Windows XP.
    Thank you!