Thursday, June 6, 2013

VMWare Workstation 9.0.1 on Ubuntu 13.04

I recently upgraded my Ubuntu machine to Ubuntu 13.04.  Update went smoothly and all my usual application worked fine. But after some time I needed to use VMWare workstation and I realized its not working any more.

I got following error.


This is caused by some header location changes. This can be resolved by following command.

sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

Once this is done, you will need to compile and install VMware modules. When I pressed install button, nothing was happening.


To check I tried to compile modules from command line.

sudo vmware-modconfig --console --install-all

But this was throwing many compilation error, anyway I found this script which make above process easier, It make link for kernel header to expected location and then build VMWare modules. You can find more details about script here.

This script seems to be working but still there was some error in driver.c file. I was getting following errors.

make[1]: Entering directory `/usr/src/linux-headers-3.8.0-23-generic'
  CC [M]  /tmp/modconfig-IBc3U5/vmci-only/linux/driver.o
  CC [M]  /tmp/modconfig-IBc3U5/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/modconfig-IBc3U5/vmci-only/common/vmciContext.o
  CC [M]  /tmp/modconfig-IBc3U5/vmci-only/common/vmciDatagram.o
/tmp/modconfig-IBc3U5/vmci-only/linux/driver.c:1754:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/modconfig-IBc3U5/vmci-only/linux/driver.c:1982:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/modconfig-IBc3U5/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/modconfig-IBc3U5/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/modconfig-IBc3U5/vmci-only/linux/driver.c:2063:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/modconfig-IBc3U5/vmci-only/linux/driver.c:2137:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/modconfig-IBc3U5/vmci-only/linux/driver.c:1717:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
make[2]: *** [/tmp/modconfig-IBc3U5/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/modconfig-IBc3U5/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-23-generic'

To resolve those error you will need this kernel patch, this patch is for 3.8.0 kernel, it might not work for you. You can find more information about this patch here. To apply patch follow following steps.

1. cd /usr/lib/vmware/modules/source
2. tar -xf vmci.tar
3. cd vmci-only
4. patch -p1 < 'patchfile'
5. cd ..
6. tar -cf vmci.tar vmci-only/
7. vmware-modconfig --console --install-all
8. rm -rf vmci-only/

Once you applied above patch, VMWare module should compile fine. I ran above script, which link kernel header and build VMware module, and then I was able to use VMWare workstation.

Still there was one last hurdle, When I tried to run my virtual machine, it asked for serial number, But when I tried to enter serial number, Dialog for entering serial number was not getting launched.

To resolve those I need to supply serial number from terminal, using following command.

/usr/lib/vmware/bin/vmware-vmx --new-sn 123-123-123-123...123

Finally, I was able to use my virtual machine. I guess if you rely on virtual machine heavily, then its better to avoid Ubuntu/Kernel upgrade.

No comments:

Post a Comment