My colleague Amit Shah wrote this interesting article about getting random numbers inside virtual machines.
Category Archives: Uncategorized
You can use virt-builder to make Fedora 21 aarch64 guests easily:
$ virt-builder --arch aarch64 fedora-21
but unless you have real aarch64 hardware, how do you boot them?
Well the latest qemu supports working system emulation for 64 bit ARM. So assuming you (a) have compiled a very new
qemu-system-aarch64 (I recommend qemu from git), and (b) you have the AAVMF (UEFI for aarch64) firmware, then:
$ qemu-system-aarch64 \ -nodefconfig -nodefaults -display none \ -M virt -cpu cortex-a57 -machine accel=tcg -m 2048 \ -drive if=pflash,format=raw,file=AAVMF_CODE.fd,readonly \ -drive if=pflash,format=raw,file=vars.fd \ -drive file=fedora-21.img,format=raw,if=none,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -netdev user,id=usernet \ -device virtio-net-device,netdev=usernet \ -serial stdio
And that will boot the aarch64 guest.
Edit: If using Gerd’s AAVMF repo, replace
They claim “linear scaling of application performance” which I rather doubt unless your application is web serving.
Why has wordpress.com decided to break all inline images in postings?
If you have ARM 64 bit hardware, you can now use virt-builder to create Fedora 21 guests …
$ virt-builder fedora-21 [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-21-aarch64.xz [ 5.0] Planning how to build this image [ 5.0] Uncompressing [ 12.0] Opening the new disk [ 44.0] Setting a random seed [ 44.0] Setting passwords virt-builder: Setting random password of root to JRjjjDxEfsZuCWca [ 47.0] Finishing off Output file: fedora-21.img Output size: 4.0G Output format: raw Total usable space: 5.2G Free space: 4.4G (85%)
I’m thankful to Pino Toscano for adding multi-architecture support to virt-builder a while back.
As shown above, virt-builder will pick the right architecture corresponding to the host, or you can override its choice by using
The Cheerson CX-10 is quite a cool little quadcopter. When I say little, it really is tiny, about 1.5″ across. They are very cheap — I got one for £18.69 including tax & delivery.
Edit: I had to close the comments on this post, as it is a magnet for scummy spammers posting “oh that’s great” with a link back to their own site selling these toys. Sorry about that — some people spoil it for everyone.
The 64 bit board uses an 8-core SoC manufactured by HiSilicon. Unfortunately RAM is very limited (1 GB), although understandable given the very low price point.
Update: Greg K-H has photos. I’m going to hold off on this one because I know there will be many more 64 bit ARM boards coming this year.
For more half-baked ideas, see the ideas tag.
Containers offer a way to do limited virtualization with fewer resources. But a lot of people have belatedly realized that containers aren’t secure, and so there’s a trend for putting containers into real virtual machines.
Unfortunately qemu is not very well suited to just running a single instance of the Linux kernel, as we in the libguestfs community have long known. There are at least a couple of problems:
- You have to allocate a fixed amount of RAM to the VM. This is basically a guess. Do you guess too large and have memory wasted in guest kernel structures, or do you guess too small and have the VM fail at random?
- There’s a large amount of overhead — firmware, legacy device emulation and other nonsense — which is essentially irrelevant to the special case of running a Linux appliance in a VM.
Here’s the half-baked idea: Let’s make a qemu “container mode/machine” which is better for this one task.
Unlike other proposals in this area, I’m not suggesting that we throw away or rewrite qemu. That’s stupid, as qemu gives us lots of useful abilities.
Instead the right way to do this is to implement a special
virtio-ram device where the guest kernel can start off with a very tiny amount of RAM and request more memory on demand. And an empty machine type which is just for running appliances (qemu on ARM already has this: mach-virt).
Libguestfs people and container people, all happy. What’s not to like?