Parallels with Ubuntu 15.10

At work, I don’t have a proper Linux computer yet, and am a bit reticent to install Linux on the Mac I have.  So I’ve been using Parallels.  It’s ok for an emulated experience, but not great: it crashes regularly, runs out of memory, and I still occasionally hit some key combinations that rudely drop me back into the world of Mac from Linux.  But it’s still a heck of a lot better than having to use Mac OS.

Today though, Ubuntu asked if I’d like to upgrade to 15.10, I said yes, and things really got ugly – after upgrading, I could no longer boot into a graphical environment.  Looking at the error logs a bit, it looked like there may have been a problem with “Parallel Tools”, the stuff you install in the guest OS to make it run.

I tried to reinstall that, but there were various compilation errors in the kernel modules…. uh oh.

It turns out the fix was not that hard, although it required reading up on some Linux kernel changes.  And I don’t know if it’s actually correct – but it was enough to get my Ubuntu instance up and running again.

Here’s what I did:

  • Open the kmods/prl_mod.tar.gz file directly, with Emacs, in order to edit the files within.
  • Make the following modifications:
diff -ru parallels2/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c parallels/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
--- parallels2/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2015-07-09 06:22:30.000000000 -0700
+++ parallels/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2015-07-09 06:22:30.000000000 -0700
@@ -650,12 +650,21 @@
 return tgt_path;
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+#define compat_follow_link_t char*
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
 #define compat_follow_link_t void*
 #else
 #define compat_follow_link_t int
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+static compat_follow_link_t prlfs_follow_link(struct dentry *dentry,
+ void **cookie, struct nameidata *nd)
+{
+ return *cookie = do_read_symlink(dentry);
+}
+#else
 static compat_follow_link_t prlfs_follow_link(struct dentry *dentry,
 struct nameidata *nd)
 {
@@ -671,6 +680,7 @@
 return vfs_follow_link(nd, do_read_symlink(dentry));
 #endif
 }
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
 static int prlfs_readlink(struct dentry *dentry, char *buf, int buflen)
Binary files parallels2/prl_mod.tar.gz and parallels/prl_mod.tar.gz differ
diff -ru parallels2/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c parallels/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
--- parallels2/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c 2015-07-09 06:22:30.000000000 -0700
+++ parallels/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c 2015-07-09 06:22:30.000000000 -0700
@@ -21,6 +21,7 @@
 #include <linux/pagemap.h>
 #include <linux/proc_fs.h>
 #include <linux/hash.h>
+#include <linux/vmalloc.h>
 #include <asm/uaccess.h>
 #include <asm/atomic.h>
 #include <asm/io.h>

5 thoughts on “Parallels with Ubuntu 15.10

  1. It seems that Parallels finally updated there tools so at the very least fresh installs work out of the box now, still borked by 15.04 to 15.10 upgraded machine but nothing important that a wipe and start again didn’t fix

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s