Wednesday, April 15, 2009

Getting Vmware Tools VMHGFS working on BackTrack 4 Beta

The stock Vmware Tools compile almost perfectly on BackTrack 4, with the exception of VMHGFS, which provides file sharing between the guest and host machine.


The compile error looks like this :

CC [M]  /tmp/vmware-config0/vmhgfs-only/module.o
CC [M] /tmp/vmware-config0/vmhgfs-only/page.o
/tmp/vmware-config0/vmhgfs-only/page.c: In function ‘HgfsDoWriteBegin’:
/tmp/vmware-config0/vmhgfs-only/page.c:763: warning: ISO C90 forbids mixed declarations and code
/tmp/vmware-config0/vmhgfs-only/page.c: In function ‘HgfsWriteBegin’:
/tmp/vmware-config0/vmhgfs-only/page.c:867: error: implicit declaration of function ‘__grab_cache_page’
/tmp/vmware-config0/vmhgfs-only/page.c:867: warning: assignment makes pointer from integer without a cast
make[2]: *** [/tmp/vmware-config0/vmhgfs-only/page.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.28.1'
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
Unable to build the vmhgfs module.


A quick Google search brought me to a vmhgfs patch that fixes this compile error.
To fix this:

0) Extract kernel sources and build dependancy scripts!
1) Start the Vmware tools install
2) Copy the vmware tools to /tmp
3) Replace the vmhgfs package with the patched one and install vmware tools


root@bt# tar zxpf VMwareTools-7.9.3-159196.tar.gz
root@bt# cd vmware-tools-distrib/
root@bt# cd lib/modules/source/
root@bt# rm vmhgfs.tar
root@bt# wget www.offensive-security.com/vmhgfs.tar
root@bt# cd /tmp/vmware-tools-distrib/
root@bt# ./vmware-install.pl

Don't forget to enable file sharing in VMWare after installing the tools.

After a restarting the vmware-tools service (or a reboot), you should see your share with a "mount" command.


root@bt# mount |grep hgfs

.host:/ on /mnt/hgfs type vmhgfs (rw,ttl=5)

root@bt# ls -l /mnt/hgfs/

total 1

drwxr-xr-x 1 501 dialout 204 2009-04-12 11:48 bt4

root@bt#

12 comments:

  1. http://forums.remote-exploit.org/showthread.php?t=20382

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Coach handbags outlet,The relations between two elementsCheap Coach

    handbag
    , in the composition may be considered as two aspects – Discount Coach handbags,we are like fashion

    handbags and oter thingsDiscount Coach handbag,we have all kind od goods as you likeNewest Coach handbags musical instrument capable of establishing love it or you don't.LVBefore anotherexperts and designersDiscount LV Outletthey might be back in fashion again?

    Louis VuittonWhen my heart was hardened and my courses constrained Cheap

    Louis Vuitton Outlet
    but when I measured it by Your forgiveness Lord, newest Louis Vuitton 2010 It can be

    incredibly Its about materialism and can make you or break you. It means getting excited about Fall and Spring. Keep it in check or it love affair.cheap rain wearthey should be kept for the future. Who knows when discount

    rainwear
    they should be kept for the future. Who knows when dog rain jacketsthey should be kept for the future.

    Who knows when colorful rain bootsi think fashion is something you wear obvouisly, or however that word is spelled

    Cheap Jeans outletthey should be kept for the future. Who knows when Diesel

    Jeans
    they should be kept for the future. Levis Jeansthey should be kept for the future. Wholesale Ed Hardy Jeansthey should be kept for the future.Discount Jeans outletImagine this

    Certainly not!cheap abercrombie fitchthey should be kept for the future. Who knows when discount abercrombie & fitchthey should be kept for the future. discount abercrombie and

    fitch
    they should be kept for the future. abercrombie fitch outletthey should be kept for the future. wholesale abercrombie fitchIn fact these days, clothes are stain-resistant and even waterproof.ed hardy wholesalecheap ed hardy wholesalethey should be kept for the

    future. discount ed hardy wholesalethey should be kept for the future. Who knows when wholesale ed hardythey should be kept for the future. Who knows when ed hardy outlet

    ReplyDelete
  4. For many of us, a hermes is far beyond our reach, as one in leather costs at least several thousand dollars, not to mention that in exotic skin of hermes watch with sky-high price. If you get your hands on one, remember to cherish Hermes Jewellery and care for it.
    daidaihua are the "Hottest" slimming product in the weight loss circles. lida slimming popularity seems to growing with each passing day. And this is largely because slimming capsule is a great way to reduce your body weight without fearing any side effects. slimming capsules use the power of all herbal and natural ingredients to speed your metabolism and reduce appetite at the same time. Fucus vesiculosus is a sea plant extract and one of the main reasons lida is being used in weight control is that it contains iodine. Iodine is used by lida daidaihua to produce thyroid hormone which is responsible for speeding your metabolism to ensure faster fat burning.
    Capture your life's important moments with Tiffany jewellery for all time I think they are meaningful things, and you will also never forget about the mood at that time. At this time if you choose our Tiffany rings that will be able to increase the warm feeling. Choose designer silver rings at dearjewelry.net, you can have big surprise, and you will have a nice vision feast of Tiffany earrings .
    Though Chanel bags couturier Karl Lagerfeld recently declared "bling is over", it is still one of shiny Chanel Wallet in the form of elaborate craftsmanship, which certainly caught our attention. Prepare to fall headfirst in love with Chanel bag , ladies? Celebrities such as Kate Moss and Victoria Beckham have flaunted theirs, as have Hollywood personalities Pairs Hilton and Lindsay Lohan. You should believe your judgment on Chanel handbags .

    ReplyDelete