HowTo Clone a Virtual Machine On VMWare’s free ESXi

You will require SSH access to your Virtual Machine, read over my article Gaining SSH Access To VMWare ESXi which provides the steps required to gain SSH access.

Once you have SSH access, you just need to create a Virtual Machine Directory in your DataStore which should be located in “/vmfs/volumes/datastore1/”. Type the following.

mkdir /vmfs/volumes/datastore1/NewVM

You will then need to run the “vmkfstools” to clone the Virtual Machine.

/vmfs/volumes/4991bc35-5ced5b0c-a99e-00221953f98d # /sbin/vmkfstools -i /vmfs/volumes/datastore1/exch01/exch01.vmdk /vmfs/volumes/datastore1/newvmware/newvmware.vmdk
Destination disk format: VMFS thick
Cloning disk ‘/vmfs/volumes/datastore1/exch01/exch01.vmdk’…
Clone: 100% done.
/vmfs/volumes/4991bc35-5ced5b0c-a99e-00221953f98d #

The Virtual Machine should now be cloned.

Some may ask how you now create a new Virtual Machine based on this clone. You simply do the following.

  1. Make a new VM on this server
  2. Choose ‘Custom’ and when you get to the ‘Select a Disk’ portion of creation you will browse the datastore and select this newly renamed vmdk file.

Viola! Done!

Gaining SSH Access To VMWare ESXi

*UPDATE* If you’re using ESXi 4.1 you no longer are required to manually enable SSH. You can do this via the “Troubleshooting” menu. More instructions here http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1017910

I was trying to get access to VMWare ESXi as this is the only way to access the images for each Virtual Machine as snapshots seem to have messed up an Exchange install. I will go into more depth below. But first, the following steps are required to open up SSH access to your ESXi Machine.

ESXi 3.5 does ship with the ability to run SSH, but this is disabled by default (and is not supported). If you just need to access the console of ESXi, then you only need to perform steps 1 – 3.

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command vi /etc/inetd.conf).
5) Find the line that begins with #ssh and remove the #. Then save the file. If you’re new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file.
6) Once you’ve closed the vi editor, run the command /sbin/services.sh restart to restart the management services. You’ll now be able to connect to the ESXi host with a SSH client.

Update for ESXi 3.5 Update 2 – With Update 2 the service.sh command no longer restarts the inetd process which enables SSH access. You can either restart your host or run ps | grep inetd to determine the process ID for the inetd process. The output of the command will be something like 1299 1299 busybox      inetd, and the process ID is 1299. Then run kill -HUP <process_id> (kill -HUP 1299 in this example) and you’ll then be able to access the host via SSH.

Credit to the above steps go out to vm-help.com and you can read the above steps and comments on thier site.

The main reason why I required this, is the snapshots provided with VMWare work great. But I had to re-install exchange becuase of a configuration change that couldn’t be reversed. I had created a Active Directory Child Domain on an existing Domain, and then had setup Exchange 2007. But in the long run, this wasn’t required, instead I wanted to use our existing Domain. Removing the new Child Domain and deleting the Domain Controller/Demoting woudl have caused issues with Exchange.

So I decided to use ESXi Snapshot Manager to revert back to when I created a Snapshot after install Windows Server 2003, as it was a clean install. Once I did then and then went on to install Exchange again. Exchange Setup had complained that the server’s role was already installed and setup. Which was not the case, so I don’t know what really happened, either way. I’m going to make backups through SSH from now on.

Drupal to WordPress Migration

So you might have noticed that my last post about this topic was removed. I had some issues with the migration that I’ve now fixed. Specifically if you’re migrating Drupal to WordPress and have the URL Aliases module setup with Drupal. You will run into issues with WordPress permalinks, I plan to release some information on how I fixed this. At the moment its really manually. Leave a comment if you need assistance with this. I think I might also update the following information provided by someone else on how to migrate your site.

How to migrate from Drupal 5 to WordPress 2

At the moment I have posts and permalinks working. So I didn’t take a big SEO hit. I am now working on comments. I won’t be migrating the categories over, I’m going to create new categories and go through my articles and re-tag and categorize them.

Cheers!

Fastcgi and the dreaded aborted: select() failed

I was getting reports of “500 Internal Server Errors” on two of my web servers. And after further investigation it looks like it was related to the following error.

(4)Interrupted system call: FastCGI: comm with server “php-fastcgi.fcgi” aborted: select() failed

After doing some reasearch I stumbled upon the following patch.

http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/3de22bc415d3da02?pli=1

Will test this out and see if it has resolved some of the problems.
*UPDATE* The following Debian Lenny and Etch packages complied by a non Debian Package Maintainer are available.

http://isp-control.net/forum/thread-5462.html

Upgrading libapache2-mod-fastcgi from 2.4.6 to 2.4.7 seems to have rectified the issue.

Cheers!

*UPDATE*  Heres the link to the FastCGI developers site talking about the bug. http://www.fastcgi.com/archives/fastcgi-developers/2009-January/000156.html

lighttpd won’t start and doesn’t output or log any error message

I was working on a server and for some reason lighttpd wouldn’t start for some odd reason. Running it via Debian/Ubuntu “invoke-rc.d lighttpd start” or “/etc/init.d/lighttpd start” wouldn’t reveal an error message or anything in the log.

I hop’d on irc.freenode.net and put some information about my problem in the channel #lighttpd channel.

11:15 < comm> Hi, lighttpd recently won’t start up and doesn’t give any error output in the logs or stdout, I have an strace log.
11:17 < comm> The following is the strace output http://pastebin.com/m74389d99
11:35 < hoffie> comm: you are probably running in the bug that there are some error messages in a bad stage (right after forking, but
before having the errorlog available), so you cannot see the message…
11:35 < hoffie> this is being worked on
11:36 < hoffie> strace -ff -ewrite lighttpd … should reveal it
11:48 < comm> hoffie: danke!
11:49 < comm> hoffie: and it did find my error, thank you!

Now I can go about fixing this blunder!

Apache2 Directory Listing Doesn’t List Password Protected Folders

If you’ve ever used Apache2 and .htaccess with the “Options Indexes” value to show the content listing of a directory. You would know that unfortunately Apache2 doesn’t show folders that are forbidden or password protected.

What can you do about it? You could try using “IndexOptions ShowForbidden” which states “If specified, Apache will show files normally hidden because the subrequest returned HTTP_UNAUTHORIZED or HTTP_FORBIDDEN" however this won't show Folders that are protected for some reason. So at this point there is no way to show passworded folders.

Use Your Video Card To Crack Secured Wireless AP’s

It looks as though a company called “Elcomsoft” is using NVIDIA developer tools to create software that cracks Secured Wireless AP’s.

There’s a new application from Elcomsoft that explicitly uses NVIDIA development tools to work its magic, but the GPU manufacturer may be less than thrilled about it. NVIDIA’s Compute Unified Device Architecture, or CUDA, is a set of development tools (including compiler) designed to simplify the task of coding for the company’s GPU products. The toolset has been available since February, 2007, but NVIDIA has heavily emphasized CUDA throughout 2008, touting it as a development platform for the company’s upcoming Tegra line of products, and as an important component of GPU software development. NVIDIA fully intends to continue developing top-end GPUs, but the company has broadened its market focus; CUDA, and the development of CUDA-enabled software are both major initiatives.

NVIDIA basically has its own development suite that allows you to code for the processor on the NVIDIA line of graphics card. Much like x86 processors, the code would only work on the NVIDIA processors. Elcomsoft’s use for the language probably departs from the sorts of software development projects NVIDIA had in mind. A year ago, we covered Elcomsoft’s work in GPU-assisted password cracking; now the company is ready to debut a shipping product along the same lines. Elcomsoft boasts that its new “Elcomsoft Distributed Password Recovery” software is quite a piece of work, and describes it thusly. “ElcomSoft patent-pending GPU acceleration technology implemented in Elcomsoft Distributed Password Recovery allows using laptop, desktop or server computers equipped with supported NVIDIA video cards to break WiFi encryption up to 100 times faster than by using CPU only.”

And how fast can these cards crack Wireless Security, lets just say its fast.

The list of goodies continues. Elcomsoft supports (meaning, can crack) both WPA and WPA2 10 to 15 times faster when using a modest 8800M or 9800M GPU, and up to 100 times faster if you happen to have a GeForce GTX 280 handy. Elcomsoft, of course, envisions only legitimate uses for its software, stressing its applicability to government, forensic and corporate use. Hackers, of course, are not mentioned as a beneficiary, though it’s possible that they just might glean some unspecified gain from such software.

Read the arstechnica.com article “Company puts NVIDA GPUs to work cracking wireless security”

vBulletin Big Board Linux Server Optimization Part 1

Hello,

I’m just going to explain my experience with a vBulletin Big Board and how to get the most out of your hardware by simple tweaks and changes to the software that your site runs. I will break this article down into sections.

What is a big board?

Mobile Chat When Will it Work?

If you’ve had an iPhone since the launch of Apples Application Store, then you most likely have bought the app Mobile Chat. I mean who wouldn’t, just looking at their features http://mobilech.at/features you’d be silly not to pick the only instant messenger on the iPhone. Granted there are Web App versions, but nothing application wise. Here are some of the features.

MobileChat supports the following protocols:

* AIM/ICQ/.Mac/MobileME
* Windows Live/MSN
* Yahoo Messenger
* GTalk
* Jabber/XMPP

Multiple Accounts

Now all of your accounts can be online at one time. You can connect up to 10 accounts over varying networks simultaneously. That means you can have your 3 AIM accounts, your GTalk account and your 2 MSN accounts all connected from your iPhone.

Buddy Icon Support

Set your buddy icon from a picture in your photo library and see your friend’s icons too. A first for MobileChat!

Profiles & Away Messages

Set your profile and view your friend’s or set a personalized away message.

Many people will purchase this application since its rather cheap, coming in at only $2.99 isn’t going to break your budget.

So you pay $2.99 and can’t wait for it to install so you can login to MSN and message all your friends from your iPhone. However after it installs and you setup your MSN account and try to connect it works! Congratulations you’re one of the luckiest people to have purchased this application and actually have it work out of the box. To this day I have only been able to login to MSN once and talk to a friend. And that wasn’t even after I installed the application.

To much amazement after having issues I wondered if anyone else was having the same issue as me. And yes, lots of people were reporting the same issue. And there was a response by the Twenty08 team that develops Mobile Chat

http://tumblr.twenty08.com/post/47822232/what-we-did-wrong-and-how-were-going-to-fix-it

Which was a nice relieve to the people who paid for the application but a even bigger relieve to the people who just wanted what was advertise. I mean all money aside, Mobile Chat is something almost every person with an iPhone wanted.

Then even more information start coming out about what the issue was, and each week there was even more problems and updates. Here are some blog posts that I’m talking about, they speak for themselves.

http://tumblr.twenty08.com/post/45993283/bringing-in-the-big-guns

http://tumblr.twenty08.com/post/46106023/aim-connectivity-issue

http://tumblr.twenty08.com/post/47860210/mobilechat-server-2-0

http://tumblr.twenty08.com/post/48490814/mobilechat-status-update

And even today as I’m writing this article, I still can’t seem to connect to MSN or Gmail Talk.

Now, I didn’t request a refund. Why? It’s pocket change, and I’d rather have the developers keep the money they’ve probably already spent. I just can’t get past the bad taste this whole application gave me. I’m at a lost of words.