Running eclipse (or anything else) "transparantly" on a Linux VM en

By Gerco on Friday 6 October 2017 19:42 - Comments (4)
Category: -, Views: 1.463

I needed to set up a development environment on Linux for a customer project. This needed to run on Linux since one of my dependencies (let's call it R) runs only on Linux and the VM needed an abundance of memory (R needs at least 7GB free to even start up). The way I set this up, though quite straightforward, may be useful to other developers with similar memory requirements.

I needed 12Gb of VM RAM for this project because I also had to run a a different VM (call that S) with 4GB minimum RAM. Since my laptop has 16GB and the host OS also needs a heap of RAM, I didn't have room for a desktop environment in the Linux VM for R.

Ingredients
- VirtualBox (or something similar)
- SSH with X forwarding
- Eclipse (or whatever IDE you like)
- X Server on host operating system (XQuartz on Mac OS X)

Setup
1. Create a Virtual Machine with 8GB of RAM and install CentOS 7 with GNOME desktop
2. Install development tools: †yum groupinstall "Development tools"
3. Install eclipse for C++ from https://eclipse.org/downl...e-cc-developers/keplersr2
4. Disable the GUI at startup to free up memory for R: systemctl set-default multi-user.target

Usage
To use this setup for development just start your VM headless, SSH into it and run:
~/eclipse/cpp-neon/eclipse/eclipse &

And eclipse will start up on your host desktop. It will run as if it was running on your host machine. Because you’re not running a full desktop environment on the VM, there will be enough memory for R, S and your host operating system to run.

Volgende: OpenWRT IPTables download rate limiting 09-04 OpenWRT IPTables download rate limiting

Comments


By Tweakers user pinna_be, Saturday 7 October 2017 10:26

Cool guide!

Just a question: Wouldn't it be easier to configure your project with docker/vagrant and use plugins to interact with those?

I think they solve your requirements as well, and that they have the added advantage to make setup and deployment easier, once you've set it up the first time.

By Tweakers user Gerco, Saturday 7 October 2017 13:50

Vagrant would probably have worked for R since that's just a set of RPMs that you need to install on a Linux machine, it doesn't run in Docker for some reason. S doesn't support Vagrant or Docker because it's delivered as a virtual machine itself and needs to be run as-is.

By Tweakers user Gropah, Sunday 8 October 2017 22:32

Gerco wrote on Saturday 7 October 2017 @ 13:50:
Vagrant would probably have worked for R since that's just a set of RPMs that you need to install on a Linux machine, it doesn't run in Docker for some reason. S doesn't support Vagrant or Docker because it's delivered as a virtual machine itself and needs to be run as-is.
R has it's own base image on dockerhub so it should be possible.

And about S, I don't know what language/system you are talking about, but java is also running in a VM, and can be run inside a docker container. It might be a bit more work to set up, but it should be doable (as long as you don't need a GUI, but even that can be arranged).

By Tweakers user Gerco, Monday 9 October 2017 01:18

Thanks Gropah,

R and S are placeholder names that I'm using to avoid giving away the names of my customers or their programs. The project R you referenced isn't involved in any way in this setup. In any case, these are native C++ x64 applications.

S is distributed as a VM image and must be run as such, any other configuration is unsupported. R is distributed as RPMs and needs to run as root for some reason. It may work in Docker but I haven't tried.

[Comment edited on Monday 9 October 2017 01:19]


In order to comment on this post you need to be logged in. Use this link to log in when you are already a registered user. If you don't have an account you can create one here.