Monday, August 02, 2010

Adventures of Vmware 2.02 and Firefox > 3.6

I still had some issues with VMWare and Firefox ...

1. VMWare plugin was not working 

Turned out that this was due to the newer versions of Firefox. Simple workaround I read off the web was to just  download and extract an older version of Firefox 3.5 to some folder and run a separate instance of firefox just for the VMWare plugin. I settled for this. This link   will be useful. 

2. Keyboard not working correctly in the VMWare plugin

Once the plugin started working, I got my old problem back. The keyboard was not working correctly inside Windows VMs, where in it would randomly lose focus and gain focus.

I found the solution here.

Simple steps are:
1. Export this variable in the environment right after login such that it will be set before starting Firefox: VMWARE_USE_SHIPPED_GTK=yes
2. Best option is set this variable in the /etc/profile like this:
export VMWARE_USE_SHIPPED_GTK=yes
3. For now just run: 

. ./etc/profile
or Reboot the system
4. Run firefox and check.

For more troubleshooting tips, check Marcus Orfila's page VMware server 2.0.2 on Ubuntu 10.04 

Monday, June 28, 2010

Use a VNC Client to Connect to VMware VMs

Yes. So after hanging around for a while to fix my VM issues, I stumbled on yet another issue.

I was unable to connect to VMs using the VMWare plugin in Firefox. I'm getting a strange error "cannot access Virtual machine console. The request timed out. The attempt to acquire a valid session ticket for "abcdefVM" took longer than expected. If this problem persists, contact your system administrator. ". Before I break my head on this, I wanted to quickly check an easy way to connect to the VMs.

Somewhere, I remember that Vmware uses VNC protocol. So did a quick search and found that we can indeed connect using any VNC client to connect to VMware VMs. Check this VMware KB article.

Technology rocks!

Problems running VMware VM in Linux on a NTFS partition - Solved

I have moved all my VMDK files to a NTFS partition. After this whenever I tried to run a Vmware VM, the mount.ntfs process took up 100% CPU. I upgraded my NTFS Driver as well (with the latest version of NTFS-3G) . 


Finally, after some reading and searching, found a setting to resolve this. All we need to do is to add an entry in the VMX file:
“mainMem.useNamedFile=FALSE” 
Found the solution here http://www.tuxera.com/community/ntfs-3g-faq/#highcpu 


Have fun!

Sunday, June 27, 2010

Just Maath Maathalli ....

Vasanth earlier requested for the Just Maath Maathalli title song lyrics . Here it is...


Credits: Harsha BN from http://kan-lyrics.blogspot.com .. Just Maath Maathalli Lyrics.. 

Ellindhalo Nee Edhurige Bandhe
Nannedege Naguva Beerutha Nindhe
Thande Nee Maayaalokave..



Kshnadhalle.. Nannanne Naanu Marethe..
Preethi Madhura.. Manasu Bramara..
Kanasondhu Huttaythu.. Ninna Hesarannittaythu..
Kaddhe Nee Cheluve Nanna Manasanne..
Just Maath Maathalli.. She stole my heart away..
Just Maath Maathalli.. She took my breath away..
Naa Ninna Mechchaaythu.. Kanasella Huchchaaythu..
Idhu Eno Eko Hego Naa Kaane..
Just Maath Maathalli.. Just Maath Maathalli.. Just Maath Maathalli.. Just Maath Maathalli..
(Some English Lyrics)
Kanasondhu Huttaythu.. Ninna Hesarannittaythu..
Kaddhe Nee Cheluve Nanna Manasanne..
Just Maath Maathalli.. She stole my heart away..
Just Maath Maathalli.. She took my breath away..
Naa Ninna Mechchaaythu.. Kanasella Huchchaaythu..
Idhu Eno Eko Hego Naa Kaane..
Just Maath Maathalli.. Just Maath Maathalli.. Just Maath Maathalli.. Just Maath Maathalli.
Enjoy! :)

Tuesday, June 22, 2010

Success after failure... Upgrade to Ubuntu 10.04 successful ...

After trying to upgrade my Ubuntu 9.10 to 10.04 Alpha and failing, I felt disappointed.  I reinstalled Ubuntu 9.10, Copied over the settings painfully, reinstalled and reconfigured everything and moved on. I was waiting for 10.04 to be released so that I can try the upgrade again.

Now, it was 2 months since Ubuntu 10.04 got released. So, I gave a it one more shot. The upgrade went really smooth and fine. But after restarting, I was again disappointed.

The same blank screen and some error messages something like "udreadahead process got killed and main returned an exit code of 4".

I tried rebooting multiple different kernels, with no luck. I gave up and installed Ultimate Edition Linux (derivative of Ubuntu 10.04) on different partition hoping to get some time and troubleshoot this.

Luckily, when I reinstalled 9.10, I created a separate Home partition (learnings from previous failures) and it saved lot of my time and data. Pidgin, Mozilla, Desktop settings all were as earlier, thanks to the separate Home partition.

So, today, I had a good nice relook at the error message of my uppgraded Ubuntu 10.04. I rebooted into rescue mode (thanks to new UE Linux) and did a chroot. Updated the initramfs images as I suspected bad init image.
mkdir /media/oldroot
mount /media/sda1 /media/oldroot
mount  /proc
update-initramfs -k all -u
Rebooted and expected miracle. No use. Then, I noticed the ureadahead error.. Nice clue...
mount /media/sda1 /media/oldroot
mount  /proc
apt-get remove ureadahead
update-initramfs -k all -u
This time after reboot I saw a different set of errors indicating missing ureadahead and lot more.OK..Time to add back the ureadahead..I also wanted to check the post install configuration and out of sheer curiousity tried the dpkg command..
mount /media/sda1 /media/oldroot
mount  /proc
apt-get install ureadahead
update-initramfs -k all -u
dpkg-reconfigure -a
I got lots of questions. Patiently, choose the right option and rebooted.

Voila! My Ubuntu 10.04 boots :) 
Lots of time saved and upgrade successful as well,

Sunday, May 02, 2010

Accessing Linux mdadm RAID+LVM volumes/data in Windows using a VM - Rewritten

MEGA Warning (6th June 2010): I'm facing some Ext4 file system corruption (orphaned nodes; Lost files; already lost some data as well) in this configuration. Try with utmost care and BACKUP!

I wrote most of this in my previous post and lost it when I clicked publish (I think it is because i'm using IE8 and compatibity view was NOT turned ON). So continuing from the point where its left over...

The only way to do this is run Ubuntu in a Virtual Machine, but it should able to access the RAID partitions from physical disk. VirtualBox has a feature where we can a mount a physical partition or a physical disk inside a VM.

1. Create a VM using VirtualBox with 1 Virtual Hard disk
2. Install Ubuntu, mdadm, lvm2, samba, VM addons. Shutdown the VM.
3. Create VMDKs from RAW partitions
  • Clue:VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk \\.\PhysicalDrive0
  • I created VMDKs for all my Physical Disks.
4. Attach them to VM as SATA drives. Power On the VM.
  • Warning: Do not attempt to mount the partitions, which are already mounted in the Windows Host. Potential File Corruption can occur. You have been warned. Also, before you try this, please take all Backups (which you may need to restore your PC is earlier condition). You are responsible for all the consequences and NOT me :P
  • You could also use your Physical Ubuntu root partition, but it might mess up your boot records and GRUB, hence we are using a new VM.
5. Mount your actual linux root partition and copy the necessary files (LVM backup folder, RAID config files mdadm.conf, SAMBA config files to your new VM root)
6. Look at your original linux rootfs fstab file and copy over the relevant entries (copy the Home partition entry as well, would be useful to get same look and feel of your physical Ubuntu Box)
7. Run mdadm -E -s to probe the RAID volumes and make sure they show up correctly.
8. Modify your samba file share entries as per need. Modify your VM IP address as per need ( I have set them same as my Physical Ubuntu box). Reboot.
9. Now all the RAID volumes should be automatically mounted (provided you had configured that in fstab) and also all the files shares should be available as earlier on the same IP address.

You could also use NFS instead of SAMBA or hey even iSCSI or AoE (more on this in future!) to directly access the volumes.

Voila! You can access all the Data on RAID (originally which was running from your Physical Ubuntu Box) though the network.

Saturday, May 01, 2010

Accessing Linux mdadm RAID+LVM volumes/data in Windows using a VM

Ya. So after creating the RAID volumes on Linux and feeling happy about having fault tolerance, now suddenly I wanted to use Windows 2008 R2  (to try out HyperV) and Windows 7 (Windows 7 is now free for me now that I have a MSDN subscription  :P) . But, all my music, movies, ebooks all are on a Linux RAID. After searching for a mdadm solution for Windows, I realised that it doesn't exist. So, I found a quick solution.

Edit: I typed out the whole thing and when I clicked publish.. half the stuff is gone.. I'm rewriting this as a new post..

Wednesday, March 24, 2010

Exploring Software RAID & LVM on my Ubuntu Box.... DMRAID and MDADM conflicts

I have been exploring RAID and LVM for last few days and I must say it has been good so far..

And let me say .. this is not another writeup on how to use RAID and LVM. These articles will help you kick start and understand RAID and LVM basics:
I went through those. I have around 4 HDDs (250GB IDE + 250 GB SATA +500 GB SATA +1TB SATA) and I decided to try out RAID to safeguard my data. I created a 400GB RAID5 on LVM volume. Later I added another 200 GB and increased the usable size to 600GB (without any Data loss or downtime). The RAID 5 volume underwent reshaping (and took some 4 hrs).

After doing this my excitement increased and I wanted a RAID1 volume for my Virtual Machines (as RAID5 will be slower and CPU intensive for IO intensive apps like VMs and Database). So, I added another 250GB RAID1 Volume.

I didn't stop there. I wanted even more faster write speeds and went for a 50 GB RAID0 volume (the partitions are distributed over 3 disks).

After doing all this and doing a reboot, I found that my RAID 1 and RAID0 volumes were down. When I checked in (cat/proc/mdstat) and it listed strange RAID volumes with names like md_d1 and md_d2. I was able to mount my RAID volumes by doing :

mdadm --stop /dev/md_d*
partprobe

cat /proc/mdstat #(to check the status)

(Initially I also had to assemble the RAID volumes again and resysnc due to some reasons)

I had to do this on every reboot. I did lot of searching in Google and found lot of people facing similar issues. Finally, my analysis indicated that it is caused due to another RAID utility dmraid, which was trying to auto-detect the RAID volumes and assemble them whereas mdadm the actual tool I used was also doing the same. Some suggested using a initrd file without dmraid. Some suggested removal. I was sure that I don't need dmraid and went for the removal

After removing dmraid (using apt-get remove dmraid) all my issues are solved and the RAID volumes mount automatically on boot.

I hope this helps others to troubleshoot and solve their nagging issues with RAID (when both mdadm and dmraid are installed).