Sunday, July 11, 2010

XenConvert error during P2V: Failed to copy the registry. (0x00000BC5)

While P2Ving Windows 2003 EE Xen Convert were failing while converting registry and log says following
Stopping service MSDTC.
Stopped service MSDTC.
Stopping service WSearch.
Failed to open service WSearch. The specified service does not exist as an installed service. (0x00000424)
Stopping service winmgmt.
Stopped service winmgmt.
Converting volume \\?\Volume{40994a6a-4ac1-11de-9f6e-806e6f6e6963} as a system volume to \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e} ...
Using backup functions to copy files.
Converting NTFS boot sectors on volume \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e} ...
Converting registry...
Copying hive SECURITY...
Saving hive to \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e}\WINDOWS\system32\config\SECURITY...
Copying hive SOFTWARE...
Saving hive to \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e}\WINDOWS\system32\config\software...
Failed to save registry key to file \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e}\WINDOWS\system32\config\software. An I/O operation initiated by the registry failed unrecoverably. The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry. (0x000003F8)
Failed to copy hive SOFTWARE.
Restarting special services...
Volume to Volume stopped at Thursday, July 08, 2010 13:07:42
Physical to Disk stopped at Thursday, July 08, 2010 13:07:42
Dismounting VHD...
Physical to VHD stopped at Thursday, July 08, 2010 13:09:46
Physical to OVF Package stopped at Thursday, July 08, 2010 13:09:46
Physical to XenServer stopped at Thursday, July 08, 2010 13:09:46
Failed to copy the registry. Cannot create a file when that file already exists. (0x000000B7)

To give little background ,P2V was attempted over 100MB Ethernet speed. Once we start getting above error , I decided to do some googling around web and found posting into Citrix form and found that someone else also got that error .
As per posting registry file for software was around 66MB.

I decided to perform one more attempt on local drive instead of network drive. This time it was successful in conversion  but during OVF import it failed with some network related error

  


Source is F:\Xenconvert\GUREHDB02.ovf.
Destination is 10.152.43.50.
OVF to XenServer started at Friday, July 09, 2010 00:43:53
Validating OVF Package...
FWD: Warning:2010.7.9.0.43.54,209: Disk linkage [File to RASD] does not exist: GUREHDB02.pvp
OVF Package is valid.
Importing OVF Package...
FWD: Debug:2010.7.9.0.43.55,943: OVF.FindSystemIds completed, 1 found
FWD: Debug:2010.7.9.0.43.56,803: OVF.FindRasdByType completed, 1 found
FWD: Debug:2010.7.9.0.43.56,803: OVF.FindRasdByType completed, 1 found
FWD: Debug:2010.7.9.0.43.57,365: Import.Process: DefineSystem completed (GUREHDB02)
FWD: Debug:2010.7.9.0.43.57,412: Import.SetIfDeviceIsBootable: Using HostResource to find Disk
FWD: Debug:2010.7.9.0.43.57,584: Found file GUREHDB02.vhd using VhdStream
FWD: Debug:2010.7.9.0.43.57,740: Import.UploadRawVDI Enter
FWD: Debug:2010.7.9.0.43.57,740: Import.UpdoadRadVDI SRUUID: a779a980-adb7-8474-91ad-65dc9f7a4089
FWD: Debug:2010.7.9.0.43.57,740: Import.UpdoadRadVDI Label: GUREHDB02
FWD: Debug:2010.7.9.0.43.57,740: Import.UpdoadRadVDI Capacity: 26601324544
FWD: Debug:2010.7.9.0.43.59,693: Import.UploadRawVDI::VDI Created
FWD: Debug:2010.7.9.0.43.59,709: Connect To: 10.152.43.50:80
FWD: Debug:2010.7.9.0.43.59,725: Request: PUT /import_raw_vdi?session_id=OpaqueRef:33e1b06e-7526-3241-9070-7a7e2c60b526&task_id=OpaqueRef:f935cd8f-1604-4d99-822b-0771bc936273&vdi=OpaqueRef:4c0e5b86-4d82-460f-3d53-45d355331834 http:/1.0

FWD: Debug:2010.7.9.0.43.59,787: 200 OK
FWD: Error:2010.7.9.0.44.50,521: OVF.Tools.Http.SendData FAILED Unable to write data to the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
FWD: Error:2010.7.9.0.44.50,802: OVF.Tools.Http.Put: Exception: System.IO.IOException: Unable to write data to the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at XenOvfTransport.Http.SendData(Stream http, Stream filestream, String p2vUri, Int64 filesize)
at XenOvfTransport.Http.Put(Stream readstream, Uri serverUri, String p2vUri, NameValueCollection headers, Int64 offset, Int64 filesize, Boolean isChunked)
FWD: Error:2010.7.9.0.44.50,802: Import.UploadRawVDI Http.Put FAILED Unable to write data to the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
FWD: Error:2010.7.9.0.44.50,802: Import.RemoveVDI: Something went wrong deleting associated VDI
FWD: Error:2010.7.9.0.44.50,943: Import.RemoveVDI FAILED VDI_IN_USE, Auto delete failed, manual deletion of storage entry required.
FWD: Error:2010.7.9.0.44.50,943: Import.ImportFileProc::Exception VDI_IN_USE
FWD: Debug:2010.7.9.0.44.50,943: Import.ImportFileProc (worker thread) completed
FWD: Debug:2010.7.9.0.44.50,943: Import.AddResourceSettingData, recevied autoevent, continuing
FWD: Error:2010.7.9.0.44.50,943: Import.AddResourceSettingData, Failed on import, remove vm.
ImportFile failed
Failed to import the OVF Package.
OVF to XenServer stopped at Friday, July 09, 2010 00:44:51
Physical to XenServer stopped at Friday, July 09, 2010 00:44:51


This gives us enough reason to look at network side. We decided to use Arconis and copy the file over CISF share. During copy it failed with error “Path to Deep”.  Network team looked at error on Switch side and  also setting was done to 100MB while host side it was set to “AUTO”.

In general host side and switch side setting should be the same. Setting was changed and we reran XenConvert tool to import OVF and it was successful.





Friday, July 9, 2010

Streamed OS using PVS: Users unable to login to Domain

Physical machine were successfully streamed via Provisioning server 5.6 but while logging into domain it won’t allow. To make this work one setting need to be on PVS console on that vDisk file under store

clip_image002

Until you make this setting , use will not be able to login to domain.

Monday, June 28, 2010

Service start for Citrix PVS Soap Service Failed (0x41d)

During PVS 5.6 configure wizard it throws the error ”Service start for Citrix PVS Soap Service Failed (0x41d)”

clip_image002

Make sure that you follow below two steps and reboot the PVS server .

First change

Make changes in registry hives as shown below

clip_image004

Download subinacl from MS site  and assign permission to following service as shown below

clip_image006

.NET 2.0 SP1 install throw error code is 2711 with XenConvert Install

During XenConvert install it ask for .NET 2.0 SP1 as explained in following posting. During .NET install it will throw following error “The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2711

This happen because .NET 2.0 SP1 installation got corrupted. Make sure you run repair for earlier install of .NET from "Add Remove Windows Components"  . It will ask for rolling out the earlier .NET SP1 accept it

Rerun the .NET 2.0 SP1 install and it will work

Friday, June 25, 2010

Deep dive: P2V using Xen Convert

Prerequisite:

These steps to be followed on target physical or virtual machine

1. Disable /Manual all unwanted services like :

a. Anti Virus

b. DB services

c. Monitoring services

d. H/W services like Dell open manage/HP SIM

e. Application related services

2. Enable Windows Automount on Windows Server operating systems : On Target Physical machine run diskpart

clip_image002

3. Disable Windows Autoplay: start > run > gpedit.msc

clip_image004

4. Remove any virtualization software before performing a conversion.

5. Make sure you have identified space to store P2Ved machine .

Startup P2V process:

Install the Client

1. Make sure you have enough downtime for physical machine as this process will reboot machine.

2. Make sure if .Net FRM 2.0 and above is installed or else when XenConvert tool is run then it will thrown following message

clip_image006

3. Accept License agreement to install the XenConvert

clip_image008

4. Select Next

clip_image010

5. Provide the location for XC install

clip_image012

6. Select next and proceed with installation

clip_image014

7. This will finish installation of XC on Target Virtual or Physical machine

clip_image016

Start of P2V process

1. Lunch the XC client from physical or virtual machine . This will detect the host machine and as a target select “XenServer” so that it will import directly to the XenServer.

clip_image018

2. Here you can select the volume which you are targeting to P2V and also reduce the free space on the selected disk. What it mean is if you want to reduce the HD size you can specify less space. Also I would suggest incase if the other drive size is bigger then use NT backup and NT restore which will be shown in Backup and restore section.

clip_image020

3. Here type pool master IP address. Under “workspace” you should have sufficient space to store VHD file which get created from XC. It is always advisable to store locally if you have space but incase space is not there then we have to store on CIFS.

 clip_image022

4. This will the machine name with which it will get imported.

 clip_image024

5. Make sure you check this option to generate log for further troubleshooting

clip_image026

6. After this stage it start converting the physical disk

 clip_image028

7. Once the drive is converted then it start importing the OVF file. This process takes longer time since it connects to the XenServer to import the VHD file. This will sit at three level which shown below and give it ample time to finish.

 clip_image030

8. If everything is fine then you will get below message

 clip_image032

9. If the import option keeps failing then we have other way to import it.

ARCONIS VHD to XEN

NOTE : Only if you have tested above method and failed couple of time.

1. Download vhd2xen from http://download.acronis.com/vhd2xen.i686

2. WINSCP to the XenServer and copy the file to /tmp and change persmission

Chmod 777 vhd2xen.i686

3. Then install it using ./ vhd2xen.i686. This will get installed under

cd /usr/lib/Acronis/VHD2XEN/

4. This is the way to execute the application

[root@blrehcxen04 VHD2XEN]# /usr/lib/Acronis/VHD2XEN/vhd2xen.sh

Copyright (C) Acronis, 2000-2008.

All rights reserved.

VHD to XEN converter

Usage: /usr/lib/Acronis/VHD2XEN/vhd2xen.sh [vhd image filename]

5. Then mount the CIFS share on XenServer using following command

[root@blrehcxen04 VHD2XEN]# mkdir /mnt/shared

[root@blrehcxen04 VHD2XEN]# mount.cifs //10.150.45.136/Backup/Category-B/Computing/Xen_new /mnt/shared -o username=<Username>

Password:

[root@blrehcxen04 VHD2XEN]# cd /mnt/shared

[root@blrehcxen04 shared]# ls

BLREHWS01.ovf BLREHWS01.pvp BLREHWS01.vhd ovf

[root@blrehcxen04 shared]# /usr/lib/Acronis/VHD2XEN/vhd2xen.sh /mnt/shared/BLREHWS01.vhd

6. Once it executed it will follow with following message to complete

VHD to XEN converter

Select the storage repository to import VHD file to:

1. 4c61c015-2dda-4431-6c18-760fa022c8e8 - DellMD3000i-2... (local)

2. 96f15418-481f-8829-c557-7bb8359324ab - DellMD3000i-1... (local)

3. 438598af-3c75-1df8-6f5e-1a33809e4224 - Removable... (unknown)

4. c5dfe98d-887f-bce0-884e-4d67a903d485 - blrehcxen02... (local)

5. cab71f58-cf24-3753-81bb-a6e93ca046b1 - DVD... (unknown)

6. 91065302-ccb2-4c00-344e-a368ff251ddd - DellMD3000i-3... (local)

7. f3ef3fc1-8848-a147-7252-4365331b83d9 - CIFS... (unknown)

8. c15d2233-a72d-9d08-f588-fb2b7258de4d - XenServer... (unknown)

9. 5bcd7f08-1eef-9c9b-ea2a-31baf804674e - DVD... (unknown)

10. c94a80a0-1fe4-1ee8-92c6-ff8597a09734 - blrehcxen01... (local)

11. b386c81e-8809-b894-4080-ebee08e8d76f - ISO... (unknown)

12. c32b54bd-6d1c-2222-25da-0f98aeaf1be1 - Removable... (unknown)

13. e837d730-6ed5-bf77-c01f-da637d5d6152 - DVD... (unknown)

14. 5e22f942-1351-e46e-ffcf-479c6c98aa1c - blrehcxen03... (local)

15. 326bb687-5f4a-c99f-ce93-52f8ac855632 - Removable... (unknown)

16. daab79c3-3081-294b-6811-f6d605d76f65 - DellMD3000i-4... (local)

17. a97ab909-bbfe-ebfc-2763-a2f1dbcf3df9 - Local... (local)

18. cd83bf64-3d6b-38a1-1596-be2bee872986 - Removable... (unknown)

19. af2f2e50-7c39-cdf3-b76b-45ecb27207e0 - DVD... (unknown)

16

A VHD file must be decompressed before importing to an internal

storage. You need about 136Gb free space to save the raw

uncompressed image and write permissions in the location where

the original VHD file is stored.

Enter XEN name for imported disk:

BLREHWS01

Importing may take a long time depending on vhd size.

Conversion done, importing to XEN...

Once this import is connected then you will find drive under SR. Create a dummy VM and attach this disk to VM. Boot the VM and proceed with Post build process

POST BUILD Process:

1. Before you power on the VM make sure your it is disconnected from n/w as your production might be up.

2. Login to the VM using local credential and uninstall hidden driver

a. Set the path as shown below

clip_image034

b. Now it will show hidden driver , uninstall all of them

clip_image036

3. Now before you reboot make sure all theH/W related software is uninstalled

clip_image038

4. Now after every unwanted s/w is uninstalled then reboot the VM and continue with Xen Tool install.

Reading XenConvert log:

1. Here it start the conversion after formatting the drive

clip_image040

2. Here the conversion is over and start with OVF conversion

clip_image042

3. Here it choose the OVF file from local workspace

clip_image044

4. Once it start importing the OVF file and process is successful then you will get following message. Not that there is a time when there will be no update on log file as shown below

clip_image046

Backup and Restore Process:

Backup:

1. Perform the backup of drive which was not part of P2V and run ntbackup from start -> run -> ntbackup

2. It will start in wizard mode

clip_image048

3. Select backup and setting as shown below

clip_image050

4. Select the option as you will backing up selected drive

clip_image052

5. Select the volume which needs to be imported. One thing should be remembered is the stop all the services other than windows service.clip_image054

6. This backup needs space to store the backup file . So select the space where there are enough space.

 clip_image056

7. Click on finish to start the backup.

 clip_image058

8. Sit tight and let it finish .

clip_image060

Restore:

1. Before you start performing restore, target drive should have been created on VM . To create a new store select storage tab of VM and then select “Add”. Type the “Name” and then specify the size. Make sure you select the appropriate size. Based on storage which have free space create a new disk drive

clip_image062

2. Once the drive is create login to VM with local admin and password. Make sure that there is no

network connectivity to VM if the PROD physical or virtual machine is powered on. Once logged in run diskmgmt.msc from start - > run and then select the drive which has to be formatted. Once formatted we are ready with the restore. We should mount or map the shared store where the backup .bkf file is stored. We have to run ntbackup wizard again select restore

clip_image064

3. Browse and select the .Bkf file and then select the entire drive

clip_image066

4. Click on advance

clip_image068

5. While choosing location select alternate location as we are going to store on different drive

clip_image070

6. Select next and leave the option as it is

clip_image072

7. This is very important option or else application will not work .This must be selected.

clip_image074

8. Sit tight and let this restore finish. Once the restore is finished then reverse back the status of all the services which has been set to manual to Automatic. Once rebooted I bet the application will be up and running

clip_image076