2011年10月6日星期四

How to convert win 2000 with VMWare converter


1.    Download and extract Pagedefrag and do a page defrag, this will avoid a error that will show up at 97% completed, says ‘maximum registry size is too small’, you also can change the registry size to a bigger num or do this pagedefrag.
2.    Do the following steps from this website:

http://mbhtech.blogspot.com/2011/01/converting-windows-2000-machine-has.html

Converting a Windows 2000 machine has a bunch of caveats and problems when going from physical to virtual (p2v), using VMware vCenter Converter Standalone.

Requirements:
•    VMware Standalone Converter version 4.0.1 (See Additional Info at the end)
•    Update Rollup 1 for Windows 2000 SP4 (KB891861)
•    Windows 2000 Sysprep tools (Q257813)
•    A Windows or Linux LiveCD. I recommend Knoppix (6.4+ - Linux) or Hiren (Windows).
If you need to modify registry keys, use Hiren.

Procedure:

  • Install VMware Standalone Converter versoin 4.0.1
  • Extract sysprep tools and place them in C:\Documents and Settings\All Users\Application Data\VMware\VMware vCenter Converter Standalone\sysprep\2k
 That should be on the same machine that has VMware Converter, not the Windows 2000 server.
* On Windows 2008, the location is C:\Users\All Users\VMware\VMware vCenter Converter Standalone\sysprep\2k (Thanks Anonymous for the tip!)
  •  Either apply the update rollup to the server or extract the update rollup and replace it with the file SCSIPORT.SYS in C:\WINNT\system32\drivers. Applying the update is recommended if the system is stable.
  • Run the Converter and deploy the agent. If you’re asked to restart, restart then start the VMware Converter service manually before running the Converter again, otherwise it’ll ask you to deploy the agent again.
  • In Step 3: View / Edit Options, Click on the Devices pane and change the disk controller to BusLogic SCSI.
Note: For those people who want change their hard disk serial num, you should choose IDE. Or you can use Buslogic and convert to IDE later(see following chapter).
  • Keep the number of processors as is, because if you change it, Windows 2000 won’t auto-detect new CPUs and you’ll need to update the Hardware Abstraction Layer (HAL) on it manually. See KB234558 and KB249694 for more details.
  • In the Networks pane, deselect the option to connect at power on.
  • In the Advanced Options pane, do not select the options to power off the source and select the option to power on the target (VM). Do install VMware tools.
Do NOT select "configure guest preferences for the virtual machine"
With that, you should be set to convert that machine. After the conversion is complete, the VM will start, install VMware tools, then restart. After it comes up you should apply the proper network settings then shutdown and enable the NIC to connect at power on.

If you don't want install VMware tools, if you start the win2000, you need to setup the video adapter, you can use this as the adapter driver.

Problems and Solutions:
•    "disk read error" when starting the virtual machine.
This happens because you have selected the Disk Controller as “Preserve Source” or “IDE” -- you must select “SCSI” -- after doing so, you’ll need to reconvert the machine.
•    “KMODE_EXCEPTION_NOT_HANDLED” Blue Screen of Death (BSOD) during boot up.
This happens because Windows 2000 is using the old SCSI driver (SCSIPORT.SYS).
You must boot into a LiveCD and replace the file in the location mentioned above.
This happened to me even after I copied the SCSIPORT.SYS to the target machine before converting.
•    After installing the Converter agent, you face problems & restart the Windows 2000 server, then when running converter again, it asks you to re-deploy the agent.
This happens because when the Windows 2000 system comes up again, the Converter agent service isn’t started again.
Open the services console (services.msc in run) and right-click VMware Converter then choose Start. After the service is started, run VMware Converter and it should connect.
•    Unable to communicate to the agent.
The network traffic is probably blocked by firewalls that are on the Converter machine, the Windows 2000 target machine or in between. Make sure the firewalls are disabled or port 9089 is allowed to pass through.
•    "Inaccessible boot device" Blue Screen of Death (BSOD) during boot up.
This happens due to some misconfiguration of drivers in the registry.
To fix this, run the Converter program again and do a machine reconfiguration only (don't reconvert). Let it install VMware Tools, select "Reconfigure destination virtual machine" and do NOT select "Configure guest preferences for the virtual machine"
If that does not solve your problem, read this thread.

Convert VMWare SCSI vmdk to IDE vmdk:
Run the converter program, and select to convert the image file, then change the harddisk to IDE, then do the convert.

Using The Linux LiveCD:
If you’re new to Linux, then here are some steps to help you replace files on virtual machines.

1.    Boot the virtual machine from the LiveCD, by either attaching the ISO file from the data store, your machine, or burning the ISO to a CD (as an image!) and booting it from your CD drive.
2.    At the boot prompt of Knoppix, just press enter to boot into the graphical interface.
3.    Now we need to attach the VM’s disk to the Linux system: open a root shell / terminal.
4.    Type: fdisk -l
This will list all disks in your VM. Identify your operating system hard disk (by capacity if possible). If it’s not possible, then proceed with the next steps until you find your desired partition by looking at its contents.
You will see things like: /dev/sda, /dev/sda1, /dev/sda2, ...etc. sda is your first hard disk. sdb is your second hard disk. sda1 is the first partition in your first hard disk.
5.    Type: mkdir /mnt/os
6.    If your operating system (OS) is installed on the first hard disk, first partition, then type: mount /dev/sda1 /mnt/os
7.    You can now open a file manager in the graphical interface and go to this directory: /mnt/os -- you’ll see the contents of that partition.
If that is not your desired partition, skip to step 10 then try mounting another partition.

Note: Make sure you mount a partition & not a disk!
mount /dev/sda1 is correct. mount /dev/sda is not.
8.    To copy a file over the network from a Windows share on another machine, open a file manager and in the address tab type: smb://ip
Example: smb://192.168.0.1, where the IP is of the machine you want to access over the network to copy a file from.
9.    Right click & copy the file, then go to /mnt/os and paste it there.
10.    You’re almost done. Now you just need to unmount the partition, so close the file manager window that opens /mnt/os and then in the root shell type: umount /mnt/os
11.    Reboot the VM and unattach the CD / ISO.

Additional Info:
•    The sysprep tools will be used by the VMware Converter to prepare a new copy of Windows. It’s required for the cloning process.
•    Support for Windows 2000 has been dropped in VMware Converter version 4.3.
•    VMware Converter Standalone is free. VMware requires that you register to be able to download, but their servers are slow (at least in my experience). I got my copy from 4shared, so just search for it & verify the md5 checksum.
Windows: VMware-converter-4.0.1-161434.exe - 35f22a3b40b114d70cdbda2d5056c10f
Linux: VMware-converter-4.0.1-161434.tar.gz - 90ce68a9f75af91aed9119d419a98b3c
•    LiveCD Selection: You can choose anything that works for you as long as it has SCSI disk drivers, otherwise you won’t be able to see the VM’s disks (which is why getting Damn Small Linux was a waste of time...) and can read & write to the NTFS filesystem.






VMWare converter failed at 97%

It said 'your maximum registry size is too small' .
One method is to change the registry size to a big num(100 or 200).  
My computer / Advanced / Performance 

The other way is use pagedefrag,   download link: http://technet.microsoft.com/en-us/sysinternals/bb897426

Run the program, set the option 'run at next boot'

restart your computer.

Then run the VMWare convert again, select config machine, select the vmx file that already generated, do the reconfiguration, after finished, you are ready to use that virtual machine.




How to convert VMware SCSI .vmdk to IDE .vmdk

I have converted my win2000 PC into VMWare SCSI .vmdk, but some software on win2000 need to read the harddisk's serial num, and I can't change the VMWare's SCSI harddisk num, I have to change the SCSI .vmdk to IDE .vmdk.

Tried some methods from internet, but didn't work on the latest VMware player.

Finally I found an easy way to do it.


User the VMWare converter standalone, convert the .vmdk, set the destination as IDE, after completed, the new .vmdk is IDE , and you can change the harddisk's serial num.


2011年3月19日星期六

Jonh Alexander Macdonald

Presentation for Sir John Alexander Macdonald



2010年7月29日星期四

2009年12月4日星期五

BugZilla安装注意事项

BugZilla安装注意事项 


在安装Bugzilla的过程中遇到一些问题,在网上查找资料后,已经安装成功,现将遇到的一些问题记录下来,供需要的人参考。其中对我帮助较大的一篇文章是: http://demon3780.javaeye.com/blog/145814#

我在该文章基础上做了些修改,并写出了一些注意事项。

 一:安装activeperl
      activeperl的下载和安装比较简单。 到
http://www.activestate.com/activeperl/下载最新的安装即可。   

二:安装mysql
      到 www.mysql.com 下载最新的版本。安装也很简单,在安装的过程中,一定要记住root密码,默认为空。

      安装好mysql后,要进行一些配置:

      安装完成后,有一个MySQL Command  Line Client,打开该程序,会提示并输入root密码。

如果不用该控制台,也可以通过cmd,进入到mysql的bin目录,用  mysql -u root -p 进入mysql的配置管理

首先创建bugs数据库:

mysql>create database bugs; (注意,末尾有个分号)

创建bugs用户,并授权

mysql>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, REFERENCES, LOCK TABLES, CREATE TEMPORARY TABLES ON bugs.* TO bugs@localhost

IDENTIFIED BY 'bugs'; 修改bugs用户的密码:

mysql>set password for 'bugs'@'localhost' = OLD_PASSWORD('bugspassword');

最后刷新一下

mysql> FLUSH PRIVILEGES;

检查bugs用户是否创建成功:

mysql> quit

mysql> mysql -u bugs -p

Enter password:bugs

  注:默认安装会将mysql加入系统服务中并自动启动,如果是手动模式则不会将mysql加入系统服务中,需自己加到系统服务中(打开cmd进入到mysql的bin目录,安装服务mysql
install mysql5;启动服务net start mysql5.),再创建数据库和用户。
三:安装bugzilla
  下载解压后,进入到bugzilla根目录下
  首先说一下checksetup.pl这个文件,bugzilla的安装和配置可以说全靠它,通常来说,要运行3次perl checksetup.pl
(1)安装缺少的模块
>perl checksetup.pl --check-modules 
根据提示,把需要安装的模块复制到一个记事本上,以便后面安装模块的时候查看。

以下过程可以使用ActivePerl 自带的PPM来进行,由于是图形界面,所以比较方便。在PPM界面上选择缺少的模块,然后安装即可,如果没有合适的版本,可以在PPM中添加另外一个的服务器试试。

保留以下部分是供可能需要的人参考

根据checksetup的提示,windows用户需要首先运行(必须最先运行,否则下面的模块找不到下载站点)
ppm repo add theory58S http://theoryx5.uwinnipeg.ca/ppms
据提示一步一步安装perl模块,
>ppm install Email-Send
  如果有的模块在主站下载不到,可以使用--force从其他站点下载;如上面的ppm install --force Email-Send

  perl模块会下载到 Perl安装目录下的site\lib中,

安装中ImageMagick好像无法下载 可以下载ImageMagick-6.3.7-0-Q16-windows-dll.exe下载地址:http://www.imagemagick.org/script/binary-releases.php#windows ,在安装的时候切记选中"Install PerlMagick for ActiveState Perl v5.8.8 build822"
安装过程中可以多次运行 perl checksetup.pl --check-modules,如果有模块没有安装会有提示的如图
(2)修改配置文件

安装完所有的模块后,再次运行perl checksetup.pl,如果主要的模块都正确安装,会在bugzilla的目录下生成一个localconfig文件修改该文件,主要是以下几个配置:
  $db_host = 'localhost';  主机名称:mysql的数据库在本机

  $db_name = 'bugs';      数据库名称,在第二步安装mysql时已创建好了
  $db_user = 'bugs';        数据库用户名,在第二步已经创建好了
  $db_pass = 'bugs';       数据库访问的密码,在第二步已经创建好了

(3)
最后,再次运行perl checksetup.pl,会看到一些创建表的信息,并且中途会提示你输入管理员的相关信息。
只要注意mysql的语句最后是有分号的,按照上面的命令做应该不会有什么问题
四:安装配置apache
 apache的几乎所有的配置都在安装目录下conf文件夹下的httpd.conf文件中。打开该文件做以下几个修改:

1 确定监听端口未被占用,默认为80端口,如果被其他web服务器占用,则修改该端口号

 Listen 80

  2 修改主目录配置

若要直接通过http://localhost/访问,则修改主目录
修改DocumentRoot参数,默认情况下该参数是指向apache的安装目录下的htdos文件夹,修改该参数为bugzilla的安装路径下。同时要记得修改下面的参数

配置CGI访问,需要把下面这一句前面的#给去掉

AddHandler cgi-script .cgi


修改Options Indexes FollowSymLinks 为 Options Indexes FollowSymLinks ExecCGI

修改AllowOverride None为AllowOverride All

在AllowOverride All下一行添加ScriptInterpreterSource Registry-Strict

修改apache的缺省访问文件:在DirectoryIndex index.html index.html.var后面添加一个index.cgi
 
3 修改注册表,新建项HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command修改默认值为 E:\Perl\bin\perl.exe -T 重启apache 
配置完成,输入

http://localhost/ 就可以看到bugzilla的主页面了
 

如果是IIS则配置如下:


配置IIS: 
1. 打开【控制面板】->【管理工具】->【Internet 服务管理器】,在【默认 Web 站点】点按右键选择【属性】->【主目录】->【配置…】,在【应用程序映射】中点击【添加】 
,增加如下资料:

2. Perl脚本解析器:(*.pl)

可执行文件: D:\Perl\bin\perl.exe "%s" %s

扩展名: .pl 仅限于: GET,HEAD,POST 3. CGI脚本解析器:(*.cgi)
可执行文件: D:\Perl\bin\perl.exe "%s" %s 扩展名: .cgi 仅限于: GET,HEAD,POST 4. 默认 Web 站点】->【新建】->【虚拟目录】: 别名:Bugzilla,访问目录:D:\Bugzilla,访问权限中增加【写入】权限。 5. 选择刚建立的虚拟目录Bugzilla,右键选择【属性】-> 【文档】。【默认文档】中增加index.cgi。
安装这些模块有2种方式,离线安装和在线安装,我采用的是在线安装,如果需要离线安装,首先要到bugzilla的网站上去下载一个包,好像叫做bugzilla-boud(我在网上找了没找到,最好还是在线安装,下载需要较长的时间)


五. 邮件配置:
登录到Bugzilla的管理界面,将Email发送方式配置为SMTP,输入SMTP服务器地址:smtp.163.com, 输入用户名(不用@163.com),密码。如果出现 Can't locate Authen/SASL.pm in @INC,则需要用ActivePerl的PPM安装Authen::SASL,然后可以使用了。看到网上有些人去修改Bugzilla的perl代码去发送邮件,应该是因为没有安装Authen::SASL的缘故。