Tag Archives: kvm forum

New in nbdkit: Create a virtual floppy disk

nbdkit is our flexible, plug-in based Network Block Device server.

While I was visiting the KVM Forum last week, one of the most respected members of the QEMU development team mentioned to me that he wanted to think about deprecating QEMU’s VVFAT driver. This QEMU driver is a bit of an oddity — it lets you point QEMU to a directory of files, and inside the guest it will see a virtual floppy containing those files:

$ qemu -drive file=fat:/some/directory

That’s not the odd thing. The odd thing is that it also lets you make the drive writable, and the VVFAT driver then turns those writes back into modifications to the host filesystem (remember that these are writes happening to raw FAT32 data structures, the driver has to infer from just seeing the writes what is happening at the filesystem level). Which is both amazing and crazy (and also buggy).

Anyway I have implemented the read-only part of this in nbdkit. I didn’t implement the write stuff because that’s very ambitious, although if you were going to implement that, doing it in nbdkit would be better than qemu since the only thing that can crash is nbdkit, not the whole hypervisor.

Usage is very simple:

$ nbdkit floppy /some/directory

This gives you an NBD source which you can connect straight to a qemu virtual machine:

$ qemu -drive nbd:localhost:10809

or examine with guestfish:

$ guestfish --ro --format=raw -a nbd://localhost -m /dev/sda1
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: ‘help’ for help on commands
      ‘man’ to read the manual
      ‘quit’ to quit the shell

> ll /
total 2420
drwxr-xr-x 14 root root  16384 Jan  1  1970 .
drwxr-xr-x 19 root root   4096 Oct 28 10:07 ..
-rwxr-xr-x  1 root root     40 Sep 17 21:23 .dir-locals.el
-rwxr-xr-x  1 root root    879 Oct 27 21:10 .gdb_history
drwxr-xr-x  8 root root  16384 Oct 28 10:05 .git
-rwxr-xr-x  1 root root   1383 Sep 17 21:23 .gitignore
-rwxr-xr-x  1 root root   1453 Sep 17 21:23 LICENSE
-rwxr-xr-x  1 root root  34182 Oct 28 10:04 Makefile
-rwxr-xr-x  1 root root   2568 Oct 27 22:17 Makefile.am
-rwxr-xr-x  1 root root  32085 Oct 27 22:18 Makefile.in
-rwxr-xr-x  1 root root    620 Sep 17 21:23 OTHER_PLUGINS
-rwxr-xr-x  1 root root   4628 Oct 16 22:36 README
-rwxr-xr-x  1 root root   4007 Sep 17 21:23 TODO
-rwxr-xr-x  1 root root  54733 Oct 27 22:18 aclocal.m4
drwxr-xr-x  2 root root  16384 Oct 27 22:18 autom4te.cache
drwxr-xr-x  2 root root  16384 Oct 28 10:04 bash
drwxr-xr-x  5 root root  16384 Oct 27 18:07 common
[etc]

Previously … create ISO images on the fly in nbdkit

Advertisements

Leave a comment

Filed under Uncategorized

Keeping a work notebook

There has been some discussion on HN of using a logbook or notebook. I’ve used a work notebook on paper for about 20 years. Here are the ones from the last 8 years (minus the one I’m currently using):

1-notebooks

Years ago Red Hat even had their own branded notebooks. I nicked one from the office supply cabinet and they seem to have stopped making them:

2-redhat.jpg

The older books had blank pages. These notes from 2010 record a list of bugs (tick marks for done/fixed items) and the initial design of guestfs-browser:

3-bugs

Unfortunately unlined pages don’t work well for me because I have pretty terrible handwriting. I’ve moved to using lined notebooks now as you can see by comparing these two pages from 2011 and 2014 respectively:

My ideal notebook is the Oxford Black n’ Red A5 Matt Casebound Hardback Notebook, Ruled 192 Pages, and my ideal pen is the UM-153S Signo Impact Gel Pen:

6-drawings.jpg

Most of the pages are scribbled notes from meetings. If you saw me furiously scribbling at the KVM Forum last month, then this is what I was writing.

7-kvm-forum

I find it really helpful to remember the contents of meetings and what to do. Asterisks mean ideas for future research or work. Ticks are items which have been done.

The number of doodles is not necessarily related to the boredom in the meeting!

1 Comment

Filed under Uncategorized

My KVM Forum 2015 talk: New qemu technology used in virt-v2v

All KVM Forum talks can be found here.

1 Comment

Filed under Uncategorized

KVM Forum 2015

Assuming HMG can get my passport back to me in time, I am speaking at the KVM Forum 2015 in Seattle USA (full schedule of talks here).

I’m going to be talking about virt-v2v and new features of qemu/KVM that made it possible for virt-v2v to be faster and more reliable than ever.

Leave a comment

Filed under Uncategorized

Handout for my talk at KVM Forum

The handout is here (PDF). The talk itself can be downloaded from this git repository.

For more information about libguestfs, there is copious documentation on the website.

6 Comments

Filed under Uncategorized

KVM Forum 2011 videos

Some of them are on youtube here:

http://www.youtube.com/playlist?list=PL7C0F52E2227156B3

Open formats here:

http://www.montanalinux.org/video-kvm-forums-2011.html

(Thanks Dan Berrange)

Leave a comment

Filed under Uncategorized

KVM Forum 2011 slides are up

The slides are available here. Videos will be available later.

Leave a comment

Filed under Uncategorized