当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : HOWTO: Install Windows XP/2000 in VMWare Player
帖子发表于 : 2005-12-28 18:56 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
This guide will allow you to install Windows XP or 2000 solely with the VMWare Player. For the uninitiated, VMWare released a free application that allows users to run, but not create virtual machines. Using QEMU, we will create an environment suitable for use with the player.

As a side-note, I'd like to point out that VMWare makes quality software. If you require additional functionality, consider upgrading to Workstation. For those curious, these actions are condoned by the developers as per this quote:

"We’re well aware of what people could potentially do, and we’ll live with the consequences. As you observe, Workstation has a lot of features that no amount of vi and dd hacking will replicate and these are what make Workstation worth buying (eg: Teams as you mention, or snapshots). I suspect that most people who go to the trouble are one’s who haven’t bought or wouldn’t buy Workstation anyway."

Installing the player itself involves some patience. Get the Linux tar from this page. Most of my instructions will be shamelessly ripped from this lovely tutorial. Fire up a root terminal and do:

Code:

apt-get install build-essential uname -r apt-get install linux-headers-'kernel version' apt-get install gcc-3.4 apt-get install g++-3.4


Now that the initial dependencies have been met, let's continue.

Code:

tar xvzf VMware-player-1.0.0-16981.tar.gz cd vmware-player-distrib export CC=/usr/bin/gcc-3.4 ./vmware-install.pl


The installer has an unusually high number of prompts, all of which can be answered the default "yes" to by hitting enter. After hitting enter a few dozen times and agreeing to the license, everything should install successfully. If you're having problems installing the actual player, that other guy might be more qualified to diagnose it than I am. Moving along...

There are two components to a virtual machine, the hard drive image and a text file that VMWare interprets. First, we'll create an image with QEMU.

I know this sounds a little odd, but I couldn't get the QEMU command used to generate the disk working from the Linux port. Fortunately, the utility works fine with the Windows port under Wine. I can't really bothered to delve into the specifics of installing Wine other than suggesting:

Code:

apt-get install wine


Then download and install the Windows version of QEMU. Execute it from a command line as follows:

Code:

wine qemu-img.exe create -f vmdk WindowsXPPro.vmdk 2G Formating 'WindowsXPPro.vmdk', fmt=vmdk, size=2097152 kB


This will generate a 320k file which is a usable blank drive. Create a new folder to contain our files and name this guy either WindowsXPPro.vmdx or Windows2000Pro.vmdx accordingly.

You now have the choice to install XP or 2000. On my 1.2ghz/512mb system Windows 2000 runs considerably more responsively; your choice. As per the other tutorial, we should be able to insert our CD and go after the following. But in my case, neither my bootable XP or 2000 CD had any interest in well, booting. I'd suspect I'm not the only one with this concern, so we'll play with ISO images instead.

Code:

apt-get install gnomebaker


After inserting your original Windows disc, load Gnomebaker, choose "Copy Data CD," and tick the "Create ISO only" box. Save the resulting ISO as either WindowsXPPro.iso or Windows2000Pro.iso to the folder we just created. If the processes ever freezes 99%, feel free to "killall gnomebaker" without concern.

Unfortunately, our ISO image will not have the bootable sector intact. We'll instead boot from a series of floppy images. My Windows 2000 disc included them in a "bootdisk" folder, whereas XP did not. For 2000, copy the four img files from it to our created folder.

With XP, you'll need some additional nonsense. Hunt down an appropriate set from Microsoft for your version of XP, and do the following:

Code:

apt-get install cabextract cabextract 'nameofarchive.exe' -d 'our working directory'


Deleted the non-img extracted files.

Now that we have a matching ISO and floppy set, we're ready to proceed with installation. Paste one of the following to a text editor (gedit/leafpad) and save it as either WindowsXPPro.vmx or Windows2000Pro.vmx to our directory:

Windows XP:

Code:

#!/usr/bin/vmware config.version = "8" virtualHW.version = "3" ide0:0.present = "TRUE" ide0:0.filename = "WindowsXPPro.vmdk" memsize = "192" MemAllowAutoScaleDown = "FALSE" ide1:0.present = "TRUE" ide1:0.fileName = "WindowsXPPro.iso" ide1:0.deviceType = "cdrom-image" ide1:0.autodetect = "TRUE" floppy0.fileType = "file" floppy0.fileName = "cdboot1.img" floppy0.startConnected = "True" ethernet0.present = "TRUE" usb.present = "TRUE" sound.present = "TRUE" sound.virtualDev = "es1371" displayName = "Windows XP Pro" guestOS = "winxppro" nvram = "WindowsXPPro.nvram" MemTrimRate = "-1" ide0:0.redo = "" ethernet0.addressType = "generated" uuid.location = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" uuid.bios = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" ethernet0.generatedAddress = "00:0c:29:4c:23:7b" ethernet0.generatedAddressOffset = "0" tools.syncTime = "TRUE" ide1:0.startConnected = "TRUE" uuid.action = "create" checkpoint.vmState = "WindowsXPPro.vmss" tools.remindInstall = "TRUE"


Windows 2000:

Code:

#!/usr/bin/vmware config.version = "8" virtualHW.version = "3" ide0:0.present = "TRUE" ide0:0.filename = "Windows2000Pro.vmdk" memsize = "192" MemAllowAutoScaleDown = "FALSE" ide1:0.present = "TRUE" ide1:0.fileName = "Windows2000Pro.iso" ide1:0.deviceType = "cdrom-image" ide1:0.autodetect = "TRUE" floppy0.fileType = "file" floppy0.fileName = "CDBOOT1.IMG" floppy0.startConnected = "True" ethernet0.present = "TRUE" usb.present = "TRUE" sound.present = "TRUE" sound.virtualDev = "es1371" displayName = "Windows 2000 Pro" guestOS = "win2000pro" nvram = "Windows2000Pro.nvram" MemTrimRate = "-1" ide0:0.redo = "" ethernet0.addressType = "generated" uuid.location = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" uuid.bios = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" ethernet0.generatedAddress = "00:0c:29:4c:23:7b" ethernet0.generatedAddressOffset = "0" tools.syncTime = "TRUE" ide1:0.startConnected = "TRUE" uuid.action = "create" checkpoint.vmState = "Windows2000Pro.vmss" tools.remindInstall = "TRUE"


Double click on the resulting file, and Windows should start to install. The only screwiness left at this point is that we'll need to swap floppy images. When prompted, click on the floppy icon to "eject" the drive. In Nautilus, rename cdboot1.img to cdboot01.img and cdboot2.img to cdboot1.img, then click the floppy icon again to continue. It may sound a little strange, but you're essentially renaming the images to match that of the first file when it wants it. You'll get the hang of it, promise.

Once the floppies have done their thing, the ISO will take over and Windows will install normally.

Sorry about the length of this. If I had web hosting, I could've posted many of these files and shaved off a few steps. I'll try my best to answer any questions that may come up, but concede that my level of Linux know-how is only intermediate.


http://ubuntuforums.org/showthread.php?t=84275


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2006-01-01 2:16 

注册: 2005-10-16 11:48
帖子: 8
地址: 北京
送出感谢: 0 次
接收感谢: 0 次
第一次翻译,很多规则都不会,请多指教。其中的命令不太懂,所以没有用回车分开,请指正。

通过这个指引,你将能够只用VMWare Player(这是VMWare专为初学者发行的一个免费的虚拟工具,它可以让你去运行一台虚拟机而不必自己动手创建)就可以安装Windows XP或者2000。以下,通过使用QEMU,我们就可以创建一个适于使用VMWare Player的环境。
首先我要指出,VMware的软件是很有价值的,尽管这好像是题外话。如果你还需要这篇指引之外的功能,我建议你使用VMWare Workstation。如果有好管闲事的人认为这样使用VMWare不合时宜,那么我要说VMWare的开发者们通过下面的这段话原谅了这种行为:
“我们很清楚人们可能会怎样做,我们也将会容忍这些带来的结果。人所皆知,Workstation具有很多vi和dd hacking所无法模仿的特征(就像工作组功能以及截图功能),这些特征便是它的价值所在。我猜想大多数在这方面遇到困难的人都是那些没有购买或不打算购买Workstation的人。”
现在就开始安装。安装这个player本身也是需要一定耐心的。先从这一页(?)得到Linux版本的tar源码包。以root身份打开一个终端,输入代码:
apt-get install build-essential uname -r apt-get install linux-headers-'kernel version' apt-get install gcc-3.4 apt-get install g++-3.4
这是为了解决初始的依赖问题。

下一步,输入代码:
tar xvzf VMware-player-1.0.0-16981.tar.gz cd vmware-player-distrib export CC=/usr/bin/gcc-3.4 ./vmware-install.pl
这一步中,installer有很多的提示问题,它们都可以直接敲回车表示“yes”。这其中要做几次确认和同意几张许可,之后,所有东西就应该都成功安装完毕了。如果你在安装过程中遇到了问题,那就去找一个比我更会诊断问题的人请教。现在让我们继续。

一台虚拟机有两个组分:硬盘镜像和VMWare用于解释虚拟机的文本。我们首先用QEMU创建一个硬盘镜像。
但是很遗憾我找不到在Linux环境下用于创建这种镜像的QEMU命令。所幸的是,通过使用wine,可以在Windows环境下实现这个功能。这里我不再详细的叙述wine的使用方法,只是简单的提示一下:
代码:apt-get install wine
然后下载Windows版本的QEMU,用以下的命令执行它:
wine qemu-img.exe create -f vmdk WindowsXPPro.vmdk 2G Formating 'WindowsXPPro.vmdk', fmt=vmdk, size=2097152 kB
这样就产生了一个实际大小为320k的可用的空白虚拟硬盘。然后创建一个新文件夹来存放我们的文件,这个文件夹就以WindowsXPPro.vmdx(或Windows2000Pro.vmdx,相应地)来命名。

现在你就可以安装XP或2000了。在我配置为1.2GHz/512MB的系统中,Windows2000可以运行得更出色——当然,这完全取决于你自己的选择。按照另一篇教程的说法,我们接下来只要把系统盘插进光驱再安提示走下去就可以了。但是我的能够引导的XP和2000的盘似乎都无法正常的引导。我猜想有这个问题的不只我一人吧,那就让我们一起用ISO镜像来安装:
代码:apt-get install gnomebaker
插入你的Windows安装盘之后,打开Gnomebaker,选择“Copy Data CD",然后钩选上"Create ISO only"这个选项。把得到的ISO镜像保存在我们刚刚创建的文件夹中,并以WindowsXPPro.iso或Windows2000Pro.iso来命名。注意,如果拷贝进程在99%时无响应了,你可以完全可以放心地执行“killall gnomebaker”来结束这个进程。
不幸的是,我们的ISO镜像不会有完整的引导区。对此,我们将采取从一系列软盘镜像中引导的方式。我的Windows2000光盘在bootdisk这个文件夹中含有这些镜像,但XP中却没有。对于2000的情况,直接把这四个img文件拷贝到我们刚才创建的文件夹中。对于XP,你就需要做一些额外的工作了。搜寻于你的XP版本对应的一套合适的引导镜像,然后执行下面的代码:
apt-get install cabextract cabextract 'nameofarchive.exe' -d 'our working directory'
最后删掉提取出来的非img文件。

现在我们有了一套匹配的ISO和floppy镜像,可以继续安装了。把下面的代码粘贴在文本编辑器中(gedit/leafpad)并命名为WindowsXPPro.vmx或Windows2000Pro.vmx保存在我们刚才建立的文件夹中。
对WindowsXP,代码:
#!/usr/bin/vmware config.version = "8" virtualHW.version = "3" ide0:0.present = "TRUE" ide0:0.filename = "WindowsXPPro.vmdk" memsize = "192" MemAllowAutoScaleDown = "FALSE" ide1:0.present = "TRUE" ide1:0.fileName = "WindowsXPPro.iso" ide1:0.deviceType = "cdrom-image" ide1:0.autodetect = "TRUE" floppy0.fileType = "file" floppy0.fileName = "cdboot1.img" floppy0.startConnected = "True" ethernet0.present = "TRUE" usb.present = "TRUE" sound.present = "TRUE" sound.virtualDev = "es1371" displayName = "Windows XP Pro" guestOS = "winxppro" nvram = "WindowsXPPro.nvram" MemTrimRate = "-1" ide0:0.redo = "" ethernet0.addressType = "generated" uuid.location = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" uuid.bios = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" ethernet0.generatedAddress = "00:0c:29:4c:23:7b" ethernet0.generatedAddressOffset = "0" tools.syncTime = "TRUE" ide1:0.startConnected = "TRUE" uuid.action = "create" checkpoint.vmState = "WindowsXPPro.vmss" tools.remindInstall = "TRUE"
对Windows2000,代码:
#!/usr/bin/vmware config.version = "8" virtualHW.version = "3" ide0:0.present = "TRUE" ide0:0.filename = "Windows2000Pro.vmdk" memsize = "192" MemAllowAutoScaleDown = "FALSE" ide1:0.present = "TRUE" ide1:0.fileName = "Windows2000Pro.iso" ide1:0.deviceType = "cdrom-image" ide1:0.autodetect = "TRUE" floppy0.fileType = "file" floppy0.fileName = "CDBOOT1.IMG" floppy0.startConnected = "True" ethernet0.present = "TRUE" usb.present = "TRUE" sound.present = "TRUE" sound.virtualDev = "es1371" displayName = "Windows 2000 Pro" guestOS = "win2000pro" nvram = "Windows2000Pro.nvram" MemTrimRate = "-1" ide0:0.redo = "" ethernet0.addressType = "generated" uuid.location = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" uuid.bios = "56 4d cd 3f 59 5b 61 43-fd 73 ef 46 56 4c 23 7b" ethernet0.generatedAddress = "00:0c:29:4c:23:7b" ethernet0.generatedAddressOffset = "0" tools.syncTime = "TRUE" ide1:0.startConnected = "TRUE" uuid.action = "create" checkpoint.vmState = "Windows2000Pro.vmss" tools.remindInstall = "TRUE"
双击得到的文件,然后Windows就会开始安装了。这里唯一奇怪的一点是我们需要换软盘镜像:当提示到的时候,点击软盘图标来“弹出”软驱。在Nautilus中,把cdboot1.img和cdboot2.img分别重命名为cdboot01.img和cdboot02.img,然后点击软盘图标并继续。这种做法可能看起来很奇怪,但是你实际上只是在重命名后面的文件使它们与第一个文件相匹配。你会理解这种做法的。

软盘镜像完成了引导之后,ISO镜像就会开始工作,Windows安装也就步入正轨了。

很遗憾这个过程还是很漫长。如果我有主页的话,我就可以把上面提到的多个文件挂在上面从而精简安装过程了。我将尽我所能回答安装过程中可能出现的问题,但是有一点你们应该知道,我对Linux的了解也只是中等水平。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译