Monday, June 1, 2009

VMWare ESXi - Moving vmware images between esxi servers

VMWare ESXi is the free hypervisor from vmware which is to be installed on the bare hardware unlike vmware server which runs as an application on another server grade operating system.

Even ESXi installs a very thin unix based OS behind the scenes. But it is part of the esxi installation itself, so it is not transparent to the end user/administrator on installation process.

The minimal OS have shell, vi editor, even ssh, ftp servers, etc. But they are not directly accessible for administrators. Even for adding a new vm, the officially supported way is to use combination of vmware infrastructure client, vmware convertor, etc.

But the very important thing is *SSH can be enabled and the vmware image can be scp ed from one esxi server to another or from any other machine to a esxi server*.

To enable ssh or any other services,
* From the server console, press Alt + F1 and type "unsupported" (without quotes). Note: When you type. it wont be echoed in the standard output!!
* Enter your esxi root password.
* Now you are in the shell!!
* Edit /etc/inetd.conf with vi editor. (Sorry nano fans, it is not available here.)
* Uncomment any of the services you want to enable.. ssh/ftp
* After editing, you need to send HUP signal to the inet.d process, for which the instruction is present head of the same file /etc/inetd.conf.
* Now press Alt + F2 to come back to the server console.

Now you can ssh into the server or scp vms to the server. After scping they can be added to the inventory from the infrastructure standalone client/vmware cli. But i haven't tried cli.

Another way to copy/move vms between vmware esxi servers is to use the vmware convertor and choose source and destination as the corresponding esxi servers. With this option, you get to enjoy additional functionalities like changing the vm properties. But that can be done any time even after moving with the help of standalone client.

Happy virtualization experiences..