"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." (Robert A. Heinlein)
Showing posts with label Virtualization. Show all posts
Showing posts with label Virtualization. Show all posts

Saturday, 7 July 2018

The joy of virtualization: Docker


I took a relative pause from experimenting with Raspberry Pi to report my first experiences with something completely different. One of the first things you realize while programming server-side is how your program is only one piece of a bigger puzzle. Your application usually runs inside a container, connects to a database, expose or consume services and so on ... Solving this puzzle means defining an installation procedure that becomes different and sometime more complex by changing or scaling the installation target.

Docker

Docker is an container platform that overcomes the installation problems by producing a ready-to-install standardized operating-system-level virtual machine, packed with everything your application needs to be run. Unlike other virtualization solutions a Docker image only contains what your application needs without having to install and run a full hardware simulation like, for example, in Virtual Box.

Installation

Docker is available in two versions a professional “enterprise” edition and a community one (Docker CE) free to download. Installing Docker CE on Ubuntu is just matter of adding Docker repository address
sudo apt-get update

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Then installing it using the usual apt command
sudo apt-get updatesudo apt-get install docker-ce
Once the installation completed the current user, or any user who will use Docker, must be added to the “docker” group.
sudo adduser maxx docker
After logging out and in again Docker was ready for use and command
docker info
Correctly reported the empty environment initial state

First run

In order to test Docker is correctly installed and running a simple “hello-world” image is available. Just by calling the command:
docker run hello-world
Docker take care of downloading the image from its repository, installing and running it.

Another interesting image to start with is, as suggested in hello-world printout, the “ubuntu” image that installs and starts a console-only Ubuntu virtual machine with no effort.

Thursday, 18 December 2014

Scanning virtual machines for viruses: Trinity Rescue Disk


I often use VirtualBox virtual machines to solve the few cases where I still need a Microsoft Windows only application. This solution works well but is far from ideal from the security point of view. The only Windows version I still own is the not more unsupported Windows XP, so my virtual machines are an easy target to the many viruses and malware around the 'net. As general precaution I keep my virtual machines off the network by disabling their virtual network card but, in some cases, the application used might explicitly require a network connection and other infection ways exist other than the 'net. Generally speaking it would be wise to periodically check all Windows virtual machines disks for viruses.
I'm not positive about installing an anti-virus software on a virtual machine mostly because I fear the loss of the not already brilliant machine performances so I went looking for a alternative solution.

Trinity Rescue Disk

Trinity Rescue Disk is a small (very small indeed) footprint live Linux distribution specialized in broken computer recovery. Among the many useful tools it offers scanning all computer drives for viruses using five of the most common anti-virus programs. In order boot and work with Trinity Rescue Disk the virtual machine must have assigned at least 1GB of RAM. If you are experimenting with very low specs machines you'll have to temporarily change the machine memory settings.

Tuesday, 28 October 2014

Using HP ScanJet G4050 USB scanner from a VirtualBox guest machine


One of the well known Linux problem is the lack of hardware drivers. I've sometime complained, in the past, about the poor support my HP ScanJet G4050 scanner had on Linux promising myself to try to find a solution using VirtualBox with a Windows guest machine. Fortunately a good enough SANE scanner driver came out and I forgot quickly about my intent. I lived well with my SANE driver recently when I found a bunch of old film negatives. The HP SANE driver works fine and fast but doesn't support the scanner transparent materials adapter (TMA). I so decided to go back to my initial idea about using VirtualBox and a Windows guest machine.

Setting-up VirtualBox

In order to fully support USB devices an extension pack has to be installed in addition to VirtualBox main program. The extension pack version must match with the VirtualBox one. Since the VirtualBox version I used, installed with Ubuntu Software Centre, did not match with any of the available versions I had to download both main program and extension pack.
I first uninstalled the the VirtualBox version I had on my computer then I installed the downloaded “.deb” file. Once the right version was ready I could eventually install the expansion pack from VirtualBox preferences.
The extension pack installation starts asking confirmation first

Tuesday, 8 January 2013

Virtualbox: The joy of virtualization


Among the many things I dreamed of before buying a new desktop one was being able to play with some virtualization software. A virtualization software is a program that allows you to set-up and run on your (physical) computer, usually called host computer, a virtual machine, called guest computer. The virtual computer can behave like a real computer and run a different operating system. Virtualbox is a virtualization software released by Oracle under GPL V2 license. I had already knew about Virtualbox since I use it at work and it has been literally life-saving in many occasions.

Installation and first machine

Installing Virtualbox is quite trivial: it is available in Ubuntu software centre repositories or it can be downloaded as “.deb” package (among other formats) from its download page. Once installed Virtualbox starts with the VM Manager window from here new virtual machines can be added and managed.