Monday, April 25, 2011

Erasing the swapfile at shutdown in Windows

This article describes the registry modifications required to implement removal of the swapfile in a Windows OS at shutdown.
http://support.microsoft.com/kb/314834

It's just one registry key. Here's the relevant section from the kb article.
Change the data value of the ClearPageFileAtShutdown value in the following registry key to a value of 1:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
If the value does not exist, add the following value:
Value Name: ClearPageFileAtShutdown
Value Type: REG_DWORD
Value: 1



This is handy for when you can't be worried about moving it from place to place, like in a migration. Also can help when doing a Storage Migration; lots less data to move.

Thursday, April 21, 2011

How to control server power state via powershell

Here's a great link to some powershell commands to power off your server remotely. The regular powershell command stop-computer didn't really do it for me, but these do.

http://lantoolbox.com/news/shutdown-power-off-or-reboot-remote-computer-from-powershell/

Here's the command I use to shutdown bare metal UCS blads running Windows 2008 R2
 (gwmi win32_operatingsystem -ComputerName vplex-w2k8-3.cisco.com -Credential (Get-Credential Administrator)).win32shutdown(8)

The (8) at the end means power off, as opposed to just shutdown. When I try to just shutdown, it reboots and I'm back where I started.

Wednesday, April 20, 2011

Renaming SQL server's Windows server name

Many of us have been confronted with the problem of having to rename a Windows server that has a SQL server installed on it. We feared arcane procedures that would take time and not completely provide the desired effect, which is a Windows server with a new name and the SQL server still running.

It would seem Microsoft has heard our curses, um, prayers.

This article provides instructions on how to change the name of in SQL server after you change the name on Windows. It's for SQL 2008 R2, which mandates Windows Server 2008 R2, but it's definitely an advancement. Below is a clip of the relevant instructions.

Also, I just renamed a vCenter Server that runs SQL Server Express, and it had no problem at all! When did they fix that?



To rename a computer that hosts a stand-alone instance of SQL Server

  • For a renamed computer that hosts a default instance of SQL Server, run the following procedures:

    sp_dropserver <old_name>
    GO
    sp_addserver <new_name>, local
    GO
    
    Restart the instance of SQL Server.
  • For a renamed computer that hosts a named instance of SQL Server, run the following procedures:

    sp_dropserver <'old_name\instancename'>
    GO
    sp_addserver <'new_name\instancename'>, local
    GO
    
    Restart the instance of SQL Server.

Tuesday, April 12, 2011

Cloud Director users priviledges - vApp author can't see published catalogs?

I've noticed that the default rights of a vApp Author in VMware Cloud Director don't allow the vApp Author to see published catalogs. What, then, is the point of publishing a catalog? So only the Admins can see it? What will they do with it?
I've changed my VCD to grant the right to the vApp Author to see published catalogs. Catalog Author too.

Tuesday, April 5, 2011

vAPP IP address pools in vCenter - The feature that wasn't

The IP Pools feature of vCenter is not really fully implemented, at least not in a way that an end user can easily work with them. Documentation is non-existent, other than blog articles and books. Mike Laverick gives us some insight in his book, VMware vSphere™ 4 Implementation (reference below)

Mike Laverick's book (ch. 11) explains that even once you set up the IP pools, configure the vApp to use them, configure the VM to obtain them, it's still up to the end user to implement them. The IP pool info is delivered to the VM via ISO or VMware Tools (as an environment variable). It's up to the end user to create a script that actually changes the IP address.

Thanks to VMware for almost giving us what we needed...

http://blogs.vmware.com/vapp/2009/07/selfconfiguration-and-the-ovf-environment.html


Mike excellent book...Also on Safari Bookshelf.


* VMware vSphere™ 4 Implementation 
* * By: Mike Laverick
*
* Publisher: McGraw-Hill
*
* Pub. Date: January 20, 2010
*
* Print ISBN-10: 0-07-166452-1
*
* Print ISBN-13: 978-0-07-166452-3
*
* Web ISBN-10: 0-07-166453-X
*
* Web ISBN-13: 978-0-07-166453-0




http://blogs.vmware.com/vapp/2009/07/selfconfiguration-and-the-ovf-environment.html