shintaroid
shintaroid

Reputation: 1655

What is the best practice to code when the project is on a Guest OS (Virtualbox)?

I have a project and the files are on Guest OS (Red Hat Enterprise Linux) with Virtualbox, my host OS is Mac OS. I used to coding right in RHEL with editor Atom. But my boss told me that it's inefficient to code in a Guest OS, well, it makes sense because Mac OS or Windows is more responsive than linux, so I changed my way:

  1. Copy the whole project located on RHEL to a share folder between Mac OS and RHEL using rsync
  2. Code with Atom in Mac OS
  3. Copy back the project in share folder to the original project in RHEL by rsync

I'm using Atom (not vim in RHEL) because it can edit the whole project in one window which is convenient for my situation. But there is a problem: after copying back the project in Step 3, git status shows everything has been changed even though I just edited only a few files. That is a little annoying.

Is there any better way to code in such environment? any advice is appreciated.

Upvotes: 0

Views: 84

Answers (2)

skrrgwasme
skrrgwasme

Reputation: 9633

BretzL's suggestion to use shared folders is a good one, but I think it's important to address the underlying issue: your boss' assumption about coding being inefficient or slow just because you're working on a VM is simply not true.

It sounds like your new workflow, which was instituted as a result of his/her advice, is causing you to have a harder time developing that you did on the VM. The shared folders will help with that, but if you have the VM configured to have access to enough cores and memory, then its performance for most tasks will be fine, and there may not be any problem with developing on the VM directly. I do a significant amount of development on a VM, and haven't had any issues. You may experience slower builds on the VM if you're building whole kernels or other large projects, but if that's not the case, it should be fine.

If you didn't have any performance or productivity problems before forcing yourself to work outside of the VM, then... it wasn't a problem.

(I also have an issue with the assumption that Linux is always less responsive than Windows or Mac OS, but that's a debate for a different day.)

Upvotes: 1

at0mzk
at0mzk

Reputation: 1942

VirtualBox supports shared folders, so you dont need to rsync back and forth. Just mount the shared folder into where your application server on RHEL guest expects the code. I also recommend you take a look at https://www.vagrantup.com/ for managing developer VMs.

Upvotes: 0

Related Questions