Enable SSH On ESXi 5

In this blog post I will outline steps you can follow to enable SSH on your ESXi host using VMWare VSphear client. One the SSH is enabled you can use any SSH client to connect to your VMWare ESXi host and from there you have complete support for ESXCLI commands and other troubleshooting you need to do on your ESXi host.

First of all open your VSphear client and connect it to your ESXi host.

Convert VHD to VMDK

Recently I found myself in a situation where I had a .VHD file and wanted to upload and attach it to one of my VMs in ESXi server. Easy enough, right!! Well, not as easy as I thought.Apparently the Microsoft Hyper-v version of the virtual hard disk(.VHD) is not directly compatible with the format of other VMWare product such as VMware Workstation, VMware Player, VMware Server, VMware Fusion or something like VMWare ESXi. My assumption was that ESXi will be able to accept .VHD file and attach is just fine with the existing VM but that is not true.

After doing some research online I figured that .VHD file can not be attached directly. So what I ended up doing is

  • Converting the .VHD file to .VMDK file.
  • Then uploading .VMDK file to the ESXi Data Store
  • Attaching the .VMDK file as a Hard Drive to my Existing VM

Anyway, the point is, I wanted to list out some of the free tools available out there for someone like me who wants to move the Hyper-V .VHD files to VMWare infrastructure.

Of course I did not use all of these tools but just wanted to list them out here for some who is interested in using one of these utilities. I am sure, there are plenty of other tools available. You can also use Oracle VM VirtualBox VBoxManage.exe application to convert between different formats of the virtual hard drivers.

Also be careful if you are planning to use VMWare vCenter Converter because that only converts the live VHD meaning you can not just point it to non attached .VHD file and convert to .VMDK

What I ended up using was WinImage and I following is the step by step tutorial on who to convert .VHD file to .VMDK file using WinImage.

Be mindful that WinImage is something you have to buy. For me this was not an issue because they provide 30 Day trial version and this conversion was a just a one time deal for me.

Install and open WinImage.

Error: ENOENT, stat 'C:\Users\Demo\AppData\Roaming\npm'

Ok, so you have Node.JS installed on your machine and you are trying to work with NPM and gives you following error.

Error: ENOENT, stat 'C:\Users\Demo\AppData\Roaming\npm'

This seems to be the problem with the installer in the Node.JS or issues related to how the folders are being setup. In order to fix this issue, you need to go at following Location and create a new Directory named "npm".

Installing Node.JS On Windows 8

In short blog post I will show you how to install Node.JS on a Windows OS. For our purposes I will be using Windows 8.1 machine. The overall process should (including a test page) should not take more than 10 minutes.

Download the Node.JS installer from the Site

Submit MVC Form with Ajax.BeginForm

In this post we looked at how to submit a Form(Post a Form) in Asp .Net MVC using Ajax. The blog assumes that you have a working knowledge and you are able to create a basic MVC application. If you are new to MVC, please refer to my this post. This will walk you through a step by step process of creating Asp .Net MVC application from scratch.

Create The Basic MVC Application

This Link provides you a step by step tutorial for this.

Sample MVC Form

For our example let's say in your application user has to enter a Product and its details on a page. However page refreshing after every product submit is something they do not like very much. And so you want to improve this behavior by submitting this from Asynchronously using AJAX. Great, you have two options.

  • Using Ajax.BeginForm
  • Using Pure jQuery Ajax Form Submit

Let's examine the first approach of using Ajax.BeginForm

As part of System.Web.Mvc.Ajax namespace, you have bunch of classes that contains support for Ajax operations in your MVC application. One of the class you find in this namespace is the Ajax Helper class that allows us to create a form which will be handled asynchronously as opposed to regular full post back.

In our example, I already have following two Action methods. One is a Get and the other one is Post. When user makes a GET request, they get list of existing products with a simple Form at the top of the list where they can put in the information for new products.