Developing in a virtual machine instead of in physical machine

Discussion in 'Programming/Html' started by Rakanoth, Jun 22, 2018.

  1. Rakanoth

    Rakanoth Member

    Messages:
    40
    Likes Received:
    5
    GPU:
    GTX 1080 Ti
    I am mostly developing for Windows platform. My development environment is fully configured in a virtual machine. It is a Windows 10 virtual machine interacting with another virtualised Windows Server machine. I never use my physical machine for development. I use my physical machine only for gaming. I do not want my configuration for gaming to come into conflict with the configuration for development tasks. I think this is the best idea. Am I missing something here? I think a lot of developers work in that way.
     
  2. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,591
    Likes Received:
    7,812
    GPU:
    GF RTX 2070 Super
    Nothing wrong with that.
    But I mostly used VMs for debugging.

    PS As I take it you develop at home. (I can`t imagine a boss allowing to play at work.)

    PPS What languages you use?
     
    Rakanoth likes this.
  3. Rakanoth

    Rakanoth Member

    Messages:
    40
    Likes Received:
    5
    GPU:
    GTX 1080 Ti
    I mostly use JS, PHP, C#.
     
  4. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,591
    Likes Received:
    7,812
    GPU:
    GF RTX 2070 Super
    I switched from C/C++ to C# several years ago and I don`t want back.
     

  5. sverek

    sverek Ancient Guru

    Messages:
    6,073
    Likes Received:
    2,953
    GPU:
    NOVIDIA -0.5GB
    That's the way to work, imo.

    Usually devs renting virtual machine with Linux OS preinstalled and run programs there, while writing code on windows machine.
    So basically you use your local machine to write and distribute code to virtual machine.
    On virtual machine, code is being compiled / executed.
     
  6. mindaz3

    mindaz3 Master Guru

    Messages:
    318
    Likes Received:
    18
    GPU:
    Sapphire Vega 64
    It is fine both ways. But the main thing why we use virtual machines it is because of the container configurations. Some projects are very picky about OS and other dependencies, so you have this config file with all requirements preconfigured with versions that you need and you can share configuration file with other people. Or for debugging, you can make identical machine to your production environment for proper testing.


    Personally, most of the time I run everything on my local machine, I only fire up vagrant machines just in those extra use cases, for very specific stuff.
     
  7. RealNC

    RealNC Ancient Guru

    Messages:
    3,309
    Likes Received:
    1,507
    GPU:
    EVGA GTX 980 Ti FTW
    I'm doing the same. My main environment is Linux, and I only dual-boot to W10 for games. For work, I have an array of VMs (using VMware) running W7, W8.1 and W10, Debian 8, various Ubuntu versions, and also various macOS versions (you can patch VMware to run macOS on PCs, enabling even iOS development on a PC) These allow me to build and test deployment on the most common OSes.

    Convenience is not the only advantage. Another one is safety. In those VMs, I can easily avoid installing any sort of third-party software on it, greatly reducing the risk of somehow introducing malware into my dev environments. And of course you also get the benefit of being able to trivially move VMs around. And it's also easy to backup a VM and revert back to it when you have to resolve bug reports like "the application crashes when I have program X installed". You just install Program X, test, and then you can revert the VM and it's like you never installed Program X.

    Not everything is rosy though. The UI in the guest OSes running in VMware is quite sluggish. I/O perf can also be quite slower. But it's manageable and the benefits of being able to target and test 10+ operating systems on a single machine greatly outweighs the negatives.
     
    Last edited: Jul 3, 2018

Share This Page