When you resize the wrong hard disk on a vm

I’m running WSUS on a 2012R2 server and the drive where the updates are tends to grow a lot. On this VM, I increased the provisioned size of the c:\ drive and not the  drive where the updates reside. I didn’t notice I’d touched the wrong disk until I’d rescanned the disks on the VM and saw what I’d done.

260gbdrive

 

As panic set in, I changed the provisioned size back to 60GB (I know, I know) and well, you know the rest. This article saved me today. I didn’t want to restore the VM unless I really had no choice, this did the trick.

wrongdisk

Power off the VM and identify the host & datastore that the VM resided on, I enabled SSH and browsed to the VM location.

Cat out the descriptor file  (vmname.vmdk) that outlines the data layout on the virtual disk. In the Extend Description section, you’ll see the extent(s) info. Next to RW (if it’s read/write) a number. That number represents the size of the vmdk in sectors, with the additional 200GB included.

extentsize

To change the sector size to reflect the value I’m shrinking the drive back down to, 60GB, calculate it:

60GB = 60 * 1024 * 1024 * 1024 / 512 = 125829120 sectors

Edit the descriptor file and change the sectors to the new number, save and exit.

newsectorsize.png

Come out of the directory where the VM resides and VMotion  it to another datastore. Review the settings of the vm and take note of the new and improved disk size.

newsize.png

Power on the VM and review the size in Disk Management.

diskmgnt

Now, grow the right disk and try not to ever do that again.

 

Error Applying Security- Access is Denied

Windows server administration is not without those DOH! moments. How is it that I, the administrator cannot change the permissions on a folder?

Access Denied Message

I will not be denied

The easiest way to fix this is to take ownership of the folder using the TAKEOWN command. Takeown is a tool that will allow an administrator to recover access to a file or folder that was denied by reassigning ownership. Open the command prompt and run as administrator.

takeown /f F:\FolderName /r /d y

/f  Specify the file name or directory

/r Recurse through all directories and sub directories

/d  Prompt with an answer of Yes

Now you can change the permissions as needed.

Windows Security Prompt

That’s more like it

Error when running WSUS post-installation task

I have a newly installed Windows 2012 R2 server and I just added the Windows Server Update Service role. After the install completed, I launched the post-installation task.

Launch Post-Installation Tasks

The post install configuration failed. I reviewed the .tmp file to see what actually caused the task to fail.

CreateDefaultSubscription failed. Exception: System.Data.SqlClient.SqlException (0x80131904): Login failed for user USERID

Post-deployment Configuration

Details of failed task

tmplog

The user is the computer name of the WSUS server.

domain\servername$

I launched SQL Management Studio and located the user referenced in the log file.

After looking at the roles assigned to that database user, I then checked the SYSADMIN server role members and noticed the user mentioned is not listed.

databaseuser1

I added the computer name as a member and re-ran the post-installation task.

serverrollproperties

 That did the trick and the post deployment configuration completed without error.

configcomplete

*note*

I’m still testing to see if I can assign the computer a more restricted role other than sysadmin, and I haven’t found any documentation on it, but I’ll keep searching. Maybe I’ll tweet Lawrence Garvin.

Deprecated VMFS volumes found on the host Warning on ESXi after adding a datastore with Dell VSM

I’m running ESXi version 6.1 U1 and Dell Virtual Storage Manager  (VSM)version 4.5.2.974. I added a datastore to  the cluster using VSM and on 2 of my hosts I got the following alert:

vsmversion

deprecatedvmfs

Enables SSH on the host and check out the logs.

In /var/log/hostd.log , I found the error:

 

 warning hostd[xXxXxX] [Originator@6876 sub=Hostsvc.DatastoreSystem opID=123456-789-abc-def user=vpxuser] UpdateConfigIssues: Deprecated VMFS filesystems detected. These volumes should be upgraded to the latest version.

When I created the datastore, I did select VMFS 5, so I wasn’t sure why this error appeared.

selectedvmfs5

According to vmware KB2109735, this is a known issue in version 6.0 and there is no resolution. Just restart the management services and the message goes away.

 

#  /etc/init.d/hostd restart
#  /etc/init.d/vpxa restart

Then the message goes away.

 

*note*

This only happens to me when I create a datastore with VSM. If I present a disk from my array, set up the iSCSI connections and rescan, I don’t get this message. Your mileage may vary.

User Powershell to test a password

Sometimes you need to test to make sure you’re entering the correct the right password. Be it a service account while installing a app or testing a password reset.

The start-process cmdlet is used to start one or more processes on a local computer. Get-Credential gets an object based on username and password. Use it to open an application and test the credentials.

Open a Powershell prompt:

start-process notepad.exe -credential (Get-Credential acme\johnquser)

start-process

Enter the credentials you’re trying to test. If you’re correct, notepad will open.

enterpassword

notepad

If not, a password reset is in order.

 

 

When .NET wants to be 4.5.2

Someone in the application group said that they wanted .NET downgraded from 4.5.2 to 4.51. I did as I was asked and then in the next few days, I got another call telling me that 4.5.2 was back.  The application they are running is not supported in 4.5.2.

This system isn’t managed by WSUS so Windows update did what it was designed to do.

Here is a link to block the update of .NET to 4.5.2:

How to temporarily block the installation of the .NET Framework 4.5.2

Be sure to backup the registry before you begin.

Browse to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\

Add a new Key called WU, then add a new DWORD value named BlockNetFramework452
Modify it and set it to 1.
Exit the registry.