Earlier this week, Ubuntu announced the Snappy Ubuntu Core . As part of the announcement, a set of qemu based instructions were included for checking out a snappy image on your local system. In addition to that method, we’ve been working on updates to bring support for the transactional images to uvtool. Have you used uvtool before? I like it, and tend to use for day to day kvm images as it’s pretty simple. So let’s get to it.
As I’ve already mentioned Ubuntu has a very simple set of tools for creating virtual machines using cloud images, called ‘uvtool‘. Uvtool offers a easy way to bring up images on your system in a kvm environment. Before we use uvtool to get snappy on your local environment, you’ll need install the special version that has snappy supported added to it:
$ sudo apt-add-repository ppa:snappy-dev/tools
$ sudo apt-get update
$ sudo apt-get install uvtool
$ newgrp libvirtd
You only need to do ‘newgrp libvirtd‘ during the initial setup, and only if you were not already in the libvirtd group which you can check by running the ‘groups’ command. A reboot or logout would have the same effect.
uvtool uses ssh key authorization so that you can connect to your instances without being prompted for a password. If you do not have a ssh key in ‘~/.ssh/id_rsa.pub‘, you can create one now with:
We’re ready to roll. Let’s download the images:
$ uvt-simplestreams-libvirt sync –snappy flavor=core release=devel
This will download a pre-made cloud image of the latest Snappy Core image from http://cloud-images.ubuntu.com/snappy/. It will download about 110M, so be prepared to wait a little bit.
Now let’s start up an instance called ‘snappy-test‘:
$ uvt-kvm create –wait snappy-test flavor=core
This will do the magic of setting up a libvirt domain, starting it and waiting for it to boot (via the –wait flag). Time to ssh into it:
$ uvt-kvm ssh snappy-test
You now have a Snappy image which you’re sshd into.
If you want to manually ssh, or test that your snappy install of xkcd-webserver worked, you can get the IP address of the system with:
$ uvt-kvm ip snappy-test
When you’re done playing, just destroy the instance with:
$ uvt-kvm destroy snappy-test
From home control to drones, robots and industrial systems, Ubuntu Core and Snaps provide robust security, app stores and reliable updates for all your IoT devices.
With the holidays coming up, many of us can expect to spend time with our friends and families, often listening to seasonal music, or indeed escaping the seasonal music! Whether you’re joining in or getting away from the crowd, this…
The Linux distribution model, whilst established and well understood for computing, has some limitations when it comes to IoT edge gateway devices. Due to often being located in remote or hard to access areas, there is a greater demand for…
As many as 20.4 billion internet of things devices are estimated to be in use by 2020, according to Gartner, with consumer products making up 63% of this figure. A large amount of these will be low-cost devices, rushed out by manufacturers…