Archive for the ‘virtualization’ Category

VMWare: converting a hosted VM to a hypervisor VM – Linux troubleshooting

Saturday, June 28th, 2008

When using the VMWare convertor utility to convert between VmWare player/Workstation/server VM images to an ESX image, if the VM you are converting is Linux you might run into boot problems (“kernel panic” message) due to SCSI drivers problems.

I found a couple of resources about the problem but none fully worked for me, here is my special recipe:
The configuration I used was: RHEL 5.1 VM, and ESX 3.x server.

  1. Use the converter to load the image to the ESX
  2. If you will start the converted image on the ESX you will see a kernel panic message
  3. Go to VMWare infrastructure client -> ESX server -> vm props -> hardware -> SCSI controller -> change from buslogic to LSI Logic
  4. Load the vm CD-ROM drive with RHEL5 install disk (also serves as a rescue disk)
  5. Boot the VM from the CD -> when prompted, enter: linux rescue
  6. The rescue disk should identify the linux partition and mounts it on /mnt/sysimage
  7. After getting a prompt enter: chroot /mnt/sysimage
  8. Backup, and then edit /etc/modules.conf, add this line: alias scsi_hostadapter BusLogic
  9. Backup the current ramdisk file: cp /boot/init-[version].img /boot/init-[version].img.bak
  10. Rebuild with new module and overwrite existing:  mkinitrd -f -v /boot/initrd-[version]-img [version]
  11. Reboot the OS.
  12. Boot from the hard drive – The system will start normally

Weird that VMWare do not bother with their official proper documentation.
Kudos to the vmware user community!

I’m changing the hostname. Deal with it!

Saturday, June 21st, 2008

Lately, I’ve been crossing paths with too many enterprise-level server products that, once installed, can’t tolerate any change to the local machine’s hostname.
Don’t get me wrong, I’m not spoiled to dare wishing that a hostname change will be handle in run-time, without a restart. I’m not even suggesting that the change would be automatically detected and processed on the next product restart. I much more modest that that, Just having a documented working procedure on how to do that offline would make me a happy man. The current, glum, state of affairs is that some products would have to be completely re-installed if the hostname were to change.

hostname

Some of the reasons for changing a machine’s hostname might be:
(1) You want to clone a new server from a, best practiced already installed, server template, each cloned copy should have a unique computer name (very useful in test environments, especially handy when making a vm duplicate of a template virtual machine).
(2) You have an existing server which changed its business role – you plan to install a  new application module (EAR), but want to keep the existing middleware infrastructure (JEE AS).
(3) You no longer want the server to be reachable by it’s original name (without making use of DNS administration, and aliases tricks).
(4) You want to implement a new server naming convention in your production environment.

Now Programmers, how hard can it be to live in peace with a dynamic hostname?
(1) If you are sure that the target network resource is the local machine then just use the localhost loopback interface instead of a hostname, when addressing it.
(2) Query the OS when retrieving the machine’s hostname, instead of relying on static, sometimes binary, stale, configuration files.
(3) Keep all application network resources is a centralized configuration repository. Provide an offline API for the admin to access it.

As a side note:
IBM WAS ND 6.X now has, a long awaited, offline API for updating the hostname of a machine.
If you know and care about other products that support or don’t support hostname updates, please place your comment.