Tuesday, November 15, 2011

Unable to Delete File - Could Not Find this Item Error

So apparently Windows has difficulty deleting 0 byte files. If you ever try to delete a folder and get the following error "Could not find this item. This is no longer located in \\. Verify the item's location and try again" check the size.


If the file size is 0 bytes you might need to do the following:


1. Open an elevated command prompt (Right click on Command Prompt > Run As Administrator)


2. Use rmdir /S to delete the entire folder


3. There is probably a way to delete the files individually but I tried a couple and none of them worked.

Tuesday, October 4, 2011

Changing VMware ESX Path Selection Plugin with PowerCLI

It is really quite easy to modify your Path Selection Plugin on VMware ESX using the vSphere PowerCLI which is very useful if you have to modify several hosts. In the below example I am just connecting to a single ESX 5.0 host but you can connect to a vSphere server instead.

1. Connect to the ESX server (Connect-VIServer 10.25.62.65)
2. Check your current PSP (Get-ScsiLun)
3. Change PSP to RoundRobin, MostRecentlyUsed or Fixed (Get-ScsiLun Set_ScsiLun -MultipathPolicy RoundRobin)





If you are interested in what policy to use there is a great article by one of my co-workers about it at

http://bsmith9999.blogspot.com/2011/10/storage-path-selection-policy-choices.html



Tuesday, August 9, 2011

Unable to run Installer on Windows Server

If you ever run an installer and get the following message "Windows cannot access the specified device, path, or file. You may not have the appropiate permission to access the item" try the below. Note: I am assuming that you already have rights...


1. Copy the file to your local machine

2. Right click on the file and go to Properties.

3. Down at the bottom of the General tab you might see a Security option that says "This file came from another computer and might be blocked to help protect this computer."

4. Click Unblock.




Thursday, August 4, 2011

Creating Windows Event Log Events

We use VMware vCenter Configuration Manager at our site to monitor our Windows servers for signs of future problems by searching the Windows Event Logs for a predefined list of events. Every once in a while (especially after a while without alerts) you want to test and make sure that everything is indeed being monitored properly. To do this I needed to inject an event into the Event Log and see if we received an alert in VCM. The question was this: how do I impersonate an existing service? The built in eventcreate.exe will not let you add events for a source that already exists, which is exactly what I want to do... Ah, I love it when people have already coded an application to do something that I need to do and save me from having to write it myself.

Meet eventcreate2.exe: http://code.google.com/p/eventcreate2/

Eventcreate2.exe has one flaw, you cannot specify a remote machine; as opposed to the built in eventcreate.exe which does let you specify remote machines. Other than that it is awesome. Using a command like the below I was able to successfully inject events impersonating an existing service and verify that our alerting was indeed working as advertised.

eventcreate2.exe /L Application /T Warning /SO dmboot /ID 2 /D "This is a test Windows RAID Failure Alert"

Monday, August 1, 2011

VMware VDR Service Did not Start Up

I recently ran into an issue after replacing my VDR (now VCDR) Appliance from version 1.2 to 2.0 and ran into a very misleading error that can cause confusion. A week after installing the VCDR Appliance I tried to connect to it using the vSphere Client on my laptop and was greeted with the following error: "Error: The Data Recovery service did not start up. If the problem persists, please restart or redeploy the Data Recovery appliance."




Restarting the appliance does not change the error message and I was worried it was dead but thankfully after doing some digging in the log files I discovered a very interesting error: "UnixResponder: Respond: Rejecting non-SSL connection from client 10.25.43.72 (socket 40)".


Turns out the problem was something really quite simple. The reason for this behavior was I had the 1.2 version of the VDR Plugin installed on my laptop. Apparently it can sort of talk to the new version 2.0 appliance but not enough to work. All you need to do is uninstall the old 1.2 version of the VDR plugin via Add and Remove Programs and install the new version 2.0 plugin.

Thursday, March 24, 2011

Problem with MacBook Pro and Seagate Momentus XT Hybrid Drive

I just tried to drop a mac image onto a brand new Seagate Momentus XT hybrid drive using a process that has worked on other drives hundreds of times. This time however I ran into issues. After using the Restore feature and rebooting I got the dreaded blinking folder with a question mark. I tried 2 different MBP's as well as 2 different drives, same issue. Tried scanning and repairing the drive to no avail. Finally I dropped in the original Mac OS X DVD and tried to load it manually. When I did that I ran into a nice little error of "Mac OS X Cannot Start Up From This Disk". No additional information, gee thanks. Doing a bit of googling I ran across an article from Apple saying that this error is caused by a partitioning problem. The drive check reported that it was a-ok but at this point I was willing to give it a shot. So, I went back into the mac tools, deleted all partitions on the Seagate drive and created 1 new partition at 495GB. Then I attempted the restore to that partition I had manually created and it worked. I don't know what it is about these drives but it was the same issue for both and I have never seen that issue on other drives. After that however it seems to be working great.

Wednesday, March 2, 2011

Unable to Disable Bluetooth Radio

I ran into an interesting issue yesterday where a user needed to disable his bluetooth radio on a bootcamped Apple MacBookPro but the disable option was greyed out in Mac OS X and under the device manager in Windows it was missing. The easy answer is that you cannot disable the radio if you have devices bound to it. Delete any existing device bindings and then you can disable the radio.

Tuesday, February 22, 2011

SQL Management Studio 2005 Express x64 Install Fails

On one of my Windows Server 2008 x64 boxes running SQL 2005 Express I ran into a situation where I needed to install the Management Studio. After downloading and running the installer from Microsoft's site I got the following error:

"This installer has encountered an unexpected error installing this package. This may indicate a problem with the package. The error code is 29506."

I tried re-downloading the package and changing what was getting installed and even modifying the install directory to no avail. Finally I noticed that it was failing on the step "Setting File Security". After noticing that I went and set the UAC to the lowest possible settings and it installed correctly. Looks like the UAC does not like that installer for some reason...

Friday, February 18, 2011

XP Make Available Offline Fails with Access is Denied

If you have permissions to the folders and files you probably need to give the user read access to the root directory of the share. Example:

\\server1.walker.dps\shares$\myshare

User will need Read permissions to the shares$ share. You can set it to Read and that folder only for security purposes.

RHEL 2.1 P2V Fails at 99%

I have a physical RHEL 2.1 box that I am trying to P2V to an ESXi host using the VMware vCenter Converter Standalone 4.3 app and it is failing at 98% and 99%. The log is showing the following errors:

[#2] [2011-02-11 16:45:39.209 07840 info 'task-1'] Worker CloneTask updates, state: 1, percentage: 98, xfer rate (Bps): 8817664
[#2] [2011-02-11 16:46:04.379 05412 info 'task-2'] Remote Helper VM is reconfiguring, data clone is finished
[#2] [2011-02-11 16:46:04.379 05412 info 'task-2'] Volume-based cloning dlinux5.XX.XXX--> dlinux5 updates, state: 1, percentage: 99, xfer rate (Bps): 8817664
[#2] [2011-02-11 16:46:04.379 05412 info 'task-2'] CloneTask updates, state: 1, percentage: 99, xfer rate (Bps): 8817664
[#2] [2011-02-11 16:46:04.379 07840 info 'task-1'] WorkerCloneTask: Remote Helper VM is reconfiguring, data clone is finished
[#2] [2011-02-11 16:46:04.379 07840 info 'task-1'] Worker CloneTask updates, state: 1, percentage: 99, xfer rate (Bps): 8817664
[#2] [2011-02-11 16:46:16.489 05412 info 'task-2'] Volume-based cloning dlinux5.XX.XXX--> dlinux5 updates, state: 4, percentage: 99, xfer rate (Bps): 8817664
[#2] [2011-02-11 16:46:16.489 05412 info 'task-2'] Generating helperVM task bundle for task with id="task-1".
[#2] [2011-02-11 16:46:16.519 05412 info 'task-2'] Retrieving helper VM log bundle to "C:\Windows\TEMP\vmware-temp\vmware-SYSTEM\helperVM-task-1-sljnzvkf.zip".
[#2] [2011-02-11 16:46:16.619 05412 info 'task-2'] Bundle successfully retrieved to "C:\Windows\TEMP\vmware-temp\vmware-SYSTEM\helperVM-task-1-sljnzvkf.zip".
[#2] [2011-02-11 16:46:16.619 05412 info 'task-2'] powering off vm after linux p2v ...
[#2] [2011-02-11 16:46:16.619 05412 info 'task-2'] Reusing existing VIM connection to XXXXXXesx2.XX.XXX
[#2] [2011-02-11 16:46:18.099 05412 info 'task-2'] power off vm succeeded
[#2] [2011-02-11 16:46:18.099 05412 info 'task-2'] Reusing existing VIM connection to XXXXXXesx2.XX.XXX
[#2] [2011-02-11 16:46:18.579 05412 info 'task-2'] successfully reconfigured target vm
[#2] [2011-02-11 16:46:18.579 05412 info 'task-2'] CloneTask updates, state: 4, percentage: 99, xfer rate (Bps): 8817664
[#2] [2011-02-11 16:46:18.579 05412 info 'task-2'] CloneTask failed
[#2] [2011-02-11 16:46:18.579 05412 error 'App'] Task failed:

And earlier in the log:
#2] [2011-02-11 15:44:34.036 05412 error 'App'] Found dangling SSL error: [0] error:00000001:lib(0):func(0):reason(1)

And again:
[#1] [2011-02-11 15:43:08.256 03284 info 'App'] [,0] Partition:Invalid sector magic number.
[#1] [2011-02-11 15:43:08.266 03284 info 'App'] [,0] Disk number 1 has been skipped because of errors while reading partition table
[#1] [2011-02-11 15:43:08.276 03284 info 'App'] [,0] Partition:Invalid sector magic number.
[#1] [2011-02-11 15:43:08.276 03284 info 'App'] [,0] Disk number 2 has been skipped because of errors while reading partition table
[#1] [2011-02-11 15:43:08.276 03284 info 'App'] [,0] Partition:Invalid sector magic number.
[#1] [2011-02-11 15:43:08.276 03284 info 'App'] [,0] Disk number 1 has been skipped because of errors while reading dynamic disks header or LDM database is corrupted
[#1] [2011-02-11 15:43:08.276 03284 info 'App'] [,0] Partition:Invalid sector magic number.
[#1] [2011-02-11 15:43:08.276 03284 info 'App'] [,0] Disk number 2 has been skipped because of errors while reading dynamic disks header or LDM database is corrupted
[#1] [2011-02-11 15:43:08.286 03284 info 'App'] [,0] Partition:Invalid sector magic number.
[#1] [2011-02-11 15:43:08.296 03284 info 'App'] [,0] Partition:Invalid sector magic number.
[#1] [2011-02-11 15:43:08.296 03284 warning 'App'] [MoveActiveDiskIfNeeded] GetFirstBootDisk failed, mntapi error: 176

The great thing about having a VM is that you can snapshot it. DO IT. I destroyed around a dozen copies of my VM playing with this trying to get it right.

I have already manually run an fsck against the physical machine before the P2V attempts so I am not sure what is wrong but when I attempt to power up the virtual machine I get a nice “Error Loading Operating System”. Looks like a bootloader issue, possibly when the VM Reconfiguration Job was going something bad happened. No worries, I just dropped in a Fedora 13 DVD and selected the “Rescue Installed System” option. Follow the prompts (networking not required) and then “chroot /mnt/sysimage”. From here I can see the data on my VM and it all looks good. Now I go to /boot/grub and notice that I only have 4 files:
1. Grub.conf
2. Device.map
3. Menu.1sl
4. Splash.xpm.gz
Looks like the boot loader files are gone. Now I need to somehow recreate them. To do this you need to do the following. First, figure out what your partitions look like using the “fdisk –l” command. Then using that information open grub by typing “grub”.

Once inside the grub shell type in “root” and if you have the same issue that I had you should see the following returned value: “(fd0) : filesystem type unknown, partition type 0x0” We need to change that to our existing boot partition which in most cases is ‘hd0,0’. To do that type in “root (hd0,0)” and hit enter. If you get lost you can hit tab to see your options. From there you need to execute the changes by typing “setup (hd0,0)”. You should see it execute and give some output. After it is complete you can “quit” and then do an “ls” on the /boot/grub directory and you should see that grub has added several files.

Now you might need to convert the linux configuration from IDE to SCSI based. To do this you need to modify all entries that are “hdXY” where X is a letter starting with a and Y is a number starting with 1. You need to modify these to become sdXY. As an example hda1 becomes sda1. You need to do this in the following files:
1. /boot/grub.conf
2. /boot/device.map
3. /etc/fstab
Note: for some weird reason your 2nd drive’s partitions may show up as in the /etc/fstab as hdc1 instead on hdb1 as I would have expected. This will cause errors upon boot if you don’t change that to sdb1 instead of sdc1. Not sure what causes that initial value to be wrong.

Now you need to add scsi support. Open the /etc/modules.conf file and edit the following things:
Find ‘alias ethX module’ entires and replace the value of the module to “pcnet32”. This is the network adapter that you will be using in ESX(i).
Now find ‘alias scsi_hostadapter’ and if it does not exist add the following:
alias scsi_hostadapter BusLogic
For multiple controllers I assume you would have to add another line per controller like:
“alias scsi_hostadapter1 BusLogic”

After this you need to rebuild the ramdisk image. Locate the .img file in the /boot directory and make a note of the file name. Now you want to run the following command:
Mkinitrd –v –f /boot/initrd-X.X.X-Y.X.X.img X.X.X-Y.X.X where the X and Y symbolize the actual values on your system. For mine the actual command was
mkinitrd –v –f /boot/initrd-2.4.9.0-e.34.img 2.4.9.0-e.34
After that runs you should be able to reboot and it should work.

Thanks to everybody who posted bits and pieces of the fixes on various blogs and papers. Hope this helps somebody else so you don't have to do all the research and tweaking that I did.

Monday, February 7, 2011

Bind DNS on CentOS 5

Here is my quick and dirty cheatsheet on how to get bind working on CentOS5.
1. Make sure that iptables is not blocking your DNS queries ("service iptables stop" will disable the firewall)
2. Install Bind "yum install bind*"
3. Copy example configs to working directories:
a. "cp /usr/share/doc/bind-x.x.x/sample/etc /var/named/chroot/etc"
b. "cp /usr/share/doc/bind-x.x.x/sample/var /var/named/chroot/var/named"
4. Modify the named.conf in /var/named/chroot/etc and remove the un-needed views (I only need the internal view)
5. Modify the named.conf to have the correct zone information
6. Run /usr/sbin/dns-keygen and copy the generated key to the named.conf file under the ddns_key section.
7. Copy your my.internal.zone.db from /var/named/chroot/var/named or rename it to your correct zone name
8. Add your A records to the new zone.db file
9. Automatically start bind on boot
a. chkconfig named --add
b. chkconfig on level 2,3,4,5

Transparent Windows Command Prompt

So one of the things that I really wished Windows 7 had was a transparent command prompt. I have been using it on Linux and gotten spoiled having it. Today I found one at http://www.askvg.com/get-glass-cmd-command-prompt-in-windows-vista-and-7/ that seems to work pretty well on Windows 7 x64.