VMware Tool Patches
From AstroArch
VMware Tools Patches
Contents |
version 64607
No patches required.
version 52542
vmxnet
If you are using ESX v3.0.2 the VMware Tools v3.0.2-52542 doe not need any patches. However, vmxnet does produce 'hw csum failures' for UDP datagram packets. I have not found a fix yet.
versions prior to 52542
Using the Patches
- These patches are intended only for kernels > 2.6.18-4 but should work with any kernel release. You will need the gcc and kernel-devel packages.
- Debian Etch default kernel does not need these patches but they will not hurt.
# Install gcc and kernel-devel packages for RHEL, gcc and linux-headers for Debian # Install VMwareTools VM menu option mount -o ro /dev/cdrom /mnt cp /mnt/* .
Then Either rpm -ivh VM*rpm # If RedHat/Fedora/RPM based system -or- tar -xzf VM*tgz # If any other system cd vmware-tools-distrib ./vmware-install.pl
cd /usr/lib/vmware-tools/modules/source tar -xf vmxnet.tar tar -xf vmmemctl.tar tar -xf vmdesched.tar cd vmxnet-only patch -p1 < /tmp/vmxnet-only.patch cd ../vmmemctl-only patch -p1 < /tmp/vmmemctl-only.patch cd ../vmdesched-only patch -p1 < /tmp/vmdesched-only.patch cd .. tar -cf vmxnet.tar vmxnet-only tar -cf vmmemctl.tar vmmemctl-only tar -cf vmdesched.tar vmdesched-only rm -rf vmxnet-only vmmemctl-only vmdesched-only vmware-config-tools.pl
vmmemctl
- This patch works for all revision of ESX VMwareTools >= 43424 and has been tested against revision 43424 and 47426.
- This patch is not necessary for VMware Server VMwareTools revision 44356.
diff -c -b vmmemctl-only-orig/os.c vmmemctl-only/os.c *** vmmemctl-only-orig/os.c 2007-03-30 13:54:30.000000000 -0400 --- vmmemctl-only/os.c 2007-06-13 11:35:11.000000000 -0400 *************** *** 23,29 **** --- 23,31 ---- #include "driver-config.h" + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #include + #endif #ifdef MODULE #include
vmxnet
- This patch works for all revision of VMwareTools >= 43424 and has been tested against revision 43424 and 47426.
- This patch is not necessary for VMware Server VMwareTools revision 44356.
diff -c -b vmxnet-only-orig/vmxnet.c vmxnet-only/vmxnet.c
*** vmxnet-only-orig/vmxnet.c 2007-03-30 13:54:46.000000000 -0400
--- vmxnet-only/vmxnet.c 2007-06-14 14:47:40.000000000 -0400
***************
*** 8,14 ****
--- 8,16 ----
#include "driver-config.h"
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
#include
+ #endif
#include
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9)
***************
*** 94,99 ****
--- 96,109 ----
#endif
#endif
+ #ifdef CHECKSUM_COMPLETE
+ // as of 2.6.18 they split CHECKSUM_HW into two
+ #define CHECK_IP_SUMMED(n) \
+ (((n) == CHECKSUM_COMPLETE) || ((n) == CHECKSUM_PARTIAL))
+ #else
+ #define CHECK_IP_SUMMED(n) ((n) == CHECKSUM_HW)
+ #endif
+
/* Data structure used when determining what hardware the driver supports. */
static const struct pci_device_id vmxnet_chips[] =
***************
*** 937,948 ****
tcpLen,
IPPROTO_TCP,
0);
skb->ip_summed = CHECKSUM_HW;
}
}
#endif
! if (skb->ip_summed == CHECKSUM_HW) {
xre->flags |= VMXNET2_TX_HW_XSUM;
} else {
xre->flags &= ~VMXNET2_TX_HW_XSUM;
--- 947,962 ----
tcpLen,
IPPROTO_TCP,
0);
+ #ifdef CHECKSUM_COMPLETE
+ skb->ip_summed = CHECKSUM_COMPLETE;
+ #else
skb->ip_summed = CHECKSUM_HW;
+ #endif
}
}
#endif
! if (CHECK_IP_SUMMED(skb->ip_summed)) {
xre->flags |= VMXNET2_TX_HW_XSUM;
} else {
xre->flags &= ~VMXNET2_TX_HW_XSUM;
vmdesched
- This patch works for all revision of VMwareTools >= 43424 and has been tested against revision 43424 and 47426.
*** vmdesched-only-orig/compat_kernel.h 2007-04-12 22:40:53.000000000 -0400 --- vmdesched-only/compat_kernel.h 2007-07-30 11:27:51.000000000 -0400 *************** *** 18,24 **** --- 18,28 ---- * provided by x86-64, arm and other (but not by i386). */ #define __NR_compat_exit __NR_exit + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) static inline _syscall1(int, compat_exit, int, exit_code); + #else + static inline _syscall1(int compat_exit, int exit_code); + #endif
/*
vmhgfs
- This patch works for all revision of VMwareTools >= 43424 and has been tested against revision 43424 and 47426. Yet is not used within ESX. Loading vmhgfs when using ESX can be pretty catastrophic to the VM and security.
- This patch is not necessary for VMware Server VMwareTools revision 44356.
diff -c -b vmhgfs-only-orig/driver.c vmhgfs-only/driver.c
*** vmhgfs-only-orig/driver.c 2007-05-23 22:21:25.000000000 -0400
--- vmhgfs-only/driver.c 2007-07-31 16:50:19.000000000 -0400
***************
*** 41,48 ****
--- 41,53 ----
#define HGFS_SB_TO_COMMON(sb) ((HgfsSuperInfo *)(sb)->s_fs_info)
#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
#define INODE_SET_II_P(inode, info) do { (inode)->u.generic_ip = (info); } while (0)
#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->u.generic_ip)
+ #else
+ #define INODE_SET_II_P(inode, info) do { (inode)->i_private = ((void*)info); } while (0)
+ #define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->i_private)
+ #endif
/*
* 2.5.x kernels support nanoseconds timestamps.
***************
*** 760,766 ****
--- 765,773 ----
inode->i_uid = 0; /* This is bogus, should be the mount owner. */
inode->i_gid = 0; /* This is bogus, should be the mount owner. */
inode->i_rdev = 0; /* Device nodes are not supported */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
inode->i_blksize = HGFS_BLOCKSIZE;
+ #endif
inode->i_blocks = (attr->size + HGFS_BLOCKSIZE - 1) / HGFS_BLOCKSIZE;
inode->i_size = attr->size;
HGFS_SET_TIME(inode->i_atime, attr->accessTime);
***************
*** 4419,4424 ****
--- 4426,4459 ----
#if KERNEL_25_FS
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ /*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsGetSb --
+ *
+ * Invokes generic kernel code to prepare superblock for
+ * deviceless filesystem.
+ *
+ * Results:
+ * 0 on success
+ * non-zero on failure
+ *
+ * Side effects:
+ * None
+ *
+ *-----------------------------------------------------------------------------
+ */
+ static int
+ HgfsGetSb(struct file_system_type *fs_type,
+ int flags,
+ const char *dev_name,
+ void *rawData,
+ struct vfsmount *mnt)
+ {
+ return get_sb_nodev(fs_type, flags, rawData, HgfsReadSuper, mnt);
+ }
+ #else
/*
*-----------------------------------------------------------------------------
*
***************
*** 4453,4458 ****
--- 4488,4494 ----
{
return get_sb_nodev(fs_type, flags, rawData, HgfsReadSuper);
}
+ #endif
#else
Author: Edward L. Haletky
