Tuesday, August 20, 2013

Upgrading from vCenter Server 4.1 to 5.0 fails with the Error: Exception Thrown while executing SQL script

Upgrading from vCenter Server 4.1 to 5.0 fails with the below error.
"Exception Thrown while executing SQL script"

In the %temp%\VCDatabaseUpgrade.txt log file, you see entries similar to:

[8/18/2013 5:55:27 AM] Error: Failed to execute command: if exists(select 1 from information_schema.columns
 where TABLE_NAME='VPX_HIST_STAT1'
 AND COLUMN_NAME='TIME_ID'
 AND DATA_TYPE='numeric')
 ALTER TABLE VPX_HIST_STAT1 ALTER COLUMN TIME_ID BIGINT NOT NULL;
[8/18/2013 5:55:27 AM] Got exception: ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]The index 'X_VPX_HIST_STAT1' is dependent on column 'TIME_ID'.
ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]ALTER TABLE ALTER COLUMN TIME_ID failed because one or more objects access this column.
[8/18/2013 5:55:27 AM] Error while upgrading: ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]The index 'X_VPX_HIST_STAT1' is dependent on column 'TIME_ID'.
ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]ALTER TABLE ALTER COLUMN TIME_ID failed because one or more objects access this column.
[8/18/2013 5:55:27 AM] Info: Exiting Upgrade Wizard
[8/18/2013 5:55:29 AM] Successfully run: alter database [VCDB] set recovery SIMPLE



This issue is documented in the VMware KB - 2011533

However the steps provided do not work since the resolution steps in the KB talk about dropping the index named 'INDX_TIME_ID'. In my case, the index was 'X_VPX_HIST_STAT1' and therefore I had to alter the commands accordingly.

DROP INDEX VPX_HIST_STAT1.X_VPX_HIST_STAT1

And most IMPORTANTLY, perform the steps mentioned in the above KB, after you restore the vCenter Database from a backup.
If you were to perform the steps on the same DB on which the upgrade failed, you will run into the issue mentioned in VMware kb 2020504

Thursday, August 15, 2013

VMware Converter - P2V of a physical server with multiple disks fails

I had the opportunity to work on a issue recently where the system administrator was trying to convert a physical server to a VM and the conversion was failing at the initial task of collecting the source machine details.

The default logs did not provide any information and therefore I went ahead and enabled verbose logging. Following this I was able to see the following in the logs.

2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] Mapping a recognized volume \\?\Volume{132d9331-1f9f-441f-a37d-1283440beccb}\ with ID \WindowsBitmapDriverVolumeId=[44-4D-49-4F-3A-49-44-3A-31-93-2D-13-9F-1F-1F-44-A3-7D-12-83-44-0B-EC-CB]
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [PopulateVolumeProperties] volume \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\  corresponds to \Device\HarddiskDmVolumes\Ampsv01960pjtDg0\Volume31 device name.
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [,0] error [Windisk_CheckNonFixedMediaDevice] Failed to retrieve media type for \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\: Incorrect function (1)
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [GetDriveLetterOrMountPoint] Mount point for volume \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\ is V:\TlogTW2\
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [,0] Info[Windisk_GetVolumeDeviceNumber]: IOCTL_GET_STORAGE_DEVICE_NUMBER for volume \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\ is not supported .... Trying NT method.
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [,0] Error[Windisk_GetVolumeDeviceNumber]:Failed to get \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\ Volume's disk number
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [,0] Info[Windisk_GetVolumePartitionInfo]:Number of disk extents is 6. Volume \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\ is a dynamic volume. No meaningful partition information can be associated with it
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [,0] Info[Windisk_GetVolumePartitionInfo]:Number of disk extents is 6. Volume \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\ is a dynamic volume. No meaningful partition information can be associated with it
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [PopulateVolumeProperties] Unable to get \\?\Volume{0b323bcd-7f6f-4473-9acf-7699b247f96e}\ volume's active flag info.
2013-08-06T13:48:32.561+02:00 [04248 verbose 'Default'] [GetVolumeProperties] finished
.

Checking the system revealed that it had nearly 120+ disks mounted from the SAN. Checking the VMware community did not show any maximums for the number of disks that can be connected to the source server that is being converted.
Anyways, we unmapped the SAN disks and then initiated the conversions which went ahead smoothly. This solution was acceptable to the user, luckily.

If anybody has any information on what is the maximum number of disks supported by VMware converter, please share the information.