Last active
November 18, 2015 18:12
-
-
Save aancw/25fc0e433c6925b18271 to your computer and use it in GitHub Desktop.
Patching vmnet VMware Workstation 12 untuk Kernel 4.2+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Saya mengalami kesulitan pada saat instalasi VMware Workstation 12 di Arch Linux pada kernel 4.2.5 . | |
Setelah melakukan instalasi seperti yang tertera di wiki.archlinux.org dengan guide yang diberikan namun masih ada kendala. | |
Dimana, tidak bisa melakukan kompilasi pada vmnet di Kernel 4.2.5 . | |
Pesan yang saya dapatkan saat melakukan kompilasi vmnet adalah sebagai berikut : | |
/tmp/modconfig-f1cMco/vmnet-only/bridge.c: In function 'VNetBridgeUp': | |
/tmp/modconfig-f1cMco/vmnet-only/vmnetInt.h:85:38: error: too few arguments to function 'sk_alloc' | |
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ | |
Maka, Berikut ini langkah yang saya lakukan untuk patching agar bisa melakukan instalasi WMware Workstation 12 | |
cd /usr/lib/vmware/modules/source | |
tar -xvf vmnet.tar | |
cd vmnet-only | |
nano vmnetInt.h | |
Setelah file vmnetInt.h terbuka. Selanjutnya goto line number yang tertera pada error sebelumnya yaitu 85. | |
Rubah area sekitar 85 | |
extern struct proto vmnet_proto; | |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) | |
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ | |
PF_NETLINK, _pri, &vmnet_proto, 1) | |
#elif defined(VMW_NETDEV_HAS_NET) | |
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ | |
PF_NETLINK, _pri, &vmnet_proto) | |
#else | |
# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1) | |
#endif | |
Menjadi | |
extern struct proto vmnet_proto; | |
#ifdef VMW_NETDEV_HAS_NET | |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 00) | |
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ | |
PF_NETLINK, _pri, &vmnet_proto, 1) | |
#else | |
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ | |
PF_NETLINK, _pri, &vmnet_proto,1) | |
#endif | |
#else | |
# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1) | |
#endif | |
Setelah itu lakukan packaging ulang | |
tar -cf vmnet.tar vmnet-only | |
rm -r vmnet-only(optional) | |
Sekarang jalankan vmware dengan command vmware dan lakukan instalasi ketika muncul popup yang meminta untuk kompilasi modules. | |
Cheers! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment