tag:blogger.com,1999:blog-241307912008-07-12T06:55:08.209-05:00Jase's PlaceJase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-24130791.post-64430257947033461122008-07-04T23:00:00.013-05:002008-07-08T02:22:47.197-05:00What I experienced on July 4th, 2008<a href="http://www.jasemccarty.com/blog/uploaded_images/lcam-796600.jpg"><img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://www.jasemccarty.com/blog/uploaded_images/lcam-796591.jpg" border="0" /></a>On July 4th, 2008, I had the privilege of visiting the Luxembourg American Cemetery and Memorial in Hamm, Luxembourg.<br /><br />This cemetery is run by the <a href="http://www.abmc.gov/cemeteries/cemeteries/lx.php"><strong>American Battle Monuments Commission</strong></a>.<br /><br />This is an awe inspiring place that pays tribute to the fighting forces of the United States of America.<br /><br /><a href="http://www.jasemccarty.com/blog/uploaded_images/unknown-721171.jpg"><img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://www.jasemccarty.com/blog/uploaded_images/unknown-720912.jpg" border="0" /></a> I spent several hours there looking at some of the 5,076 gravesites, and noticed several of the 371 graves for those that no one knew their name.<br /><br />Fortunately, now days, it can easily be determined from DNA who a person is after the fact, unlike back then.<br /><br />This cemetery is a tribute to the Americans that gave their lives when others called for help.<br /><br />There is little that I can say that can describe the feelings I felt being in the presense of all of these heroes.<br /><br /><br /><br /><br /><br /><br /><a href="http://www.jasemccarty.com/blog/uploaded_images/meandpatton-706694.jpg"><img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://www.jasemccarty.com/blog/uploaded_images/meandpatton-706684.jpg" border="0" /></a>One hero laid to rest here, is <a href="http://en.wikipedia.org/wiki/George_S._Patton"><strong>General George S. Patton Jr</strong></a>.<br /><br />It was very humbling seeing the final resting place for such a leader.<br /><br />It was an honor and a privilege to spend my 4th of July visiting some of America's heroes.<br /><br /><br /><br /><br /><p></p><p></p><p></p>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-16157146174428555072008-06-27T12:37:00.010-05:002008-06-27T23:17:08.417-05:00New Book About VMware ESX<a href="http://www.amazon.com/Essential-VMware-Server-David-Marshall/dp/1420070274/"><img style="float:right; cursor:pointer; cursor:hand;" src="/images/book-sm.jpg" border="0" alt="VMware ESX Essentials in the Virtual Data Center"></a><br />We'll, I hadn't blogged about it yet, but I recently had the opportunity to be a Co-Author on a new book about VMware ESX.<br /><br />The title is <a href="http://www.amazon.com/Essential-VMware-Server-David-Marshall/dp/1420070274/"><u>VMware ESX Essentials in the Virtual Data Center</u></a>. It details VMware ESX, VirtualCenter, and how they interact with each other and a network infrastructure. There are some tips and tricks, as well as some in depth content about their architecture, as well as how to use them, with some best practices mixed in.<br /><br />I was very fortunate to be a part of the book, and I truly appreciate the opportunity that Steve Beaver and David Marshall gave me by bringing me into the project. Also, I want to extend thanks to the publisher, as they were very gracious in the process of publishing this book.<br /><br />We're going through the finalization process, and we hope to have the book on shelves as soon as possible. I understand it will be available before VMworld 2008.<br /><br />I hope that everyone who gets a copy, will find the content useful, and enjoyable to read.<br /><br />Thanks,<br />JaseJase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-7760583533544964412008-01-17T09:44:00.000-06:002008-01-29T13:52:44.014-06:00Go Daddy Wildcard Certificate with VI3<span style="color: rgb(0, 0, 0);">Well, I've confirmed on my test system, that a Go Daddy wildcard certificate will work on a VI3 (VirtualCenter 2.5 & ESX 3.5) system.</span><p style="color: rgb(0, 0, 0);">Let's say you already have a wildcard certificate in place on an IIS web server, and you'd like to use it in your VI3 environment.</p><p style="color: rgb(0, 0, 0);">First you'll need to export the cert from your IIS box, using the Certificates snap in.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/export-768121.JPG"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/export-768118.JPG" alt="" border="0" /></a><br />Right click, then All Tasks, then Export, and Next on the first screen<br /></p><a style="color: rgb(0, 0, 0);" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/exportwiz2-781755.JPG"><img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/exportwiz2-781751.JPG" alt="" border="0" /></a><br /><span style="color: rgb(0, 0, 0);">Select "Yes, export the private key</span><br /><p style="color: rgb(0, 0, 0);"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/exportwiz3-781773.JPG"><img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/exportwiz3-781766.JPG" alt="" border="0" /></a><br />"Personal Information Exchange - PKCS #12 (.PFX)" should be selected<br />And "Include all certificates in the certification path if possible" should be checked.</p><a style="color: rgb(0, 0, 0);" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/exportwiz4-758985.JPG"><img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/exportwiz4-758982.JPG" alt="" border="0" /></a><br /><span style="color: rgb(0, 0, 0);">Enter your password here</span><br /><p style="color: rgb(0, 0, 0);"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/exportwiz5-714101.JPG"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/exportwiz5-714099.JPG" alt="" border="0" /></a><br />Enter a filename for the exported cert. I called it wildcard.pfx<br /></p><p style="color: rgb(0, 0, 0);"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/exportwiz6-716713.JPG"><img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/exportwiz6-716709.JPG" alt="" border="0" /></a><br />Click finish.</p><p style="color: rgb(0, 0, 0);">Now you'll need to use <a href="http://www.openssl.org/">OpenSSL</a> to convert the file you just generated.</p><p style="color: rgb(0, 0, 0);">I ran the openssl.exe from the path on my test system (C:\openssl\bin)</p><p style="color: rgb(0, 0, 0);"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/cmd-701971.JPG"><img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/cmd-701967.JPG" alt="" border="0" /></a><br />C:\openssl\bin\openssl.exe pkcs12 -in wildcard.pfx -out wildcard.txt -nodes. You will be asked for the password you entered when you were exporting the pfx.<br /></p><span style="color: rgb(0, 0, 0);">Now open the wildcard.txt with Wordpad (notepad won't work). I use </span><a style="color: rgb(0, 0, 0);" href="http://www.gena01.com/win32pad/">Win32Pad</a><span style="color: rgb(0, 0, 0);"> instead.</span><p style="color: rgb(0, 0, 0);">Grab the portion with the following:<br /><span class="orgmaintext">-----BEGIN RSA PRIVATE KEY-----<br />(Block of Random Text)<br />-----END RSA PRIVATE KEY-----<br />And save this (notepad is fine for this) as rui.key</span></p><span style="color: rgb(0, 0, 0);">Grab the portion with the following:</span><br /><span style="color: rgb(0, 0, 0);">-----BEGIN CERTIFICATE-----</span><br /><span style="color: rgb(0, 0, 0);" class="orgmaintext">(Block of Random Text)<br /></span><span style="color: rgb(0, 0, 0);">-----END CERTIFICATE-----</span><p style="color: rgb(0, 0, 0);">And save this (notepad is fine for this) as rui.crt</p><span style="color: rgb(0, 0, 0);">Make sure you make a backup of the existing keys, in the case that something goes wrong with this process. They are located in the </span><span style="font-weight: bold; color: rgb(0, 0, 0);">c:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\SSL</span><span style="color: rgb(0, 0, 0);"> folder.</span><br /><span style="color: rgb(0, 0, 0);"><br />Now, rename the wildcard.pfx to rui.pfx. Copy rui.pfx, rui.crt, and rui.key files, to the above folder.</span><span style="color: rgb(0, 0, 0);"><br /><br />You'll then need to reinitialize the vpxd password. Run "vpxd.exe -p" again from a Dos box in the following folder:</span><br /><span style="font-weight: bold; color: rgb(0, 0, 0);">c:\Program Files\VMware\Infrastructure\VirtualCenter Server</span><span style="color: rgb(0, 0, 0);"><br /><br />Then restart your VirtualCenter service.</span><span style="color: rgb(0, 0, 0);"><br /><br />You should then be able to log into your VirtualCenter server using a wildcard certificate.</span><span style="color: rgb(0, 0, 0);"><br /><br />Additionally, you can upload the rui.crt and rui.key files to your ESX host (using </span><a style="color: rgb(0, 0, 0);" href="http://winscp.net/">WinSCP</a><span style="color: rgb(0, 0, 0);">) to the </span><span style="font-weight: bold; color: rgb(0, 0, 0);">/etc/vmware/ssl/</span><span style="color: rgb(0, 0, 0);"> path. Make sure you back these up too.</span><span style="color: rgb(0, 0, 0);"><br /><br />I then restarted my ESX 3.5 system, and it started to use the wildcard certificate as well.<br /><br /></span><a style="color: rgb(0, 0, 0);" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/firefox-781434.JPG"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/firefox-781427.JPG" alt="" border="0" /></a><span style="color: rgb(0, 0, 0);"><br />As always, If you wish to use this method that I have seen success with, feel free to.<br /><span style="font-style: italic;">By using the methods I have described, you agree that I will not be held liable for any issues in your environment.</span></span><br /><br /><span style="color: rgb(0, 0, 0);">Enjoy.</span>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-518003157292624382008-01-11T07:13:00.000-06:002008-01-11T07:19:48.715-06:00A Good Parody: 24 (The Pilot) if it were in 1994<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.collegehumor.com/video:1788161"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/24-711186.JPG" alt="" border="0" /></a>I'm sure this has been around, but I just found it.<br /><br /><br />I enjoy watching 24, as well as any comparison of today's technology to yesterday's technology.<br /><br /><br />Watch the "Pilot" for 24, if it were pitched to the networks in 1994.<br /><br /><a href="http://www.collegehumor.com/video:1788161"><span style="font-weight: bold;">http://www.collegehumor.com/video:1788161</span></a>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-65089881913667651732008-01-03T19:16:00.000-06:002008-01-03T19:44:28.885-06:00ESX 3.5 on a HP D530Well I was looking at this blog post:<br /><span style="font-weight: bold;font-size:85%;" ><a href="http://www.ntpro.nl/blog/archives/325-The-ultimate-ESX-3.5-white-box.html">http://www.ntpro.nl/blog/archives/325-The-ultimate-ESX-3.5-white-box.html</a></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/d530-797888.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/d530-797881.jpg" alt="" border="0" /></a>And I thought... We've got one of those lying around.<br /><br />So I figured I'd give it a try.<br /><br />I added a supported nic, and was on my way. Then I realized that my D530 only had an IDE drive in it.<br /><br />I installed ESX 3.5, and sure enough it griped because it didn't have any storage. On a positive note, the onboard nic was recognized by ESX. So I didn't even need to add a "supported" nic.<br /><br />Well I didn't have any SATA drives or non-supported SATA RAID controllers.<br /><br />So I looked at this VMTN forum post:<br /><span style="font-weight: bold;font-size:85%;" ><a href="http://communities.vmware.com/thread/47225">http://communities.vmware.com/thread/47225</a><br /><br /></span>To address some storage, without wanting to setup another box on the network, I followed the instructions from the PDF located in the thread:<span style="font-size:85%;"><a style="font-weight: bold;" class="jive-link-external" href="http://www.vmug.nl/downloads/VMWare_NFS_en_iSCSI.pdf"> http://www.vmug.nl/downloads/VMWare_NFS_en_iSCSI.pdf</a></span><br /><br />Thanks to Reinout Wijnveen for the instructions.<br /><br />Despite the fact that I don't know Dutch, I was able to mull my way through the document. Sure enough, success!<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/esxd530-714796.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/esxd530-714793.JPG" alt="" border="0" /></a>Now I've got a "free" ESX test box. Keep in mind it isn't the fastest (with a 3.0 GHz P4, and 1GB of RAM), but I can "play" without having to touch our test or production environments.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-80544678204629560352007-12-28T08:15:00.001-06:002007-12-30T11:44:35.515-06:00Tell the system how you really feel.Have you ever wanted to put the "truth" in a Shutdown Event Tracker comment box?<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/shutdown-754445.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/shutdown-754443.JPG" alt="" border="0" /></a><br />I've had to deal with my fair share of terrible applications/services, that the "Business Unit" has decided to use, but were less than, shall I say "Stellar".<br /><br />I figured I'd post this, as I thought it was funny to see what it looked like when I followed the spirit of George Washington, in the fact that "I cannot tell a lie."<br /><br />Thanks,<br />JaseJase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-7416914073093328182007-12-17T15:51:00.000-06:002007-12-17T18:43:33.664-06:00VMware ESX 3.5 on an IBM x440?<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/esx-714578.JPG"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/esx-714573.JPG" alt="" border="0" /></a><br />Well, it may not be supported, but ESX 3.5 does install on an IBM x440.<br /><br />This isn't the first time VMware ESX has not been certified on an IBM x440.<br /><br />When ESX 3.0.0 came out, there was a small outcry on the VMTN forums (by those of us that have them) about these boxes being supported, as they were close to End-Of-Life, but still represented significant investments.<br /><br />I spoke with my VMware SE many times about it needing to be supported. He said that it "Should" run on it, despite the fact that it wasn't officially supported.<br /><br />Several months after the initial uproar, VMware certified ESX 3.0.0 to run on an IBM x440.<br /><br />Well here we are again, 3.5 just came out on 12/10/07, and yet again, the x440 was left off the <a href="http://www.vmware.com/pdf/vi3_systems_guide.pdf">hardware compatibility list</a>.<br /><br />A coworker bought a quad proc (1.4GHz Xeon) x440, for personal use, and we fired it up.<br /><br />Low and behold, ESX 3.5 does install, and the VMkernel loads.<br /><br />Even though the HCL recommends a minimum 1.5GHz cpu speed, the installation didn't seem to care that this box was a wee 100MHz shy of the minimum recommended cpu requirements.<br /><br />He hasn't loaded any VM's on it yet, as it was late in the day, and we didn't get around to it. From initial indications, it looks like ESX 3.5 may just run on an IBM x440.<br /><br />I'll post more when I get more info, as to how well this runs...Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-47059757530065869352007-12-05T12:50:00.000-06:002007-12-05T13:08:12.829-06:00Printer Migration ScriptNot sure if you've every had an issue where you have to move printers from one print server to another... I have had this come up a couple times...<br /><br />Here's a little vbs that can be executed from a logon script, that will look at a mapped printer's connection (which server it is on), remove it, and then map it to another system.<br /><br />Keep in mind, all the printers on NEWSERVER must have the same share names as the OLDSERVER.<br /><br />Basically this script enumerates each printer, looks for the server it is mapped from, deletes the printer, and then adds the new printer, which happens to be the same printer, but mapped on a different server.<br /><br />Here is the code:<br /><blockquote>On Error Resume Next<br />Dim strComputer<br />Dim objWMIService<br />Dim colItems<br />Dim WshNetwork<br /><br />Set WshNetwork = WScript.CreateObject("WScript.Network")<br /><br />strComputer = "."<br />Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")<br />Set colItems = objWMIService.ExecQuery("Select * from Win32_Printer",,48)<br />For Each objItem in colItems<br /> If objItem.ServerName = "\\OLDSERVER" then<br /> WshNetwork.RemovePrinterConnection objItem.ServerName & "\" & objItem.ShareName, true, true<br /> WshNetwork.AddWindowsPrinterConnection "\\NEWSERVER\" & objItem.Sharename<br /> End If<br />Next</blockquote>If you want to download it, you can find it <a href="/scripts/moveprinters.txt"><span style="font-weight: bold;">here</span></a>.<br /><br />As always, you are welcome to use the script, but I will not be held liable if any issues arise.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-33410428134103147342007-08-17T06:00:00.000-05:002007-08-17T08:52:59.820-05:00Free load balancer (possible connection broker) for VDILooking for an alternative (free) Connection Broker solution I stumbled across Crossroads.<br /><br />It is a little application that will run on pretty much any current Linux/OSX build, and will load balance specific IP’s, ports.<br /><br />Just because I wanted something quick and easy to test this on, I downloaded Ubuntu Desktop 6.0.6 LTS to try it out on.<br /><br />Download Crossroads <a href="http://crossroads.e-tunity.com/">here</a>. I chose the 1.48 build, as it is the latest stable (at the time of this writing).<br /><br />So, download it, to your Linux system, and unpack it, and install it.<br />I downloaded/copied it to /tmp, and installed it as follows:<br /><br /><span style="font-weight: bold;">Unpacking the archive</span><br />root@ubuntu:/tmp# gunzip crossroads-stable.tar.gz<br />root@ubuntu:/tmp# tar –xvf crossroads-stable.tar<br />root@ubuntu:/tmp# cd crossroads-1.48<br /><br /><span style="font-weight: bold;">Compiling/Installing Crossroads<br /></span><span style="font-size:85%;">(make sure you have a C compiler like gcc installed)</span><br />root@ubuntu:/tmp/crossroads-1.48# make install<br />root@ubuntu:/tmp/crossroads-1.48# touch /etc/crossroads.conf<br /><br /><span style="font-weight: bold;">Basic Configuring of Crossroads</span><br />edit /etc/crossroads.conf (with the below configuration)<br /><pre><br />service rdp {<br />port 3389;<br />revivinginterval 15;<br />backend one {<br /> server 10.1.1.100:3389;<br /> maxconnections 1;<br /> setserverheader "X-Real-IP: %r";<br /> trafficlog /tmp/backend.1.log;<br /> }<br />backend two {<br /> server 10.1.1.101:3389;<br /> maxconnections 1;<br /> setserverheader "X-Real-IP: %r";<br /> trafficlog /tmp/backend.2.log;<br /> }<br />}</pre>I set the "maxconnections" to 1, because if I have XP/Vista desktops on the backend, I don't want someone attempting to connect to one that already has an active connection.<br /><br /><span style="font-weight: bold;">Starting Crossroads</span><br />/usr/local/bin/crossroads start<br /><br /><span style="font-weight: bold;">Checking the status of Crossroads</span><br />/usr/local/bin/crossroads status<br /><br /><span style="font-weight: bold;">Stopping Crossroads</span><br />/usr/local/bin/crossroads stop<br /><br />Keep in mind, this is just a rudimentary implementation of Crossroads in a Connection Broker capacity.<br /><br />The Crossroads documentation gives more parameters and information to have it start automatically at different run levels, allowed from/denied from, etc.<br /><br />Additionally, <span style="font-style: italic;">the default Makedef.def is setup for a maximum of 20 connections</span>. So, before you compile it, adjust the number accordingly.<br /><br />The config file (/etc/crossroads.conf) also has many additional settings, that can customize the connections, including things such as allowed/denied addresses, etc.<br /><br /><span style="font-weight: bold;">The Web Interface</span><br />There is also a web gui that will display connections/etc.<br />To start it up, run /usr/local/bin/crossroads-mgr start PORT<br /><br />So if you run /usr/local/bin/crossroads-mgr start 80, you should see something like this:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/vmwareforum/crossroads-mgr.jpg"><img style="cursor: pointer; width: 200px;" src="http://www.jasemccarty.com/vmwareforum/crossroads-mgr.jpg" alt="" border="0" /></a><br /><br />Now, in a production environment, I'd recommend creating a hardened Linux VM, and really tweaking /etc/crossroads.conf to get the best performance and security.<br /><br />This could be a really viable solution in a small environment where costs play a significant factor.<br /><br />As can be seen it really isn't hard to do, doesn't take long, and (by reading the docs) can be locked down enough to be a cheap (free) solution.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-12556766741809913362007-06-24T15:54:00.001-05:002007-06-24T16:46:51.422-05:00ESX: Security Banner at Console Login with ColorThe guys at XtraVirt have a good article: <a style="font-weight: bold;" href="http://www.xtravirt.com/index.php?option=com_content&task=view&id=67&Itemid=65">ESX3: Security Banner at Console Login</a>. This article tells you how to customize your login prompt and message of the day.<br /><br />Good information for those that want to customize their login banners. This article actually works for ESX 2.x and above.<br /><br />I ran across an application that allows me to easily add color to this login banner, if your console/ssh client supports it.<br /><br />The application is MOTD Maker. You can find it here: <a href="http://edeca.net/site/programs:motdmaker"><span style="font-weight: bold;">http://edeca.net/site/programs:motdmaker</span></a><br /><br />So I took the default banner from the above article:<blockquote><pre>****************************************<br />****** WARNING: SECURITY MESSAGE ******<br />** AUTHORIZED ACCESS TO THIS SYSTEM **<br />** ONLY! **<br />** ACCESS MUST BE CLEARED WITH ONSITE **<br />** SECURITY CONTROLLER **<br />****************************************<br />****************************************</pre></blockquote>And pasted it into the MOTD Maker. Adding colors is really easy with the MOTD Maker, just select the text...<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/motd1-781102.jpg"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/motd1-781100.jpg" alt="" border="0" /></a><br /><br />Select the color you wish to make it:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/motd2-764022.jpg"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/motd2-764019.jpg" alt="" border="0" /></a><br /><br />Now the color will change.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/motd3-790197.jpg"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/motd3-790194.jpg" alt="" border="0" /></a><br /><br />Now I made it uniform by selecting the other asterisks.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/motd4-780466.jpg"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/motd4-780463.jpg" alt="" border="0" /></a><br /><br />Now select "Generate ANSI" and either cave this to a file, or save it to your clipboard. I recommend saving it to a file. I've had some issues with puTTY when it comes to pasting.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/motd5-795969.jpg"><img style="cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/motd5-795968.jpg" alt="" border="0" /></a><br /><br />If you saved it to a file, you can upload that to your ESX server, and rename it to /etc/motd or /etc/issue.<br /><br />Additionally, one thing that they didn't mention in the above mentioned article... /etc/issue is for local console connections, and /etc/issue.net is for ssh/terminal connections.<br /><br />That being said, you could have different information for local or remote connections. And because /etc/motd is run after login, you can add additional information there.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1883998940832077432007-03-09T10:34:00.000-06:002007-03-09T11:09:24.862-06:00.NET: Microsoft .NET Framework 2.0 Configuration tool with only the .NET 2.0 RuntimeHave you ever tried to use the Microsoft .NET Framework 2.0 Configuration tool when you have only installed the .NET 2.0 Runtime?<br /><br />Well, Microsoft in their infinite wisdom took this tool out of the runtime.<br /><br />So if you need to modify the .NET 2.0 configuration on a box that only has the runtime, you are out of luck, unless you find a way around it. Keep in mind, this worked for me, and <span style="font-style: italic;">I will not be responsible if you use my methods, and cause an issue with your system</span>.<br /><br />I downloaded the <a style="font-weight: bold;" href="http://www.microsoft.com/downloads/details.aspx?familyid=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en">.NET 2.0 SDK</a> (which includes the config tool), and installed it on my machine.<br /><br />I exported the following registry keys to a single .reg file, and made some changes to them.<br /><span style="font-size:85%;"><span style="font-family: courier new;">HKCR\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}</span><br /><span style="font-family: courier new;">HKCR\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}</span><br /><span style="font-family: courier new;">HKLM\SOFTWARE\Microsoft\MMC\SnapIns\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}</span><br /></span><br />I updated the paths from "<span style="font-size:85%;"><span style="font-family: courier new;">C:\Program Files\Microsoft.NET\SDK\v2.0\Bin</span></span>" to point to "<span style="font-size:85%;"><span style="font-family: courier new;">C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727</span></span>" instead.<br /><br />I then copied the following files from my <span style="font-size:85%;"><span style="font-family: courier new;">C:\Program Files\Microsoft.NET\SDK\v2.0\Bin</span></span> folder to a Windows 2003 box with only the .NET 2.0 Runtime installed on it.<br /><span style="font-family: courier new;font-size:85%;" >gacutil.exe<br />mscorcfg.dll<br />mscorcfg.msc<br />mscormmc.dll<br />mscormmc11.cfg</span><br />The destination directory on the 2003 box was "<span style="font-size:85%;"><span style="font-family: courier new;">C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727</span></span>"<br /><br />I then imported the modified reg to my Windows 2003 box.<br /><br />And then imported the mscorcfg.dll into the Global Assembly Cache, using this command:<br /><span style="font-size:85%;"><span style="font-family: courier new;">"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\gacutil.exe" /i "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorcfg.dll"</span></span><br /><br />I also copied the .NET Framework 2.0 Configuration shortcut from my "Administrative Tools" to the "Administrative Tools" on the 2003 box, and updated the paths.<br /><br />What do you know, I've now got the .NET Framework 2.0 Configuration tool on my 2003 box without having to install the entire .NET 2.0 SDK.<br /><br />Not sure why Microsoft didn't include this in the redistributable, as it is necessary if you want to make .NET 2.0 config changes.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-82316874364787349982007-02-06T12:07:00.000-06:002007-02-06T13:38:19.163-06:00VMware: Restoring Custom Attributes after a VC 1.x to VC 2.0.x upgrade****************************************<br />Disclaimer: Keep in mind, this is the process that worked for me, and I don’t recommend that anyone perform this on live data, but rather to test data. <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">I am not responsible for any changes to your database as a result of this process.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">If you choose to use this method, please backup your database beforehand.</p><p class="MsoNormal">All VC 2.0.x database references are called VirtualCenter and all VC 1.x references are called VirtualCenterOLD.</p>Also, this properly works with dbo as the owner of all tables. If you have an alternate owner (as I do) you will have to modify the below scripts to match.<br /><p class="MsoNormal">****************************************</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">After performing a VC 1.x to VC 2.0.x upgrade, custom attributes are lost.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">This is because the VC 1.x and VC 2.0.x databases handle custom attributes a little different.<span style=""> </span>VC 1.x has a custom attributes table called VPX_FIELDDEF, and VMs and HOSTs have separate tables (VPX_VM_FIELDS and VPX_HOST_FIELDS respectively.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">In VC 2.0 there are only 2 tables, VPX_FIELD_DEF and VPX_FIELD_VAL.<span style=""> </span></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">The VC 1.0 table VPX_FIELDDEF is replaced by VPX_FIELD_DEF in VC 2.0.x.<span style=""> </span></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">The VC 1.0 tables, VPX_VM_FIELDS and VPX_HOST_FIELDS are replaced by VPX_FIELD_VAL in VC 2.0.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">To import the old values into the new database, a couple steps will have to be taken.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Let’s say I have a SQL 2000 database with my VC 2.0.x database named VirtualCenter.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">I need to get to the tables from my old VC 1.x installation.<span style=""> </span>So I need to restore the old VC 1.x database where I can get to the data I need.<span style=""> </span>So I restore the VC 1.x database to a database (on the same server), with the name VirtualCenterOLD.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Now run the following script from Query Analyzer, while attached to the new VirtualCenter database:</p> <p class="MsoNormal"><o:p> </o:p></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal">USE VirtualCenter</p><p style="font-family: courier new;font-family:courier new;" class="MsoNormal">GO<br /></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal" >INSERT INTO dbo.VPX_FIELD_DEF<o:p></o:p></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal" >SELECT<span style=""> </span>FIELD_ID AS ID, NAME<o:p></o:p></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal" >FROM<span style=""> </span>VirtualCenterOLD.dbo.VPX_FIELDDEF</p><p class="MsoNormal"><span style="font-family: courier new;font-family:courier new;" >GO</span><br /></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">This will pull all values from the old VirtualCenterOLD table named VPX_FIELDDEF into the new VirtualCenter database table named VPX_FIELD_DEF, thus defining our custom attribute fields.<br /></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Now, We need to add the data from the Hosts and VMs.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Now run the following script from Query Analyzer, while attached to the new VirtualCenter database:</p> <p class="MsoNormal"><o:p> </o:p></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal" >USE VirtualCenter</p><p style="font-family: courier new;font-family:courier new;" class="MsoNormal" >GO<br /></p> <p style="font-family: courier new;" class="MsoNormal" face="courier new">INSERT INTO dbo.VPX_FIELD_VAL<o:p></o:p></p> <p style="font-family: courier new;" class="MsoNormal" face="courier new">SELECT<span style=""> </span>VirtualCenterOLD.dbo.VPX_HOST_FIELDS.FIELD_ID AS FIELD_ID, dbo.VPXV_HOSTS.HOSTID AS ENTITY_ID, <span style=""> </span>VirtualCenterOLD.dbo.VPX_HOST_FIELDS.FIELD_VALUE AS [VALUE]<o:p></o:p></p> <p style="font-family: courier new;" class="MsoNormal" face="courier new"><o:p> </o:p></p> <p style="font-family: courier new;" class="MsoNormal" face="courier new">FROM<span style=""> </span>VirtualCenterOLD.dbo.VPX_HOST LEFT OUTER JOIN<o:p></o:p></p> <p style="font-family: courier new;" class="MsoNormal" face="courier new"><span style=""> </span><span style=""> </span>dbo.VPXV_HOSTS ON VirtualCenterOLD.dbo.VPX_HOST.HOSTNAME = dbo.VPXV_HOSTS.NAME LEFT OUTER JOIN<o:p></o:p></p> <p class="MsoNormal" style="font-family: courier new;"><span style=""> </span>VirtualCenterOLD.dbo.VPX_HOST_FIELDS ON VirtualCenterOLD.dbo.VPX_HOST.HOST_ID = VirtualCenterOLD.dbo.VPX_HOST_FIELDS.HOST_ID<o:p></o:p></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal">WHERE<span style=""> </span>(NOT (VirtualCenterOLD.dbo.VPX_HOST_FIELDS.FIELD_VALUE IS NULL)) AND (NOT (VirtualCenterOLD.dbo.VPX_HOST_FIELDS.FIELD_ID IS NULL))</p><p class="MsoNormal"><span style="font-family: courier new;font-family:courier new;" >GO</span><br /></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">This will insert HOST attributes into the VPX_FIELD_VAL, where the FIELD_ID and VALUE come from the old data, and the ENTITY_ID comes from the new Entity value for the ESX Hosts in the new database, making sure that there are no nulls.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Now run the following script from Query Analyzer, while attached to the new VirtualCenter database:</p> <p class="MsoNormal"><o:p> </o:p></p> <p style="font-family: courier new;" class="MsoNormal">USE VirtualCenter</p> <p style="font-family: courier new;" class="MsoNormal">GO<br /></p> <p style="font-family: courier new;" class="MsoNormal">INSERT INTO dbo.VPX_FIELD_VAL<o:p></o:p></p> <p style="font-family: courier new;" class="MsoNormal">SELECT<span style=""> </span>VirtualCenterOLD.dbo.VPX_VM_FIELDS.FIELD_ID AS FIELD_ID, dbo.VPXV_VMS.VMID AS ENTITY_ID, <o:p></o:p></p> <p style="font-family: courier new;" class="MsoNormal"><span style=""> </span>VirtualCenterOLD.dbo.VPX_VM_FIELDS.FIELD_VALUE AS [VALUE]<o:p></o:p></p> <p style="font-family: courier new;" class="MsoNormal"><o:p> </o:p></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal">FROM<span style=""> </span>VirtualCenterOLD.dbo.VPX_VM LEFT OUTER JOIN<o:p></o:p></p> <p style="font-family: courier new;font-family:courier new;" class="MsoNormal"><span style=""> </span>dbo.VPXV_VMS ON VirtualCenterOLD.dbo.VPX_VM.NAME = dbo.VPXV_VMS.NAME LEFT OUTER JOIN<o:p></o:p></p> <p style="font-family: courier new;" face="courier new" class="MsoNormal"><span style=""> </span>VirtualCenterOLD.dbo.VPX_VM_FIELDS ON VirtualCenterOLD.dbo.VPX_VM.VM_ID = VirtualCenterOLD.dbo.VPX_VM_FIELDS.VM_ID<o:p></o:p></p> <p style="font-family: courier new;" face="courier new" class="MsoNormal">WHERE<span style=""> </span>(NOT (VirtualCenterOLD.dbo.VPX_VM_FIELDS.FIELD_VALUE IS NULL)) AND (NOT (VirtualCenterOLD.dbo.VPX_VM_FIELDS.FIELD_ID IS NULL))</p><p face="courier new" class="MsoNormal"><span style="font-family: courier new;">GO</span><br /></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">This will insert VM attributes into the VPX_FIELD_VAL, where the FIELD_ID and VALUE come from the old data, and the ENTITY_ID comes from the new Entity value for the VM’s in the new database, making sure that there are no nulls.<br /></p> This worked well for me, and I didn't lose any custom attributes for my 300+ VM's or my ESX Hosts.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1166105078215844832006-12-14T07:56:00.001-06:002006-12-14T08:04:38.216-06:00VMware: Non-US Regional Settings Fix for Cloning/Template DeploymentWell, it looks like someone else looked into customizing the VirtualCenter customization process for Windows hosts.<br /><br /><span class="post-author">Vincent Vlieghe, has a post, <a href="http://virtrix.blogspot.com/"><span style="font-weight: bold;">on his site</span></a>, that details how to correct the customization process </span>issue of always reverting to English-US.<br /><br />Check out the article <a href="http://virtrix.blogspot.com/2006/11/vmware-setting-regional-settings-for.html"><span style="font-weight: bold;">here</span></a>.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1165935624193274812006-12-12T08:34:00.000-06:002006-12-12T09:31:07.636-06:00VMware: Read VirtualCenter Events in MOM 2005<p>Challenged with a MOM 2005 project, I have been trying to figure out how to get VirtualCenter alerts into MOM.<br /><br />I didn't want to address using forwarded SNMP traps, as not everyone seems to compile the VMware MIBs too well.<br /><br />VirtualCenter 1.x had the ability to run scripts, but it didn't pass any information. VirtualCenter 2.0.x still runs scripts, but also includes additional information. According to the VirtualCenter help, the following variables can be passed to a script:<br /><blockquote>{eventDescription} full formatted message for alarm triggering event<br /><br />{entityName} name of the entity name where the alarm is triggered<br /><br />{alarmName} name of the alarm that is triggered<br /><br />{triggeringSummary} summary info of the alarm with triggering values<br /><br />{declaringSummary} summary info of the alarm declaration<br /><br />{oldStatus} alarm status before it is triggered<br /><br />{newStatus} alarm status after it is triggered<br /><br />{entityObject} inventory object as triggering alarm</blockquote><br />Unfortunately, {entityName} and {entityObject} don't seem to work right now, but you can parse the {eventDescription} to get the object's name.<br /><br />So with a little help from a .NET guy here at work, I was off, on my first VB.NET application. To be honest, it looks more like .vbs to me, but put it in VB.NET, and I guess it is VB.NET.<br /><br />First, well need to compile the application. You can find a copy of it <a style="font-weight: bold;" href="http://www.jasemccarty.com/vmwareforum/momapp.zip">here</a>. You'll need WinZip, or some other zip application to unzip it.<br /><br />I've included the .exe in the zip, but feel free to delete it and recompile it. (I don't always trust everyone else's code).<br /><br />Here's the basic contents of the VB application, a file called MakeEventCall.vb, and it includes the following code:<br /></p><blockquote>Imports System.Diagnostics<br /><br />Module MakeEventCall<br /><br />'******************************************************<br />'* MomApp.exe - 12/12/06<br />'* Jase McCarty<br />'* My first VB.NET application for the purpose of<br />'* sending VMware VirtualCenter alerts to the<br />'* Application Event Log of a VirtualCenter system<br />'* that has a Microsoft Operations Manager Agent<br />'* installed on it.<br />'*<br />'* This code may be redistributed, but must have<br />'* this disclaimer included. Agreement to use<br />'* this code, absolves me from any liability.<br />'******************************************************<br /><br />Sub Main()<br /><br />'Variables for doing our work<br />Dim separators As String = "-"<br />Dim strIncoming As String = Microsoft.VisualBasic.Command()<br />Dim argCount As Integer<br />Dim args() As String = strIncoming.Split(separators.ToCharArray)<br />Dim MessageOutStart As Integer<br />Dim strMessageOut As String<br />Dim strFullMessage As String = strIncoming<br />Dim strApplicationName As String = "VMware VirtualCenter"<br />Dim objName As String<br /><br />'Variables for our potential input parameters<br />Dim eventDescription As String<br />Dim entityName As String<br />Dim alarmName As String<br />Dim triggeringSummary As String<br />Dim declaringSummary As String<br />Dim oldStatus As String<br />Dim newStatus As String<br />Dim entityObject As String<br /><br /><br />'Don't do anything, unless we get at least one argument<br />If UBound(args) > 0 Then<br /><br /> 'Blank our Output Message<br /> strMessageOut = ""<br /><br /> 'Loop through all our arguments, and process them<br /> 'Each argument should read something like this in<br /> 'the VirtualCenter Alert settings:<br /> '<br /> 'momapp.exe -ed:{eventdescription} -ns:{newstatus} -an:{alarmname}<br /> '<br /> 'Where the 2 letter argument prefix matches up with<br /> 'the appropriate event item.<br /><br /> For argCount = 0 To UBound(args)<br /><br /> Select Case Left(args(argCount), 2)<br /> Case "ed"<br /> eventDescription = Right(args(argCount), Len(args(argCount)) - 3)<br /> Case "en"<br /> entityName = Right(args(argCount), Len(args(argCount)) - 3)<br /> Case "an"<br /> alarmName = Right(args(argCount), Len(args(argCount)) - 3)<br /> Case "ts"<br /> triggeringSummary = Right(args(argCount), Len(args(argCount)) - 3)<br /> Case "ds"<br /> declaringSummary = Right(args(argCount), Len(args(argCount)) - 3)<br /> Case "os"<br /> oldStatus = Right(args(argCount), Len(args(argCount)) - 3)<br /> Case "ns"<br /> newStatus = Right(args(argCount), Len(args(argCount)) - 3)<br /> Case "eo"<br /> entityObject = Right(args(argCount), Len(args(argCount)) - 3)<br /> End Select<br /> Next<br /><br /> Dim objEventLog As New EventLog<br /><br /> Try<br /> 'Register the App as an Event Source<br /> If Not objEventLog.SourceExists(strApplicationName) Then<br /> objEventLog.CreateEventSource(strApplicationName, "Application")<br /> End If<br /><br /> objEventLog.Source = strApplicationName<br /><br /> 'This could be modified to include other information from above<br /> strMessageOut = "Alarm: " & alarmName &amp;amp;amp;amp;amp;amp;amp; vbCrLf & _<br /> "Event: " & eventDescription & vbCrLf<br /><br /> 'Include the appropriate warning level. If the -ns:{newstatus}<br /> 'parameter is omitted, an Informational entry will be written to<br /> 'the application log<br /> Select Case Trim(Trim(newStatus))<br /> Case "Green"<br /> objEventLog.WriteEntry(strMessageOut, EventLogEntryType.Information)<br /> Case "Yellow"<br /> objEventLog.WriteEntry(strMessageOut, EventLogEntryType.Warning)<br /> Case "Red"<br /> objEventLog.WriteEntry(strMessageOut, EventLogEntryType.Error)<br /> Case Else<br /> objEventLog.WriteEntry(strMessageOut, EventLogEntryType.Information)<br /> End Select<br /><br /> Catch Ex As Exception<br /><br /> End Try<br /><br />End If<br /><br />End Sub<br /><br />End Module</blockquote><br /><br />Once you have compiled the app, drop it off somewhere on your VirtualCenter server that is in the path. This will make it easier to run it, and will help with an issue with the "Run A Script" alert function in VC 2.0.x.<br /><br /><table border="0"><tbody><tr><td>When you set it up in VC, it should look something like this:</td></tr><br /><tr><td><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/momappscreen-731596.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/momappscreen-727514.JPG" alt="" border="0" /></a></td></tr><br /><br /><tr><td>When an event happens, it will look something like this:</td></tr><tr><td><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/momappevent-723410.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/momappevent-717846.JPG" alt="" border="0" /></a></td></tr><br /><br /><tr><td>And the individual item will look something like this:</td></tr><tr><td><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/momappeventitem-748631.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/momappeventitem-744525.JPG" alt="" border="0" /></a></td></tr></tbody></table><br /><br />Keep in mind, this is not a complete solution, but more of a starting point to get VC events into MOM 2005.<br /><br />Additionally, because this application simply writes to the event log, any monitoring software that reads the Application Event Log, will be able to pick up this information.<br /><br />Enjoy.<p></p>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1163028776058301362006-11-08T17:29:00.000-06:002006-11-08T17:35:17.176-06:00VMWorld 2006: A new book has emerged<a href="http://www.syngress.com/catalog/?pid=3700"><img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://www.jasemccarty.com/blog/uploaded_images/370_web-753565.jpg" border="0" /></a><br />A new book, <strong><a href="http://www.syngress.com/catalog/?pid=3700">Scripting VMware Power Tools: Automating Virtual Infrastructure Administration</a></strong>, was released just before VMWorld 2006, and is making big waves here.<br /><br />I have a special place in my heart for this book. I actually got to contribute to Chapter 8.<br /><br />Many thanks to Steve Beaver.<br /><br />You da Man!Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1162805367841468352006-11-06T03:27:00.000-06:002006-11-06T03:29:27.853-06:00Off to VMWorld 2006We'll, I'm off to <a style="font-weight: bold;" href="http://www.vmworld.com/">VMWorld 2006</a>, this year should be a blast!Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1161720545660858622006-10-24T14:59:00.000-05:002006-10-24T15:41:44.523-05:00Windows: Need to Seize Roles during DR?In an environment that needs to come up quickly, I found a little trick that can be helpful.<br /><br />NTDSUTIL.exe lets you manage which domain controllers handle which roles in your domain.<br /><br />According to kb article <a style="font-weight: bold;" href="http://support.microsoft.com/kb/243267">243267</a>, you can script this. So in a DR situation, if you have a virtual DC (in a VM) and you want to have it seize all roles, it can be simple with the following script.<br /><br />The following script will allow you to seize all roles from a batch file <span style="font-size:85%;">(<a style="font-weight: bold;" href="/scripts/seizeroles1.txt">seizeroles1.bat</a>)</span>:<br /><span style=";font-family:courier new;font-size:85%;" >**********BEGIN HERE**********<br />ntdsutil roles connections "connect to server %1" quit "seize domain naming master" quit quit<br />ntdsutil roles connections "connect to server %1" quit "seize infrastructure master" quit quit<br />ntdsutil roles connections "connect to server %1" quit "seize PDC" quit quit<br />ntdsutil roles connections "connect to server %1" quit "seize RID master" quit quit<br />ntdsutil roles connections "connect to server %1" quit "seize schema master" quit quit<br />***********END HERE***********</span><br />Save the batch file as seizeroles.bat and call it from a cmd prompt with "seizeroles.bat servername.domain"<br /><br />Additionally, some of this can be abbreviated <span style="font-size:85%;">(<a style="font-weight: bold;" href="/scripts/seizeroles2.txt">seizeroles2.bat</a>)</span>:<br /><span style="font-size:85%;"><span style="font-family:courier new;">**********BEGIN HERE**********</span><br /><span style="font-family:courier new;">ntdsutil r c "co t s %1" q "seize domain naming master" q q</span><br /><span style="font-family:courier new;">ntdsutil r c "co t s %1" q "seize infrastructure master" q q</span><br /><span style="font-family:courier new;">ntdsutil r c "co t s %1" q "seize PDC" q q</span><br /><span style="font-family:courier new;">ntdsutil r c "co t s %1" q "seize RID master" q q</span><br /><span style="font-family:courier new;">ntdsutil r c "co t s %1" q "seize schema master" q q</span><br /><span style="font-family:courier new;">***********END HERE***********</span></span><br /><br />And if you really want it to shorten up, you can enter a single line to do what you want <span style="font-size:85%;">(<a style="font-weight: bold;" href="/scripts/seizeroles3.txt">seizeroles3.bat</a>)</span>:<br /><span style=";font-family:courier new;font-size:85%;" >**********BEGIN HERE**********<br />ntdsutil r c "co t s %1" q "seize domain naming master" "seize infrastructure master" "seize PDC" "seize RID master" "seize schema master" q q<br />***********END HERE***********</span><br /><br />Also I like to add a "popups off" or "p off" before the r c to keep it from prompting me as to whether I wish to perform this action or not.<br /><br />Enjoy.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1159379878349433782006-09-27T12:41:00.000-05:002006-12-05T07:13:58.290-06:00VMware: Extending a Cloned (Deployed) Windows VM's root partition without using any 3rd party toolsIn the dynamic environment we have at work any day of the week, we could need some test VM's with any number of different disk sizes.<br /><br />I would clone a "Golden Master" and then resize the disk, going through many different tools to be able to resize the C:\ drive to the full size of the .vmdk.<br /><br />So, I wondered if there was any way to automate this. Well, there partially is.<br /><br />If you add the "ExtendOEMPartition = 1" entry to the sysprep.inf file that VMware "drops off" on the vmdk before the customization process, it will resize to the full size (within the limits of the Windows OS you are cloning).<br /><br />Keep in mind, this doesn't work for shrinking, but it certainly does for extending.<br /><br />So my task was to deploy a VM, resize the disk, and have the customization process extend to the new (bigger) .vmdk size.<br /><br />Well, after some deductive reasoning, I figured out which file generated the sysprep.inf. I wasn't so concerned with the "dropping off" process, as I was the generation process.<br /><br />If this file is modified, to include the "ExtendOEMPartition = 1" entry in the [Unattended] section, the magic will happen. That is if you extend the .vmdk before the VM powers on for the first time.<br /><br />Now, the modifications aren't difficult by any means. I will mention however, that the files to be modified are encoded, and they will have to be decoded. I will not go through the process of decoding them. But once decoded, you should be good to go.<br /><br />And as everyone else who posts tweaks/ enhancements/ mods/ etc., I cannot be held responsible (or liable) for any changes you make to your configuration or your environment.<br /><br />Click <b><a href="/vmwareforum/Extend_Cloned_VM_Partition_Automatically.zip">here</a></b> to download the paper I put together. (Apparently my provider is having some web issues, possibly compression or something, so I've changed the .pdf to a .zip link. I'll post the whole article as a web page to help with this issue.)<br /><br />I've tested this in VC 1.4 with ESX 2.5.x and VC 2.0 with ESX 3.0.0 and it works successfully with Windows 2000 and Windows 2003 guests. <span style="color: rgb(102, 0, 0); font-weight: bold;">Updated: VC 2.0.1 and ESX 3.0.1 also perform flawlessly.</span><br /><br />Another note: The mentioned files only have to be modified once. They will not affect the normal cloning/template deployment process if you do not resize the .vmdk's. I would recommend that if you upgrade your VC install, you check these files, and potentially update them if they have been replaced.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1159363367800974212006-09-27T08:00:00.000-05:002006-09-27T21:37:49.766-05:00Windows: Unsolicited Remote AssistanceI knew that this existed, but didn't need it until this past weekend.<br /><br />One of my work environments has a need for remote connections for troubleshooting purposes, with the requirement of getting the approval of the remote user. They were given SMS 2003's remote control capability, and then it was taken away.<br /><br />So I did a Google search on 'Scripted "Remote Assistance"' and found many results. I was thinking I could pass a computername or IP to a script, and then have it initiate Windows XP's Remote Assistance.<br /><br />Then I learned of "Unsolicited" Remote Assistance. Nice little thing that Microsoft added there.<br /><br />If you Run (or use Internet Explorer) the following link, you will see the interface:<br /><span style="font-size:85%;"><a href="hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/unsolicited/unsolicitedrcui.htm">hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,<br />C=US/Remote%20Assistance/Escalation/unsolicited/unsolicitedrcui.htm</a></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.jasemccarty.com/blog/uploaded_images/ura-752693.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.jasemccarty.com/blog/uploaded_images/ura-750951.JPG" alt="" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Your mileage may vary as to the exact look, depending on your Windows installation. Different vendors customize the Microsoft Help and Support Center, so your window may look a little different.<br /><br />Simply enter a computer's Name, FQDN, or IP, and Connect. Then pick the user you wish to help, and click Start Remote Assistance.<br /><br />There are some GPO settings that I'll add if you need to enable Remote Assistance on your desktops. Here's a link to a little more information:<br /><a href="http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/ws03mngd/20_s3rem.mspx">http://www.microsoft.com/technet/prodtechnol/windowsserver2003/<br />technologies/security/ws03mngd/20_s3rem.mspx</a><br /><br />Enjoy.Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1157982287719675802006-09-11T08:38:00.000-05:002006-09-18T07:46:27.156-05:00AutoIT: Give users the ability to defrag without Admin access<p>I found a cool tool this weekend, called AutoIT V3.<br><br />You can find it here: <a style="FONT-WEIGHT: bold" href="http://www.autoitscript.com/autoit3/">http://www.autoitscript.com/autoit3/</a><br><br />I put together a script that will (running as the local admin) allow a user that has zero admin priviledges the ability to defrag their hard drive.</p><br />Here's the script:<br />;**** AutoIT Script to allow users to defrag their hard drive ****<br />; Set the RunAs parameters to use local adminstrator account<br />RunAsSet("Administrator",@ComputerName, "PASSWORDHERE")<br /><br />; Run defrag as admin<br />RunWait("mmc.exe dfrg.msc",@SystemDir)<br /><br />; Reset user's permissions<br />RunAsSet()<br /><br />;**** End of Script ****<br /><p>Save this as defragit.au3, and then using the AutoIT scripting tools and compile the au3 you created.<br><br />You can download the script <a href="http://www.jasemccarty.com/scripts/defragit.au3.txt"><span style="FONT-WEIGHT: bold">here</span></a>.<br><br />And you can download AutoIT <a href="http://www.autoitscript.com/autoit3/downloads.php"><span style="FONT-WEIGHT: bold">here</span></a>.<br><br /><img src=/images/defrag.png align=left><br />If you want to add a cool Vista style .ico, look at Jrdn88's gallery: <a href="http://jrdn88.deviantart.com/gallery/"><strong>http://jrdn88.deviantart.com/gallery/</strong></a></p>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1147098550301019062006-05-08T09:29:00.001-05:002008-07-12T06:54:52.057-05:00VBS: NIC Show Icon/Power Mgt Script<div style="font-family:arial;"><span class="659060314-08052006"><span style="font-size:85%;">Here's script that I wrote (and probably borrowed some of it) to turn all nics' icons on, and disable power management for them. It only looks at nics with IP enabled. </span></span></div><div style="font-family:arial;"><span class="659060314-08052006"><span style="font-size:85%;"></span></span></div><div style="font-family:arial;"><span class="659060314-08052006"><span style="font-size:85%;">You can also download it <strong><a href="http://www.jasemccarty.com/scripts/nicmod_vbs.txt">here</a></strong>. </span></span></div><div style="font-family:arial;"><span class="659060314-08052006"><span style="font-size:85%;">(Just make sure you rename it to nicmod.vbs, or something similar)</span></span></div><span class="659060314-08052006"><span style="font-family:Arial;font-size:85%;"></span></span><br /><span class="659060314-08052006" style="font-size:78%;"><span style="font-family:Arial;">'************************************************************************<br />'* VBS Script to:<br />'* Enable/Disable showing the icon in your system tray for connected NICs<br />'* Enable/Disable Power Management for Connected NICs<br />'*<br />'* 8 MAY 06 - Jase McCarty<br />'************************************************************************</span></span><br /><span style="font-size:78%;"></span><br /><span class="659060314-08052006" style="font-size:78%;"><span style="font-family:Arial;">'Let's setup our variables<br />Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE info for registry writes<br />Dim objReg 'Registry Object<br />Dim objWMIService 'WMI Service Object<br />Dim arrayNetCards 'Array of all connected NICs<br />Dim objNetCard 'A specific NIC<br />Dim strNICguid '<br />Dim strShowNicKeyName 'Key Specific to the Network Adapters in CurrentControlSet<br />Dim strShowNicKeyName001 'Key Specific to the Network Adapters in ControlSet001<br />Dim strPnPCapabilitesKeyName 'Key Specific to the Network Adapters in CurrentControlSet<br />Dim strPnPCapabilitesKeyName001 'Key Specific to the Network Adapters in ControlSet001<br />Dim strComputer 'Name of computer to modify</span></span><br /><span style="font-size:78%;"></span><br /><span class="659060314-08052006" style="font-size:78%;"><span style="font-family:Arial;">You will have to reboot the system for the settings to take effect, or you could put it in a group policy to automatically run when a system performs a shutdown.</span></span><span class="659060314-08052006"> <span style="font-size:78%;"><br /></span><span style="font-family:Arial;font-size:78%;">strComputer = "." 'Period = local computer</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;">strShowNicKeyName = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\"<br />strShowNicKeyName001 = "SYSTEM\ControlSet001\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\"<br />strPnPCapabilitiesKeyName = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\"<br />strPnPCapabilitiesKeyName001 = "SYSTEM\ControlSet001\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\"</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;">ShowNicdwValue = 1<br />'1 for ON, 0 for OFF</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;"><br />PnPdwValue = 56<br />'56 to disable "Allow the computer to turn off this device to save power."</span><br /><span style="font-family:Arial;font-size:78%;"><br />'48 to enable "Allow the computer to turn off this device to save power."</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;"><br />'32 to enable "Allow the computer to turn off this device to save power."<br />' and enable "Allow this device to bring the computer out of standby."</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;"><br />'288 to enable "Allow the computer to turn off this device to save power."<br />' and enable "Allow this device to bring the computer out of standby."<br />' and enable "Only allow management stations to bring the computer out of standby."</span><br /><span style="font-size:78%;"></span><br /><span style="font-size:78%;"><br /></span><span style="font-family:Arial;font-size:78%;">On Error Resume Next<br />Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")<br />Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;">'Look for the NICs that have IP enabled<br />Set arrayNetCards = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;">'Make changes on the NICs that have IP enabled<br />For Each objNetCard in arrayNetCards<br /><br />strNICguid = objNetCard.SettingID 'Get the GUID of the NIC<br />strDeviceID = Mid(objNetCard.Caption,6,4) 'Get the DeviceID of the NIC</span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;"><br />'Change the "Show icon in notification area when connected value"<br />objReg.SetDWORDValue HKLM, strShowNicKeyName & strNICguid & "\Connection", "ShowIcon", ShowNicdwValue<br />objReg.SetDWORDValue HKLM, strShowNicKeyName001 & strNICguid & "\Connection", "ShowIcon", ShowNicdwValue<br /><br /></span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:78%;">'Change the Power Management Values<br />objReg.SetDWORDValue HKLM, strPnPCapabilitiesKeyName & strDeviceID & "\","PnPCapabilities",PnPdwValue<br />objReg.SetDWORDValue HKLM, strPnPCapabilitiesKeyName001 & strDeviceID & "\","PnPCapabilities",PnPdwValue<br />Next<br /><br /></span><br /><span style="font-size:78%;"></span><br /><span style="font-family:Arial;font-size:85%;"><span style="font-size:78%;">Set objReg = Nothing<br /><br />Set objWMIService = Nothing<br />'*** END OF SCRIPT ***<br /><br /></span></span><br /><span class="659060314-08052006"><span style="font-family:Arial;font-size:85%;"></span></span><br /><span class="659060314-08052006" style="font-size:100%;"><span style="font-family:Arial;">You could also modify this script to take a list of computers, and make the changes on all of them.</span></span><br /><span class="659060314-08052006" style="font-size:100%;"><span style="font-family:Arial;"></span></span><br /><span style="font-family:Arial;font-size:100%;">E<span class="659060314-08052006">njoy.</span></span><br /></span>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1145039582446155882006-04-14T13:33:00.000-05:002008-01-11T07:21:08.406-06:00DOND: A Parody<div><span class="171413118-14042006"><span style="font-family:Arial;font-size:85%;">Not sure if you like Deal or No Deal, but this is pretty funny:</span></span></div> <div><span class="171413118-14042006"><span style="font-family:Arial;font-size:85%;"><a href="http://www.nbc.com/Video/videos/snl_1444_dond.shtml"><strong>http://www.nbc.com/Video/videos/snl_1444_dond.shtml</strong></a></span></span></div> <div> </div>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1143645400750369392006-03-29T09:16:00.000-06:002006-03-29T09:32:11.800-06:00VBS: Update Services Password on Local/Remote Box<div><span class="010130715-29032006" style="font-size:100%;"><span style=";font-family:Arial;" >This script, will allow you to update passwords for services that "Log on As" set to use a domain account.</span></span></div> <div><span class="010130715-29032006" style="font-size:100%;"><span style=";font-family:Arial;" ></span></span> </div> <div><span class="010130715-29032006" style="font-size:100%;"><span style=";font-family:Arial;" >You can download it <strong><a href="/scripts/UPD8SVCS_vbs.txt">here</a></strong>.</span></span></div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" ></span></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" >'***********************************************************<br />'Written by Jase McCarty<br />'Date: 03/29/2006<br />'<br />'UPD8SVCS.vbs<br />'<br />'Description: Change the password on a local<br />'or remote system for a Service that has <br />'"Logon As" set for a Domain Account<br />'Useful for Servers when a service account<br />'has a password change<br />'***********************************************************</span></span></div> <div><span style=";font-family:Arial;font-size:85%;" ></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" >Option Explicit</span></span></div> <div><span style=";font-family:Arial;font-size:85%;" ></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" > Dim shellobj,env<br />Dim strUserDomain,strUserName,strPassword,strComputer<br />Dim CSComputerName,CSAccount,CSPassword,objWMIService<br />Dim objService</span></span></div> <div><span style=";font-family:Arial;font-size:85%;" ></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" > 'Check to make sure that we receive enough arguements (2 or more)<br /> If Wscript.Arguments.Count < 2 Then<br /><br /> Wscript.Echo "Usage: UPD8SVCS.vbs USERNAME PASSWORD COMPUTERNAME"<br /> Wscript.Quit<br /><br /> Else<br /><br /> 'Create a Shell Object & be able to get environment variables<br /> Set shellobj = CreateObject("Wscript.Shell")<br /> Set env = shellobj.Environment("process") </span></span></div> <div><span style=";font-family:Arial;font-size:85%;" ></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" > 'Setup default domain for credentials<br /> '(could be modified to be an attribute) <br /> strUserDomain = env("USERDOMAIN")<br /> strUserName = Wscript.Arguments(0)<br /> strPassword = Wscript.Arguments(1)<br /><br /> 'Check to make sure we have enough arguements (2 or more)<br /> If Wscript.Arguments.Count > 2 Then<br /> 'If we 3, then the Computername will be the 3rd arguement<br /> strComputer = Wscript.Arguments(2)<br /> Else<br /> 'If we only receive the first 2, then the Computername<br /> 'will be the local computer<br /> strcomputer = env("COMPUTERNAME")<br /> End If<br /><br /> 'Call the ChangeServices subroutine<br /> Call ChangeServices(strComputer,strUserDomain & "\" & strUserName,strPassword)<br /><br /> WScript.Quit<br /> <br />End If<br /> <br />'The ChangeServices SubRoutine<br />'This requires a computername, account,and password to be passed to it <br />Sub ChangeServices(CSComputerName,CSAccount,CSPassword)</span></span></div> <div><span style=";font-family:Arial;font-size:85%;" ></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" > 'Setup a WMIService object, and setup a query to put all services in an array<br /> Set objWMIService = GetObject("winmgmts:\\" & CSComputerName & "\root\cimv2")<br /> Set colItems = objWMIService.ExecQuery("Select * from Win32_Service",,48)<br /><br /> 'Loop through the array<br /> For Each objService in colItems </span></span></div> <div><span style=";font-family:Arial;font-size:85%;" ></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" > 'If the "Logon As" of the current service matches the user specified,<br /> 'change the password to the one specified<br /> If Lcase(objService.StartName) = LCase(CSAccount) Then<br /> 'Make the credentials change<br /> errReturn = objService.Change(,,,,,,CSAccount,CSPassword)<br /> <br /> 'Write to the screen and the computer's event log, the success or failure<br /> If err.number <> 0 then<br /> shellobj.LogEvent 1,"Failure Changing Username and Password for " _<br /> & objService.DisplayName & " run by user " & CSAccount & "."<br /> Wscript.Echo "Failure Changing Username and Password for " _<br /> & objService.DisplayName & " run by user " & CSAccount & "."<br /> Else<br /> shellobj.LogEvent 0,"Successfully Changed Username and Password for " _<br /> & objService.DisplayName & " run by user " & CSAccount & "."<br /> Wscript.Echo "Successfully Changed Username and Password for " _<br /> & objService.DisplayName & " run by user " & CSAccount & "."<br /> End If<br /> <br /> End If<br /> <br /> Next </span></span></div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" > <br />End Sub</span></span></div> <div><span style=";font-family:Arial;font-size:85%;" ></span> </div> <div><span class="010130715-29032006"><span style=";font-family:Arial;font-size:85%;" ></span></span> </div>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1143041522730052582006-03-22T09:32:00.000-06:002006-03-22T09:55:05.580-06:00VMware: Backing up your ESX Configuration/VMX files<div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">This is a quick/easy/down/dirty way of backing up your ESX configuration information.<br /><br /></span></span></div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"></span></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">You'll need to add a cron job, and create a script to run that cron job.<br /><br /></span></span></div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"></span></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">Here's the script that I used to mount a Windows share, copy the files over, and then unmount the Windows share (I saved it in /root as <a href="/scripts/backup_sh.txt"><span style="font-weight: bold;">backup.sh</span></a>:</span></span></div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">#*******************************************************************</span></span></div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">#!/bin/bash</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">mount -t smbfs //windowsserver/sharename /mountpoint -o username=user/DOMAIN,password=password<br /><br /></span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">cd /mountpoint/ESX_Backups/<br /><br />rm -rf ./old.$HOSTNAME/</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"><br />mv ./$HOSTNAME/ ./old.$HOSTNAME/</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"><br />mkdir $HOSTNAME</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"><br />cd /</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"><br />cp -duR /etc/ /mountpoint/ESX_Backups/$HOSTNAME/</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"><br />cp -duR /home/ /myappro/ESX_Backups/$HOSTNAME/</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;"><br />umount /mountpoint</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006"><span style="font-family:Arial;">#*******************************************************************</span></span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span><span style=";font-family:Arial;font-size:100%;" ></span><span style=";font-family:Arial;font-size:100%;" ></span><span style=";font-family:Arial;font-size:100%;" ></span><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006">For this to work properly, in your Windows share, you will already need to have a folder named ESX_Backups (it is case sensitive).<br /><br />You'll need to figure out where you mount point is going to be, where you can mount the Windows share to.<br /><br />Also, make sure you do a <strong>chmod 700 backup.sh</strong> so this file will be executable.</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006"></span></span> </div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006"><br />By copying all files in /etc/ and /home/ I get all ESX config files, and VM config files. You could modify this to be more specific, but I didn't see the need to. I like the KISS method.<br /><br /></span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006">Now I made a cron entry like this:</span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006"><span class="348081915-22032006"><span style="font-family:Arial;">#*******************************************************************</span></span></span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006"><span class="348081915-22032006">#!/bin/bash</span></span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006"><span class="348081915-22032006">10 23 * * * * root /root/backup.sh > /dev/null 2>&1</span></span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ><span class="348081915-22032006"><span class="348081915-22032006"><span class="348081915-22032006"><span style="font-family:Arial;">#*******************************************************************</span></span></span></span></span></div> <div><span style=";font-family:Arial;font-size:100%;" ></span> </div> <div><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">And saved it as <span style="font-weight: bold;">/etc/cron.d/<a href="/scripts/backupcron_sh.txt">backupcron.sh</a></span>, with a <strong>chmod 500</strong> for it. <br /><br />S</span></span><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">imple, effective, & very little time to implement. And now I have the past 2 days worth of ESX and VM config</span></span><span class="348081915-22032006" style="font-size:100%;"><span style="font-family:Arial;">.</span></span></div>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.comtag:blogger.com,1999:blog-24130791.post-1142946601104193602006-03-21T07:10:00.000-06:002006-03-21T07:10:01.110-06:00VMware: Virtualization Best Practices Forum<DIV><SPAN class=026300713-21032006><FONT face=Arial size=2>Where: <A href="http://www.cmaontheweb.com/"><STRONG>CMA</STRONG></A>, Baton Rouge, LA, 8:00am - 1:00pm</FONT></SPAN></DIV> <DIV><SPAN class=026300713-21032006><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=026300713-21032006><FONT face=Arial size=2>Also, immediately following, there will be a meeting of the <A href="http://www.lavmug.org/"><STRONG>Louisiana VMware Users Group</STRONG></A> 3:00pm - 5:00pm.</FONT></SPAN></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV>Jase McCartyhttp://www.blogger.com/profile/13978740185976006598noreply@blogger.com