Page 1 of 1

Building guest additions for install into another VM

Posted: 26. Jul 2016, 14:27
by Paul Moore
I'm trying to set up a minimal Ubuntu VM for use with Vagrant. Specifically, I don't want to have all the packages needed to build kernel extensions included in my VM. So what I was hoping to do was to build the guest additions on a copy of my VM, then move over the essential items and install them on a "clean" VM. There shouldn't be any portability issues as I plan on using the exact same image for the build and for the runtime (although if the final binaries depend on any packages installed by the build process, I'd obviously need to add them to the target machine as well.

Unfortunately, I haven't been able to find any instructions on how to do this. Can anyone tell me what I need to do to achieve this?

Thanks,
Paul

Re: Building guest additions for install into another VM

Posted: 26. Jul 2016, 16:13
by socratis
Paul Moore wrote:I haven't been able to find any instructions on how to do this.
Chances are you won't. GAs are meant to be installed locally and not copied over from another system, because besides the actual files, you'll have to modify the system settings as well. You could dig into the installer and see the instructions. I think...

However, this is a very good question. I don't think I have exactly what you want, but rather a workaround. What if you installed the necessary packages to make the build, build the GAs and uninstall the build packages that you installed? It should work...

Re: Building guest additions for install into another VM

Posted: 26. Jul 2016, 17:27
by Paul Moore
socratis wrote:Chances are you won't. GAs are meant to be installed locally and not copied over from another system
I thought that might be the case, sadly...
socratis wrote:What if you installed the necessary packages to make the build, build the GAs and uninstall the build packages that you installed?
That might work, I guess, but it's likely to be a bit of work to get that right (I'm not a Linux sysadmin, and apt-get uninstall whatever is a bit of a black art to me. This is only meant to be a quick hack to have a Unix test environment for occasional use because our sysadmins don't provide sandbox environments...) I may give it a try if I can't find a better option (heck, I may just give up and leave the build tools installed).

Paul