Categories
VMware

The program can’t start because libxml2.dll is missing from your computer

The program can’t start because libxml2.dll is missing from your computer. Try reinstalling the program to fix this problem

When you try to run the vSphere Command-Line Interface (CLI) such as vihostupdate.pl, it might not work and giving you the error message below:

The program can't start because libxml2.dll is missing from your computer. Try reinstalling the program to fix this problem

It shown more errors in the command screen

LibXML error

The problem might simply cause by you are not using the command under administrator privilege in Windows 7 or Vista platform. Try to run the cmd as administrator:

Categories
VMware

How to upgrade VMware ESXi 4.0 to 4.1

How to upgrade VMware ESXi 4.0 to 4.1

If you are using VMware ESXi 4.0 standalone or free version. You will not be able to upgrade VMware ESXi 4.0 to 4.1 using vSphere Host Update Utility. One of the solution is to use vihostupdate from vSphere Command-Line Interface (CLI) for remote installation.

Below are the steps to  upgrade VMware ESXi 4.0 to 4.1 using vihostupdate.pl from vSphere CLI

1. Download vSphere Command-Line Interface from http://www.vmware.com/support/developer/vcli/ and then install into your computer

2. Download the latest VMware vSphere Hypervisor from https://www.vmware.com/tryvmware/p/activate.php?p=free-esxi&lp=1

3. Select the package with upgrade ZIP from ESXi 4.0. Eg: ESXi 4.1 Update 1 (upgrade ZIP from ESXi 4.0)

4. Shutdown all the guest machine and set ESXi host into maintenance mode

5. Go to cmd prompt (make sure you “run as Administrator” if you are using Windows 7) and run the following command:

cd “c:\Program Files (x86)\VMware\VMware vSphere CLI\bin”

I’m using Windows 7 x64. If you are using Windows XP or 32bit Windows then it should be:
cd “c:\Program Files\VMware\VMware vSphere CLI\bin”

vihostupdate.pl -server <ESXi host name/IP> -i -b <location of the upgrade ZIP bundle>

vihostupdate.pl -server 192.168.1.7 -i -b c:\temp\upgrade-from-esxi4.0-to-4.1-update01-348481.zip

Enter the user name and password

it will start patching/upgrade your ESXi server

6.  Restart your VMware ESXi host

7. You can check the patches intalled by the following command:

vihostupdate.pl -server <ESXi host name/IP> -query

7. You can now exit the Maintenance mode to enjoy upgraded VMware ESXi 4.1

Categories
VMware

Restore Acronis backup image into VMware

Restore Acronis backup image into VMware

Issue/Problem:

Restoring the backup image into VMware (or somether dissimilar harddware) might not work. The kernel might not able to detect the hard disk or root volume. Error like “waiting for device /dev/sda3 to appear”

Solution:

The solution below is tested to work in openSUSE 11.1 in  vmware player

1. Boot with rescue mode of the install CD and log in with root rights

2. Partition Listing
cat /proc/partitions
fdisk -l /dev/sda


Sample:

device      mount point
/dev/sda1     /boot
/dev/sda2     swap
/dev/sda3     /
/dev/sda4     /home

3. Unlock encrpted partitions (perform this if you have encrypted partition with LUKS
cryptsetup luksOpen /dev/sda3 root

4. Make the swap available
swapon /dev/sda2

5. Mount your file systems
Mount root file system
mount /dev/sda3 /mnt

Mount boot file system, if separate
mount /dev/sda1 /mnt/boot

Bind mount temporary file systems
mount –bind /dev /mnt/dev
mount –bind /proc /mnt/proc
mount –bind /sys /mnt/sys

Mount other partitions
mount /dev/sda4 /mnt/home

6.  Prepare and enter the new root
Copy your mounts and DNS resolution files (Optional)
cp /etc/mtab /mnt/etc/mtab
cp /etc/resolv.conf /mnt/etc/resolv.conf

Make the mount point the new root
chroot /mnt /bin/bash

7. Reload boot loader, if desired (Optional)

* Launch yast
* Navigate to System > Boot Loader
* Select boot loader installation
* Check Boot Loader Location > Boot from Master Boot Record

8. Include the nessesary drivers in /etc/sysconfig/kernel
to do this edit the section ‘ INITRD_MODULES=”…” ‘
ata_piix -> VMWare Mother board
mptspi -> VMWare lsi scsi
Example:
INITRD_MODULES=”processor thermal ata_piix fan ext3 edd mptspi”

9. Generate new initrd
cd /boot
mv initrd-<kernelversion> initrd-<kernelversion>.old
mkinitrd -d /dev/sda3

extra modules can also be added with the -m switch (e.g: mkinitrd -d /dev/sda3 -m mptspi )
more help on options : mkinitrd -h

10. Make sure the name of the created initrd is the same as stated in the menu.1st or that the initrd link points to the new initrd file.

11. Exit and reboot the system.

Note:
If using LVM:
# Executed “/sbin/vgscan”, then “/sbin/vgchange -ay” to make LVM volume/logical groups available
# Mounted my LVM-managed root dir via “mount /dev/mastervol/Suse10.1 /mnt”

References and Resources:

http://en.opensuse.org/Using_the_rescue_system_%28advanced%29

http://forums.opensuse.org/archives/sf-archives/archives-tips-tricks-tweaks/343785-good-things-know-when-imaging-linux-different-hardware.html