Friday, December 10, 2010

V2V Conversion of a Redhat Xen VM to vSphere

I was involved in converting some Redhat Xen based VMs to VMware ESXi recently and found out that the conversion doesn't work straight away without any tweaks. So here is how we went about getting it done. Pretty simple, but just in-case anyone needs it.. 1. Find and Copy the normal kernel ( not the xen-kernel, the one that is installed by default ) rpm package on to the Xen based VM that is to be converted. 2. Convert the Xen based VM using the VMware Converter like its done on any other machine. 3. Once the conversion is complete, on the ESXi host, attach the appropriate Redhat installation media ( 1st CD, DVD ) to the newly created VM cdrom. 4. Startup the converted VM with the attached Redhat installation media and boot into the rescue mode with "linux rescue" 5. Once the system boots in to the rescue mode, it should automatically detect the Redhat Linux installation and mount it in to /mnt/sysimage. Do a "chroot /mnt/sysimage". 6. Install the previously copied kernel rpm from within the chroot'ed environment, using "rpm -i". Once the installation is complete take a look at the grub.conf and see if the necessary entries have been made by the installer. -not really necessary, installer will do the job properly every-single-time! :-) 7. Exit from the rescue environment, detach the Redhat installation media and boot up the VM with the newly installed kernel. That pretty much sums it all up. The reason why a kernel installation is necessary is, Xen kernel on a guest system is quite different from a normal kernel, and is specifically designed to run on top of a Xen Host. ( Something to do with having front-end device drivers etc.. I never finished reading up about this ) This process shouldn't be necessary for a KVM based VM, as the guests are unmodified on that platform. I have yet to try this. Hope this helps.

sysprep stuff

note to self
Ran in to some hassle with finding appropriate syspreps with VMware vCenter Converter. Quite simple as it turned out to locate them, but i keep forgetting what to put and where. Simply extract and copy all the contents of the appropriate package from this VMware KB article into the location that is displayed in the table. And remember, its not just the sysprep.exe it needs, but also the accompanying files as well. Hope i won't run into anymore time-wasting situations by forgetting this. Another thing worth noting is, in case a conversion was done without the proper packages in place, you can always initiate a reconfigure of the that VM using the Converter after making sure necessary files are in place.

Sunday, September 19, 2010

teamviewer stuff

note to self
Just happened to shut the TeamViewer from within the remote computer console and got kicked out of my session with no way to re-connect. Luckily i had ssh access to the same machine and tried a few things to get it working, as just issuing the command on the ssh'd terminal didn't go so well. Googled a bit and noticed that few others have come across similar problems starting TeamViewer from the terminal, but couldn't find a simple method that worked. -didn't look that hard anyway- Found out its a easy fix.
export DISPLAY=:0
That should do it. All it seems to need is a proper $DISPLAY with the value set to where current display manager's running. Once that's taken care of, TeamViewer can be started as a background process with "&". It should work even better with something like "screen" but didn't try that. yet.

Sunday, February 14, 2010

Moovida on F12

note to self
Experienced few problems getting Moovida to work on my Fedora 12. Moovida, formerly known as Elisa is a Media Center application. Elisa is still on yum, but the newer moovida is not on that yet.
One main problem on the old version Elisa, is that the grooveshark plugin is no longer working due to some changes (gstreamer?) [1] [2]. A set of Moovida packages for F12 are already available on the above bugzilla links, but they are not yet on the yum, seem to be undergoing review.
After downloading and building the RPMs from above, ran in to some other python related problem due to a deprecated function.
DeprecationWarning: the md5 module is deprecated; use hashlib instead
The fix was to install python-twisted.noarch
To sum it all up, below steps can be followed to get moovida on F12 until it appears on yum, which I'm hoping to take place soon.
1. Grab the SRC rpms from here. 2. Remove elisa components if they are already installed. 3. Install python-twisted.noarch along with it's dependencies. 3. rpmbuild --rebuild the moovida src rpms & install them.
Just checked it, and Grooveshark plugin is working without any problem now! :-) It doesn't have the facility to add tracks to the library, hope it's on the roadmap.

Friday, January 01, 2010

dcache on fedora12

Below are the steps taken to get dcache working on Fedora. I was using my Fedora 12 for this. A lot of stuff below is coming from my chat logs with wvithanage who is the project fellow.
Install below packages via yum along with their dependancies. yum package-name install
uuid-devel mysql-devel php-mysql php-ZendFramework-Db-Adapter-Mysqli lighttpd lighttpd-fastcgi
Make below symbolic links. You will have to create /usr/include/ossp directory as well )
Inside /usr/include/ossp/
uuid.h -> /usr/include/uuid.h
Inside /usr/lib
/usr/lib/libmysqlclient_r.so -> /usr/lib/mysql/libmysqlclient_r.so.16.0.0
Make a directory, and inside it run the below. If you don't have "svn" installed,
yum install svn would get that for you.
Now, simply change the directory to "trunk" and run the below commands.
./autogen.sh ./configure --prefix=/usr sudo make install
Run sudo dcache Point the browser to http://127.0.0.1:8085/ and create a user and login. Make sure to put the mysql database access details properly, and assign a port for dcache to listen on..and you are done. Now change your browser settings to use dcache as the proxy, after few minutes of browsing you should start noticing activities on the graphs. Hope this helps..did this in a bit of a hurry. Probably will have to go through again and make sure i didn't miss anything out.

changing opnsense mtu

 note to self When an OpnSense is deployed on Proxmox environment where MTU is <1500, it doesn't seem to auto-detect and leaves the O...