Saturday, January 12, 2013

Adventures in P2V of Red Hat 7.3 Valhalla

Well one of the old Red Hat 7.3 Valhalla build machine was in the slow process of dying and since obtaining a new license and configuring it again was impractical, we decided to give P2V a try.  First I tried the latest version of VMware Converter 5 but that failed (it doesn't support RH 7.3), so then started a search on google and best site that described the whole procedure was @ virtualaleph.blogspot.com.  My actual steps turned out to be a little bit different so I am going to list them as I remember them.  You're going to need the following:

- VMware Converter 3.0.3 CD
       You've to search the web for the ISO file. The filename that I found to be working for me was coldclone.3.03.ISO, you can google it as it is no longer available from vmware.
- Red Hat 7.3 Valhalla ISO
       can be download by following the links on this page: Red Hat ISO and save on one of the folders on the destination server.
- VMware Workstation 9
       This is the version that I was using to host the final image.


Procedure:

1. Burn the Vmware Converter 3.0.1 ISO and Boot the source server with it.  Most of the dialogs on there are self explanatory but the only thing I needed to do was the share the Virtual Machines folder on the destination Vmware Workstation 9 server something like \\20.1.0.22\Virtual Machines.

2. Step on is going to take several hours depending on the number and size of the hard drives on the physical server and your network speed.

3. After the conversion is done you're going to have a folder on the destination Vmware Workstation 9 server under virtual machines like \<Machine name of Physical Server> (this is set in step 1 on the source server).

4. Open the new VM in VW9 but don't start it.

5. Right click on the new VM in VMware Workstation dialog and check if the VMware Tools are available.  If not do the next step otherwise skip

6. Select settings (same menu as in step 5), Click on 'options' tab and change Guest Operating system to Linux (from Other) and Version as 'Red Hat Linux'. and click okay.

7. Select settings menu again if you closed the dialog or skipped step 6 and click 'CD/DVD (IDE)' under the Hardware tab. Change 'Use ISO image File' to point to the first CD ISO of Red Hat 7.3 Valhalla (you should've already saved it on the destination server on one of the folders)

8. Start the VM you might've to press F2 on the BIOS screen to boot cdrom before hard drive I certainly had to.

9. type Linux rescue on the prompt of the rescue CD.

10. Select language, keyboard but don't select network and mount the system image in read-write mode.

11. Issue the following command:
                 chroot /mnt/sysimage

12. Edit /etc/modules.conf file and change each instance of  SCSI alias with BusLogic and each Ethernet nic with pcnet32.  For me SCSI was i.o2 and eth was intelsomething. Take care with the BusLogic spelling it needs to be exact... I wasted like half an hour trouble-shooting when I added Buslogic :(

13. Navigate to /boot and make a backup copy of your initrd-2.x.y-zz.img .
Then issue the mkinitrd command mkinitrd -v -f /boot/initrd-2.x.y-zz.img 2.x.y-zz (example for me it was : mkinitrd -v -f /boot/initrd-2.4.20-20.7bigmem.img 2.4.20-20.7bigmem )

14. Reboot.  During the first boot the vm will reboot and kudzu will check for new hardware prompting for removing SCSI modules config and for adding BusLogic and pcnet32 modules.

15. The VM should now boot without kernel panic.

But if you're in my boat and getting the 'INIT: init 'x' respawning too fast error being displayed periodically on the login page (xwidow didn't launch and the text login is displayed) you've to install the vmware tools to resolve this.

16.  Right click on the vm in the VMW9 dialog and select Install VMware Tools (complete guide is available here.)

17. I basically did the following steps after logging in as root user:

mount /dev/cdrom /mnt/cdrom

cd /tmp

tar zxpf /mnt/cdrom/VMwareTools-5.0.0-<xxxx>.tar.gz

umount /dev/cdrom

cd vmware-tools-distrib

./vmware-install.pl
 

Respond to the configuration questions and press Enter to accept the default values.

18. Exit and reboot the vm from something like : shutdown -r now

19. The vm should reboot now, you might still get kernel warning most probably because some the vmware tools are supported on 2.6 kernel and the kernel on my physical server is 2.4. Now the x login screen should come up unless you had some other settings under /etc/initd file. 

20. Enjoy your new VM :) and be a Virtualization god in the Eyes of your peers ;)  





Sunday, September 16, 2012

Oracle runInstaller DISPLAY error on SUSE EL 10 SP4

So the other day I was installing Oracle 11g R2 Client on SUSE Enterprise linux 10 SP4 that I got the following error:

oracle@devsuse1:/tmp/newclient/client> ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 72192 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2055 MB    Passed
Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

So after googling around the following seems to work for me:

I launched a new terminal window and did the following:


anyuser@devsuse1:~> su - root
Password:
devsuse1:~ # xhost +
access control disabled, clients can connect from any host
devsuse1:~ # su - oracle
oracle@devsuse1:~> export DISPLAY=:0.0
oracle@devsuse1:~> cd /tmp/client
oracle@devsuse1:/tmp/client> ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 73549 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2055 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-09-16_05-49-58PM. Please wait ...oracle@devsuse1:/tmp/client>

After that the Oracle UI launched successfully and I was able to proceed.


On Solaris 10 Sparc the following seems to work like this for me:

I was logging into the Sun Box using the VNC Viewer Free Edition, but every I tried to  launch the runInstaller.sh as the oracle user I would the the same error as before. So I connected to the Sun Box using the root user... launched the terminal as root

# /usr/openwin/bin/xclock (to check if xclock windows launches which it did)
# /usr/openwin/bin/xhost +
access control disabled, client can connect from any host
# su - oracle
$ cd /tmp/database
$./runInstaller

after this the OUI launched successfully for the oracle user.

Monday, August 6, 2012

PRTG with 30 Free sensors :)

Friday, February 18, 2011

IPhone & Cisco VPN Play Nice

Well my problem was this, all the the clients Windows & Linux were connecting successfully using our Cisco VPN client IPSec (Cisco ASA 5505 on the backend) but IPhone for some reason failed to connect.  I checked the logs and looked like IPhone (4.2.6) was authenticating successfully but after that it was booted off.

After scouring the web I failed to find anyone with my particular dilemma where their regular VPN was working fine but IPhone won't connect.   I finally solved this after reviewing this:

Configuration for IPhone

It turns out that under the Crypto Maps our VPN was using DES MD5 Encryption & Authentication where as IPhone requires 3DES MD5.  So after adding a new IPSec Transform Set with Tunnel, 3DES MD5, I added it to our Crypto Maps and viola ... IPhone started connecting through the VPN.

Steps from Cisco ASDM 6.2:

- Click Configuration > Remote Access VPN
- Under Remote Access VPN
         Expand Network (Client) Access
                 Advanced
                          IPSec
                                Crypto Maps (Check here what transform set is being used)
                                 IPSec Transform Sets (Check Mode, ESP Encryption Authentication for Transform set selected under Crypto Maps)


If the Transform Set doesn't have 3DES & MD5 just create another Transform Set like 'IPhone' and select Tunnel, 3DES & MD5 for the value.  After that go back to Crypto Maps, Edit it and add the new Transform Set to the Crypto Map.  Click OK and Apply.

If your VPN was configured like mine, IPhone should now be able to connect.

Please keep in mind that I am a total noob when it comes to Cisco Configuration, but the settings I've mentioned worked for me.  I take no responsibility if such settings mess something up in your environment, write every setting that you modify  and revert back if it doesn't work for you.  I didn't delete any settings in my environment just modded & added a new transform set.

Hope this helps.
P.S This was also tested from an IPad and that works also