Friday, February 26, 2010

Recreate vmdk files for stuffed/corrupted VMs

Below is the command to monitor any processes on the vm

ps -auxwww |grep -i .vmx ( KAD says )



________________sample vmdk file________________

FIRST VMDK FILE CREATED ->

# Disk DescriptorFile
version=1
CID=e77e6a48
parentCID=ffffffff
createType="vmfs"

# Extent description
RW 52454274 (GEt this by dividing flat vmdk size value with 512) VMFS "TST-DB01-flat.vmdk"

# The Disk Data Base
#DDB

ddb.adapterType = "buslogic"
ddb.geometry.sectors = "63"
ddb.geometry.heads = "255" (if flat file bigger then 2 gb)
ddb.geometry.cylinders = "3265" (Get this by dividing FLAT VMDK file size by 8225280
ddb.uuid = "60 00 C2 95 5b 34 57 49-ad 95 7c 96 81 c1 b0 f3"
ddb.toolsVersion = "7302"
ddb.virtualHWVersion = "4"


_______VMDK desc file of a snapshot of the vm_______________

# Disk DescriptorFile
version=1
CID=7dec0e38
parentCID=e77e6a48 (need to chain it with parent)
createType="vmfsSparse"
parentFileNameHint="PDC-TST-DB01.vmdk" (this should be the desc file not flat file)
# Extent description
RW 52454274 VMFSSPARSE "PDC-TST-DB01-000001-delta.vmdk"

# The Disk Data Base
#DDB

____________________________END OF FILE______________________________

VMX file of the above machine, Notice it has two disks mentioned below, but i havent put the vmdk for the second disk
____________________________________


#!/usr/bin/vmware
config.version = "8"
virtualHW.version = "4"
floppy0.present = "false"
nvram = "PDC-TST-DB01.nvram"
deploymentPlatform = "windows"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "manual"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.suspend = "default"
powerType.reset = "default"

displayName = "PDC-TST-DB01"
extendedConfigFile = "PDC-TST-DB01.vmxf"

scsi0.present = "true"
scsi0.sharedBus = "none"
memsize = "1024"
scsi0:0.present = "true"
scsi0:0.fileName = "PDC-TST-DB01-000001.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
sched.scsi0:0.shares = "normal"
scsi0:1.present = "true"
scsi0:1.fileName = "PDC-TST-DB01_1-000001.vmdk"
scsi0:1.deviceType = "scsi-hardDisk"
sched.scsi0:1.shares = "normal"
ide0:0.present = "true"
ide0:0.fileName = "/dev/scd0"
ide0:0.deviceType = "atapi-cdrom"
ethernet0.present = "true"
ethernet0.wakeOnPcktRcv = "false"
ethernet0.networkName = "PROTECTED"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:50:56:a5:39:c6"
guestOS = "winnetstandard"
uuid.bios = "50 25 c5 2f 02 02 71 ec-bf 14 72 2e f9 39 df 77"
log.fileName = "vmware.log"
snapshot.action = "keep"
sched.cpu.min = "0"
sched.cpu.units = "mhz"
sched.cpu.shares = "normal"
sched.mem.minsize = "0"
sched.mem.shares = "normal"

scsi0:0.redo = ""
scsi0:1.redo = ""
vmware.tools.requiredversion = "7302"
dMotion.enabled = "FALSE"

tools.syncTime = "FALSE"
uuid.location = "56 4d 37 d2 4d 30 08 fd-a0 18 c9 93 90 9a 28 a4"
migrate.hostlog = "./PDC-TST-DB01-07f9ca4f.hlog"
sched.mem.max = "1024"
sched.swap.derivedName = "/vmfs/volumes/488ad642-565ee789-4ece-001f2963b16a/PDC-TST-DB01/PDC-TST-DB01-07f9ca4f.vswp"
scsi0:0.DMotionParent = ""
scsi0:1.DMotionParent = ""

workingDir = "."

cpuid.1.ecx = "x----0----0--0-R-----------0-0--"
cpuid.1.ecx.amd = "x---------------------------0---"
cpuid.80000001.ecx.amd = "------------------00-00---------"
cpuid.80000001.edx = "----H---------------------------"
hostCPUID.0 = "0000000a756e65476c65746e49656e69"
guestCPUID.0 = "0000000a756e65476c65746e49656e69"
userCPUID.0 = "0000000a756e65476c65746e49656e69"
hostCPUID.1 = "0001067600040800000ce3bdbfebfbff"
guestCPUID.1 = "0001067800010800000822010febbbff"
userCPUID.1 = "0001067600040800000822010febbbff"
hostCPUID.80000001 = "00000000000000000000000120000000"
guestCPUID.80000001 = "00000000000000000000000120000000"
userCPUID.80000001 = "00000000000000000000000120000000"
evcCompatibilityMode = "FALSE"

scsi0:2.present = "false"
scsi0:2.fileName = "PDC-TST-DB01_2.vmdk"
scsi0:2.mode = "independent-persistent"
scsi0:2.deviceType = "scsi-hardDisk"

scsi0:2.redo = ""

Tuesday, February 23, 2010

Websense Policy server won't start

Called websense support after following everything on their support pages.

Had to take out 'WebsenseDb' account from the local admin group, bcos the websense policy database service was starting and stopping with the message that it had nothing to do.
After taking of the account from the local admin group, it remained in started mode.
Policy broker was started next,
Policy Server
Network agent,
user service
and the rest after that

Go figure...
Any explanation on how the about would make a different to the service would be great help.

Cheers
rahul

Monday, February 22, 2010

The SQL Server Agent (MSSQLSERVER) service on local computer started and then stopped

THIS worked for me.

Unable to start SQL Server Agent

We are unable to start SQL Server Agent. It was giving the following error when we were trying to start it from the services console


The SQL Server Agent (MSSQLSERVER) service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.

When we try to change the service account for SQL Server Agent we get the below error,

The process terminated unexpectedly. [0x8007042b]

Tried to start SQL Server Agent from the command prompt using:

SQLAGENT90 -C -V>C:\SQLAGENT.OUT

SQLAGENT.OUT:

Unable to rename C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLAGENT.OUT to C:\ProgramFiles\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLAGENT.1 (reason: The system cannot find the path specified)

2007-08-24 10:10:31 - ! [241] Startup error: Unable to initialize error reporting system (reason: The system cannot find the path specified)

2007-08-24 10:10:31 - ? [098] SQLServerAgent terminated (normally)

Resolution:

Checked the value of key ErrorLogFile in the following registry hive:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\SQLServerAgent

ErrorLogFile key had the below value:

C:\ProgramFiles\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLAGENT.out

However we did not had any such directory present on the machine. Also we did not had any SQLAgent log file.

Changed the value in the ErrorLogFile key to reflect the correct location of the log folder which was on a different drive.

After making the changes we were able to start the SQL Server Agent.