Ask HN: Is anyone using a VM for the work environment?
Right now it's Qemu with Arch Linux in it. The VM is headless, and is only accessible over SSH and VNC provided by the system inside of it. It can also be run by Virtualbox.
It can run on Linux and on Windows. Physically it's a 64Gb thumbdrive with several disk images and all the software needed to run it.
The benefit is that you can use it anywhere without having to alter someone else's machine, both physically by plugging the thumbdrive in and running the VM, and virtually, by running the VM on a server somewhere and accessing it remotely over VNC.
Other advantages are that you don't need to close or shut down anything for the night - just disconnect/save state and come back later to exactly the same place.
I got a feeling that i didn't came up with this first, so the question is - do anyone use something similar, and in which ways?
7 comments
[ 2.8 ms ] story [ 29.9 ms ] threadFor me, the scenarios mentioned are too improbable to justify that amount of tinkering. If you need what that gives you (portability etc), it would not be a terrible way to go about it. You could also look into amazon workspaces or vagrant.
One tool that I love (and happily recommend) in my daily workflow of Linux Virt/Infra development is `virt-builder`[1], it is part of the libguestfs project. Once the compressed image (250MB or so) is cached, it can spin up fresh template VMs (`virt-builder --list` to check the distribution list) just under 40 seconds.
In my workflow (also with headless VMs), I have two qcow2 disk images (& several others on disk) on my devel laptop. They're built / used this way:
Build a minimal disk image:
Then, import it into libvirt (NB: despite the tool's name 'virt-install', it is not installing anything here, but merely importing the disk image): (The above will be QEMU, if you have hardware virt extensions, it will be a KVM guest).You could then manipulate it with `virsh`, libvirt (Virt API through which you could manage KVM/QEMU/Xen) shell, to manage snapshots, & other guest life cycle activities.
FWIW, I wrote a bit more verbiage (which also adds a quick note about snapshot management, so you could revert to a known sane state, if something goes haywire) here[2].
You can do far more interesting things with 'virt-builder', by supplying it to install packages you need, trivially creating secure new 'clones', etc.
[1] http://libguestfs.org/virt-builder.1.html [2] https://developer.fedoraproject.org/tools/virt-builder/about...
We were in early stages of development for a brand new project, so it wasn't all THAT portable in the sense that installed dependencies changed enough and frequently enough that you would need to take a new snapshot if you intended to use it elsewhere. Or more likely, install an old snapshot, pull the latest codebase, and spend half a day puzzling out why it wasn't working and getting it running again.
It might work better for a project in a more stable stage of development.