Archive | tech-nol-o-gy RSS feed for this section

22 February 2010 0 Comments

XenServer Windows XP converter fail

I have never been able to successfully convert a Windows XP/Vista or 2003 Server VMDK over to VHD using the latest XenServer converter (2.0.2). Lucky for me, XenServer is based on XenSource, which provided the V2XVA utility. You can find it here: http://ca.downloads.xensource.com/products/v2xva/

Once you have it downloaded, just run the following command:
v2xva.exe /verbose:LOW /config:"C:\[SOURCE]\[VM NAME].vmx" /output:C:\[DESTINATION]\

Enjoy!

16 February 2010 0 Comments

Disk IOps

A really useful article on disk IOps.

Tags:
9 February 2010 0 Comments

XenServer 5.5 network performance woes

If you're using Citrix XenServer, then you've undoubtedly ran into network performance issues. These issues are even more apparent when your deployments utilize an iSCSI SAN. I have been working through this problem for the last 2 months, and I've found countless complaints about Citrix XenServer under performing on consistent bases. The common denominator here is the iSCSI SAN connected to the XenServers over copper wire on a GIG network. [...]

22 January 2010 0 Comments

Website high availability on a shoe string budget

Up until now, if you wanted HA for your website, you would have to dish out few thousand to get your HA environment set up properly. This required several dedicated servers and a Load-balancer (e.g. F5), which in itself costs upwards a few thousand dollars to purchase. Let's not forget the license fees as well as the support maintenance contracts that are involved in purchasing the enterprise grade appliances. Most small business owners and developers may not necessarily have the capital to maintain such a complex infrastructure and up until a few years ago the only solution was to outsource this implementation with a managed service provider that could accommodate it. [...]

20 January 2010 0 Comments

Xenserver changing shared resource pools

Here is a nice set of instructions on how to backup and restore the VM metadata for your XenServer shared resource pool:

  1. On the source host or pool, in xsconsole, select the Backup, Restore, and Update menu option, select the Backup Virtual Machine Metadata option, and then select the desired SR.
  2. In XenCenter, select the source host or pool and shutdown all running VMs with VDIs on the SR to be moved.
  3. In the tree view select the SR to be moved and select Storage > Detach Storage Repository. The Detach Storage Repository menu option will not be displayed if there are running VMs with VDIs on the selected SR. After being detached the SR will be displayed in a grayed-out state.
    Warning: Do not complete this step unless you have created a backup VDI in step 1.
  4. Select Storage > Forget Storage Repository to remove the SR record from the host or pool.
  5. Select the destination host in the tree view and select Storage > New Storage Repository.
  6. Create a new SR with the appropriate parameters required to reconnect the existing SR to the destination host. In the case of moving a SR between pools or hosts within a site the parameters may be identical to the source pool.
  7. Every time a new SR is created the storage is checked to see if it contains an existing SR. If so, an option is presented allowing re-attachment of the existing SR. If this option is not displayed the parameters specified during SR creation are not correct.
  8. Select Reattach.
  9. Select the new SR in the tree view and then select the Storage tab to view the existing VDIs present on the SR.
  10. In xsconsole on the destination host, select the Backup, Restore, and Update menu option, select the Restore Virtual Machine Metadata option, and select the newly re-attached SR.
  11. The VDIs on the selected SR are inspected to find the metadata VDI. Once found, select the metadata backup you want to use.
  12. Select the Only VMs on this SR option to restore the VMs.
  13. Note Use the All VM Metadata option when moving multiple SRs between hosts or pools, or when using tiered storage where VMs to be restored have VDIs on multiple SRs. When using this option ensure all required SRs have been reattached to the destination host prior running the restore.
  14. The VMs are restored in the destination pool in a shutdown state and are available for use.

Note: You can't have the same SR attached in two different pools when using XenCenter. You'll have to disconnect from the old shared pool to use the new one.

Enjoy!

18 January 2010 0 Comments

WHMCS client “email log” link modification

If you've been using WHMCS, I'm sure you know that it uses a pop-up window to display the email messages in the client email log page. This is an excellent feature for your clients to keep track of historical data and email correspondence. There is, however, one small issue with the presentation. [...]

29 December 2009 0 Comments

XenServer hard code NIC parameters

I wanted to make sure that the network settings on the XenServers were all hard set to 1000 with full duplex. Unfortunately, XenCenter doesn't allow you to modify the NIC parameters, so the only remaining option is to do this through CLI. Here is how you do it:

  • xe pif-param-set uuid=<UUID of PIF> other-config:ethtool-autoneg=”off”
  • xe pif-param-set uuid=<UUID of PIF> other-config:ethtool-speed=1000
  • xe pif-param-set uuid=<UUID of PIF> other-config:ethtool-duplex=”full”

Once you've issued the commands, make sure that you restart XAPI. The reason why you would want to do this is, to ensure that all hosts on the network fabric are communicating at a certain speed to eliminate the guess work. This is the same reason why I did this!

Note: If you want the network interface to be unmanaged, then you'll need to first run "xe pif-list" on the host, identify the NIC UUID, then run "xe pif-forget uuid=[id]"...

17 December 2009 0 Comments

Getting PDSH and Wget to install SSH key

So, I wanted to spray an SSH public key on a bunch of hosts. Since I have PDSH installed, and I have the PDSH user key stored on those hosts, I used it to do what I needed. Below is a simple command that will grab a file, then appends it to an existing file.

The assumption is that you know what you're doing. With that in mind, I issue the command from the PDSH  as root, save the file to the ~/.ssh/ directory, then cat and append it to an existing authorized_keys2. Once that takes place, the file is removed from the destination. This beats having to do the same task repetitively or use a bash script. In other words, Parallel computing rules!

pdsh -l root -a 'wget http://[REMOTE URL]/[FILE] -O ~/.ssh/[FILE]
&& cat ~/.ssh/[FILE] && ~/.ssh/authorized_keys2 &&
rm -rfv ~/.ssh/[FILE]'
3 December 2009 0 Comments

Mod Security whitelist pingdom IP addresses

My mod_security rules (provided by OWASP) is a little too aggressive with the web bots, which includes Pingdom. To correct the issue, I've had to whitelist their IP addresses. I thought I would post for other's to use:

SecRule REMOTE_ADDR "^74\.52\.50\.50$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^83\.170\.113\.102$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^95\.211\.87\.85$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^67\.205\.112\.79$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^78\.136\.27\.223$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^67\.192\.120\.134$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^174\.34\.156\.130$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^70\.32\.40\.2$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^207\.218\.231\.170$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^204\.152\.200\.42$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^74\.53\.193\.66$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^207\.97\.207\.200$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^174\.34\.162\.242$" phase:1,nolog,allow,ctl:ruleEngine=Off
SecRule REMOTE_ADDR "^85\.25\.176\.167$" phase:1,nolog,allow,ctl:ruleEngine=Off

20 November 2009 0 Comments

IIS Web deploy error: “You must specify an encryption password to archive this property”.

I was attempting to export an IIS 6 website using the Web Deploy Command tool when I ran into an error:

Error: The property 'value' located at '/metaKey[@path='/lm/w3svc/12130']/metaKey[@path='ROOT']/metaProperty' is marked as secure. You must specify an encryption password to archive this property. Error count: 1.

It appears that you have to specify a password to create the archive, with that, I added the following to my command:

msdeploy.exe -verb:sync -source:metakey=lm/w3svc/12130 -dest:archivedir=c:\archive,encryptPassword=[pass] > wdeployarchive.log

Problem solved!

19 November 2009 0 Comments

XenServer message: “Xenhost still booting”

We experienced a network failure, which knocked off a few of the XenServer hosts. After performing the triage work, I began reviewing the XenServer hosts to make sure they were up. Of the 4 servers in one pool, 1 was experiencing an error, which I hadn't seen before: "Xenhost still booting". This meant the 3rd host was stuck in the emergency maintenance mode, and for some reason, I couldn't get it out of the mode. I had to take the following steps to correct the issue:

  1. I started by making sure that the all hosts had xapi running on all hosts.
  2. From there, I issued the following command "xe pool-emergency-transition-to-master".

Once I did this, the host synced with the master and the problem was resolved!

17 November 2009 0 Comments

XenServer Web Interface

xvp seems to do the job!

Tags:
16 November 2009 0 Comments

XenCenter does not display performance graphs

So there I was, looking at the fancy XenCenter graphs when I noticed that two of the servers in the HA enable pool would not display the graphs. My first reaction was to panic and use some colorful language (just kidding).

The solution boils down into two:

  1. The XenServer time/date is out of sync. Check to make sure NTPD is up and running. Best practice is to use an NTP proxy server on the local net for your XenServer hosts, this is especially important when you are running XenServer Essentials with HA enabled. Always trust but, verify. Make sure the time on each server host is accurate.
  2. Close XenCenter, and then remove the logs under "%AppData%\Citrix\XenCenterMain.exe*\".  Restart XenCenter and test.

Enjoy!

15 November 2009 0 Comments

Allowing over commit on XenServer

I wanted to migrate a VM from one server to the other using XenMotion when I ran into a small issue:

"This operation cannot be performed because HA would no longer be guaranteed for this pool.  To perform this operation anyway, you must disable or reconfigure HA."

Reason why this happened: When HA is enabled and a VM HA Protection level is set to Protected, in addition, the destination server must have the available memory needed to migrate the VM using XenMotion. The host server that is still holding the memory of the VM also must have that same amount of memory available (in reserve) to perform the migration. In other words, the host server must have available the same amount of memory that the VM is about to release.

Here is how to fix it the issue.

  1. On the pool master host,  type: "xe pool-list" to obtain the pool UUID, in my case it is: cbfdcdfd-b7ad-2d22-3efb-6fb3945f2e92.
  2. Run "xe pool-param-list uuid=[UUID]" to determine what the current setting for "ha-allow-overcommit" parameter is set to.
  3. To change the overcommit setting run: "xe pool-param-set ha-allow-overcommit=true uuid=[UUID]".
  4. Now run "xe pool-param-list uuid=[UUID]" and make sure that "ha-allow-overcommit ( RW): true" is set.

Now I'm able to migrate the VM from one server to the other. I live to learn more another day, Sweet!

15 November 2009 0 Comments

Operation: Cleanup the server cabinet!

Jonsie and I went in to the data center and cleaned-up the cabinet. Project included custom length color coded network wires as well as shorter (3 ft long) power wires The result of our 4 hour work below.

Before:

IMG_0100

After:

IMG_0103 IMG_0104

2 November 2009 0 Comments

Outlook 2007 error “Cannot open the item for this reminder” error

For some unknown reason, Outlook began to error when I attempted to dismiss the reminder item. After doing some research, I discovered the following Microsoft knowledge base article. The solution is to browse to the MS Office install directory via command prompt, and run the following command:  "%ProgramFiles%\Microsoft Office\Office12\Outlook.exe /Cleanreminders".

If that doesn't work, then start Outlook, go to Calendar, click on "View", then "Current View" and finally select "Recurring Appointments". Remove the item in question to get rid of the error!

28 October 2009 0 Comments

Bugzilla add text to description field

There is an easy way to add your own custom text to the Bugzilla description field. Locate "create.html.tmpl"  under /template/en/default/bug/create/, and then edit it using VI. Look for defaultcontent = defaultcontent and modify it to defaultcontent = "[CONTENT]".

28 October 2009 0 Comments

AutoIT map network drive

I had a small project that involved looking-up an IP address of a host, then use that IP address to map a network share. Below is what I came up with. Note: the variable '$me' was declared earlier on in the script.

 
; Read host list
$input = FileOpen("C:\host-list.csv", 0)
 
While 1
	$line = FileReadLine($input)
	If @error = -1 Then ExitLoop
	If StringInStr($line, $me) Then
		$split = StringTrimRight($line, 2)
		$drivemap = "X:"
		DriveMapAdd($drivemap, '\\' & $split & '\SHARE')
 
		$oShell = ObjCreate("shell.application")
		$oShell.NameSpace($drivemap).Self.Name = ( "FRIENDLY NAME" & $me )
 
	EndIf
WEnd
 
23 October 2009 0 Comments

autoit modify screen resolution

I was looking for a simple way to adjust the monitor resolution using AutoIT. Lucky for me, there is a Nifty function that can adjust the screen resolution. [...]

19 October 2009 2 Comments

autoit running multiple scripts from one source

I'm diddling around with AutoIT and I thought I would share. This is how you would approach calling other executables from one:

 
While 1
$scriptnum = Number(StringStripWS(FileReadLine("test.txt")))
Select
Case $scriptnum = 1
RunWait("1.exe")
Case $scriptnum = 2
RunWait("2.exe")
Case $scriptnum = 3
RunWait("3.exe")
EndSelect
Sleep(1000)
WEnd
 

Enjoy!