XenServer - Windows Guest TCP/IP not working properly after XenTools Update2 Installed

March 11th, 2010

intermittent communication failure between computers
that are running Windows XP or Windows Server 2003
http://support.microsoft.com/kb/904946/
To work around this problem, turn off checksum offloading on the network adapter. To do this, follow these steps:
1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3. In the right pane, make sure that the DisableTaskOffload registry entry exists. If this entry does not exist, follow these steps to add the entry:
a. On the Edit menu, point to New, and then click DWORD Value.
b. Type DisableTaskOffload, and then press ENTER.
4. Click DisableTaskOffload.
5. On the Edit menu, click Modify.
6. Type 1 in the Value data box, and then press ENTER.
7. Exit Registry Editor.

—————-

2. Use the registry editor and locate the “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\xennet\nics” key.

3. Each key under nics will have an associated MAC address for each VIF.

4. Locate the “IPAddress” value and double click to edit.

5. The value contains two lines, one the IPv4 address of the interface and one an IPv6 address.

6. Delete the IPv6 address on the second line and leave the IPv4 address.

7. Under SubnetMask key, delete the corresponding subnet value for IPv6.

8. Reboot the VM.

—————–

1. Install the XenTools and reboot the VM.

2. Use the registry editor and locate the “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces” key.

3. Look at settings under each GUID to find the corresponding IPAddress and SubnetMask values.

4. Edit both the “IPAddress? and ?SubnetMask” value.

5. The value contains two lines, one the IPv4 address of the interface and one an IPv6 address.

6. Delete the IPv6 address on the second line and leave the IPv4 address.

7. Under SubnetMask key delete the corresponding subnet value for IPv6

8. Reboot the VM.

9. VM Networking, VIFs, and XenTools drivers should work as expected.

Unable to Run Windows Update / Upgrade ServicePack sucessfully

January 3rd, 2010

Check C:\Windows\Logs\CBS\CheckSUR.log

Identify the missing part
=================================
Checking System Update Readiness.
Binary Version 6.0.6002.22202
Package Version 6.0
2009-10-04 03:00

Checking Windows Servicing Packages

Checking Package Manifests and Catalogs

Checking Package Watchlist

Checking Component Watchlist

Checking Packages
(f)    CBS MUM Missing    0×00000002    servicing\packages\Package_for_KB961260_server_0~31bf3856ad364e35~amd64~~6.0.1.3.mum
(f)    CBS MUM Missing    0×00000002    servicing\packages\Package_for_KB961260_server~31bf3856ad364e35~amd64~~6.0.1.3.mum
(f)    CBS MUM Missing    0×00000002    servicing\packages\Package_for_KB961260~31bf3856ad364e35~amd64~~6.0.1.3.mum

Checking Component Store

Summary:
Seconds executed: 793
Found 3 errors
CBS MUM Missing Total count: 3

Unavailable repair files:
servicing\packages\Package_for_KB961260_server_0~31bf3856ad364e35~amd64~~6.0.1.3.mum
servicing\packages\Package_for_KB961260_server~31bf3856ad364e35~amd64~~6.0.1.3.mum
servicing\packages\Package_for_KB961260~31bf3856ad364e35~amd64~~6.0.1.3.mum
servicing\packages\Package_for_KB961260_server_0~31bf3856ad364e35~amd64~~6.0.1.3.cat
servicing\packages\Package_for_KB961260_server~31bf3856ad364e35~amd64~~6.0.1.3.cat
servicing\packages\Package_for_KB961260~31bf3856ad364e35~amd64~~6.0.1.3.cat

Download KB961260

Expand the MSU files by the following command

EXPAND -F:* IE8-Windows6.0-KB961260-x64.msu C:\temp

and Expand the CAB files

EXPAND -F: IE8-Windows6.0-KB961260-x64.cab C:\temp2

Copy all *.MUM to C:\Windows\servicing\Packages

And Restart again the the Windows Update

Failure(”Error from xenguesthelper: caught exception: Failure(\\\”Subprocess failure: Failure(\\\\\\\”xc_dom_linux_build: [2] elf_xen_note_check: ERROR: Not a Xen-ELF image: No ELF \\\\\\\”)\\\”)”)

November 7th, 2009

1) Retrieve the UUID on the GuestVM, say your GuestVM is drbd-01

[root@xenserver-home log]# xe vm-list name-label=drbd-01 params=uuid
uuid ( RO)    : da2a9648-732c-74d6-1cdf-a475a57acc88

2)  Enable the BIOS Order function

[root@xenserver-home log]# xe vm-param-set uuid=da2a9648-732c-74d6-1cdf-a475a57acc88 HVM-boot-policy=”BIOS order”

3) Go to the General Tab of your GuestVM
a) click Properties
b) click Startup Options
c) adjust Boot Order For CentOS.iso in virtual drive you have mounted with option under the GUI for the xenserver console.

Do all you want inside the Recovery

Fixing “unsupported protocol”

November 6th, 2009

cd `pear config-get php_dir`mv .channels .channels-brokenpear update-channels

[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock

September 13th, 2009

sometime, you can use ipcs and kill them, But this won’t work always for me.

try to edit your sysctl.conf, and add in this few command

kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024

and sysctl -p

Do this before removing a Domain from Plesk

September 13th, 2009

“%plesk_bin%\websrvmng.exe” –remove-sites-cache

And remove from the Plesk control panel

If that’s failed. Please run this command, and try delete again.

“%plesk_bin%\websrvmng.exe” –reconfigure-vhost –vhost-name=<your_domain>

mdadm

September 4th, 2009


Mdadm Cheat Sheet

Mdadm is the modern tool most Linux distributions use these days to manage software RAIDarrays; in the past raidtools was the tool we have used for this. This cheat sheet will show the most common usages of mdadm to manage software raid arrays; it assumes you have a good understanding of software RAID and Linux in general, and it will just explain the commands line usage of mdadm. The examples bellow use RAID1, but they can be adapted for any RAID level the Linux kernel driver supports.

1. Create a new RAID array

Create (mdadm –create) is used to create a new array:
mdadm --create --verbose /dev/md0 --level=1 /dev/sda1 /dev/sdb2
or using the compact notation:
mdadm -Cv /dev/md0 -l1 -n2 /dev/sd[ab]1

2. /etc/mdadm.conf

/etc/mdadm.conf or /etc/mdadm/mdadm.conf (on debian) is the main configuration file for mdadm. After we create our RAID arrays we add them to this file using:
mdadm --detail --scan >> /etc/mdadm.conf
or on debian
mdadm --detail --scan >> /etc/mdadm/mdadm.conf

3. Remove a disk from an array

We can’t remove a disk directly from the array, unless it is failed, so we first have to fail it (if the drive it is failed this is normally already in failed state and this step is not needed):
mdadm --fail /dev/md0 /dev/sda1
and now we can remove it:
mdadm --remove /dev/md0 /dev/sda1

This can be done in a single step using:
mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1

4. Add a disk to an existing array

We can add a new disk to an array (replacing a failed one probably):
mdadm --add /dev/md0 /dev/sdb1

5. Verifying the status of the RAID arrays

We can check the status of the arrays on the system with:
cat /proc/mdstat
or
mdadm --detail /dev/md0

The output of this command will look like:

cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[0] 104320 blocks [2/2] [UU]  md1 : active raid1 sdb3[1] sda3[0] 19542976 blocks [2/2] [UU]  md2 : active raid1 sdb4[1] sda4[0] 223504192 blocks [2/2] [UU]

here we can see both drives are used and working fine – U. A failed drive will show as F, while a degraded array will miss the second disk -

Note: while monitoring the status of a RAID rebuild operation using watch can be useful:
watch cat /proc/mdstat

6. Stop and delete a RAID array

If we want to completely remove a raid array we have to stop if first and then remove it:
mdadm --stop /dev/md0
mdadm –remove /dev/md0

and finally we can even delete the superblock from the individual drives:
mdadm --zero-superblock /dev/sda

Finally in using RAID1 arrays, where we create identical partitions on both drives this can be useful to copy the partitions from sda to sdb:
sfdisk -d /dev/sda | sfdisk /dev/sdb

(this will dump the partition table of sda, removing completely the existing partitions on sdb, so be sure you want this before running this command, as it will not warn you at all).

There are many other usages of mdadm particular for each type of RAID level, and I would recommend to use the manual page (man mdadm) or the help (mdadm –help) if you need more details on its usage. Hopefully these quick examples will put you on the fast track with how mdadm works.

Upgrade to PHP 5.3 at CentOS 5.3

August 31st, 2009

rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy

cd /etc/yum.repos.d/
wget http://repo.webtatic.com/yum/webtatic.repo

yum --enablerepo=webtatic update php


heartbeat tool - hb_gui

August 22nd, 2009

Very Good!


Mount DVD as YUM Repo

August 20th, 2009

We need several packages to create yum repository, you can install them from CD/DVD disks or ISO images.

# yum install createrepo wget

# cd /mnt # createrepo .
Mount your CD/DVD or ISO images
DVD Disk or DVD ISO image

* If you have DVD disk, please mount dvd-rom first, and then create yum repository:

# mkdir /mnt/dvd/
# mount /dev/cdrom /mnt/dvd/

* If you use DVD iso, please copy it to the system, and then create yum repository:

# mkdir /mnt/dvd/
# mount -o loop /root/rhel5.1-dvd.iso /mnt/dvd

CD images

If you have multiple CD image files, you should mount all iso images and then create yum repository.

* Mount all iso images:

# mkdir -p /mnt/{1,2,3,4,5}
# mount -o loop rhel5.1-disc1.iso /mnt/1
# mount -o loop rhel5.1-disc2.iso /mnt/2
# mount -o loop rhel5.1-disc3.iso /mnt/3
# mount -o loop rhel5.1-disc4.iso /mnt/4
# mount -o loop rhel5.1-disc5.iso /mnt/5

Install necessary package

* Find and install ‘createrepo’ package in /mnt directory:

# find /mnt -iname ‘createrepo*’
/mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpm

# rpm -ivh /mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpm

Create yum repository
Create metadata

* Create yum repository:

# cd /mnt/
# createrepo .

Define yum repository

Create yum repository define file /etc/yum.repos.d/dvdiso.repo:

[MailRepo]
name=MailRepo
baseurl=file:///mnt/
enabled=1
gpgcheck=0

Test it

# yum clean all
# yum list