It is some time that I’m interested in virtualization: I think it is a nice way to keep my machine healty and clean, and in the same time it allows me to experiment and do “distruptive” things.
I love the possibility to take snapshots and recover a previous state in a moment!
Probably some of you have noticed that “photoatomiclab.net” is not always online(there is a reason for this you’ll discover in a moment), right? I know it is boring and frustrating when a resource is not available when you need it, and for this I’m really sorry.
So… I’ve started thinking on how to improve the thing. First of all: my favorite virtualization environment is VirtualBox (too bad Oracle have bought it, I hope it will not ruine all this good work) I like it because is free, is fast (in my opinion far better than VMWare) and it is supported by an opensource community… and having the source code in your hands you can do great things.
Anyway… my site is not always available: that’s because it is hosted on a virtual machine on my real machine! ANd this because I always like to know the internals and from time to time I had some crazy ideas: like streaming the town fest in the square in front of my windows using my HD camera ( LOL, usually I did this on xmas night) or connect some netduino robots and drive it from a web interface… this requires me to have a host where I really can do everything. and these host services are not cheap, unfortunately
But hey! VirtualBox really saves the day! So I have this virtualmachine “Bear” that runs my site… the one you are reading now. And it is hosted on my real machine… and my machine is housed in my bedroom… and at night I like to sleep
It is natural that I shut id down at night… and therefore the site becomes unavailable….
Again, my pc is setup to start up at about 14.00 CET every day (that’s because it have to record my favorite tv series…. but this is another story) and since I’m forgetful, I usually don’t remember to turn the VM on, so I’ve tough to improve the situation… I’ve started searching for a tool that allows me to automatically starts my VM up when the pc starts.
I’ve found VirtualBox headless mode… nice! but… I have not found a way to use it… expecially because for the shutd down part… I want my VM freezes its state when the pc is shutted down.. I don’t want to loose the last change on the site, nor to wait minutes for the virtualized machine shut down…
I’ve serched for days but nothing appears to be a strong solution…. there are some services that tries to emulate this but at the end they open a shell and invokes the command line version ov VBOX and “do things”
this have the bad behavior (in the major part of the occasions) to open console windows for some seconds, or to leave consoles opened…. and if you close the console .. the VM dies
this is ugly and completely unprofessional.
But fortunately VirtualBox is opensource! and there are SDKs!!
Tags: c#, VirtualMachines