Tag Archives: libguestfs-1.12

New libguestfs 1.12: Full Java bindings

In this series of posts I’ll be looking at what’s new in the forthcoming release of libguestfs 1.12.

In previous versions of libguestfs, the Java bindings were incomplete. In 1.12 they now cover all API calls, and we are also providing Java examples which match the other language examples.

As explained here yesterday you can also use these bindings from JRuby.

Leave a comment

Filed under Uncategorized

Debian packages for libguestfs 1.12

Debian packages for libguestfs 1.12 are now available. You must read the README file before trying to use these.

Leave a comment

Filed under Uncategorized

Ubuntu packages for libguestfs 1.12.0

The Ubuntu packages are here. Read the README file before trying to install them.

Leave a comment

Filed under Uncategorized

Fedora package for libguestfs 1.12

There is now a Fedora package for libguestfs 1.12. It requires Rawhide or the soon-to-be-branched Fedora 16.

There are two kernel or qemu bugs which prevent us from running the full test suite (723555, 723822), so we’ve only been able to do the “quick check”. So some bits might be broken.

2 Comments

Filed under Uncategorized

libguestfs 1.12 released!

libguestfs 1.12 has been released!

Read the release notes here:

http://libguestfs.org/RELEASE-NOTES.txt

Leave a comment

Filed under Uncategorized

New in libguestfs 1.12: use virt-ls to analyze guests

In this series of posts I’ll be looking at what’s new in the forthcoming release of libguestfs 1.12.

With the forthcoming virt-ls -lR option you will be able to extract the file metadata from a virtual machine easily. The output format is designed so that simple grep patterns can be used to detect interesting things in the output.

For example to display the names of all setuid and setgid files in the VM:

# virt-ls -lR -d guest / | grep '^- [42]'
- 4755      12544 /bin/cgexec -
- 4755      32448 /bin/fusermount -
- 4755      78648 /bin/mount -
- 4755      43160 /bin/ping -
- 4755      47888 /bin/ping6 -
- 4755      34904 /bin/su -
- 4755      50432 /bin/umount -
[...]

To display all public writable directories:

# virt-ls -lR -d guest / | grep '^d ...7'
d 1777      12288 /tmp -
d 1777       4096 /tmp/.ICE-unix -
d 1777       4096 /tmp/.X11-unix -
d 1777       4096 /var/tmp -

To display files larger than 10MB in home directories:

# virt-ls -lR -d guest /home | awk '$3 >= 10*1024*1024'

Find regular files modified in the last 24 hours:

# virt-ls -lR -d guest --time-days / |
    grep '^-' |
    awk '$6 < 1'
[...]
- 0600        138   0   0   0 /home/rjones/.Xauthority
- 0600         69   0   0   0 /root/.xauthsdYvWC
- 0444         11   0   0   0 /tmp/.X0-lock
[...]

Also filesystem comparisons are made much simpler. So to display changes in files between a snapshot and the latest version of a VM you would simply do:

# virt-ls -lR -a snapshot.img / --uids --time-t --checksum > old
# virt-ls -lR -a current.img / --uids --time-t --checksum > new
# diff -u old new | less

Leave a comment

Filed under Uncategorized

New in libguestfs 1.12: easier file creation and appending in guestfish

In this series of posts I’ll be looking at what’s new in the forthcoming release of libguestfs 1.12.

Earlier versions of guestfish made it hard to append lines at the end of a configuration file. In libguestfs 1.12, this is much simpler because we support \n in quotes and a new write-append command.

$ guestfish -i -d Guest
><fs> write-append /etc/resolv.conf "nameserver 1.2.3.4\nnameserver 1.2.3.5\n"

Leave a comment

Filed under Uncategorized

New in libguestfs 1.12: use UUIDs in virt tools

In this series of posts I’ll be looking at what’s new in the forthcoming release of libguestfs 1.12.

If you follow the example in my Summit handout you can use virt-df to monitor your VMs’ disk usage over time. But what if your VMs migrate between hosts or get renamed? Previously you had to rely on the guest name being unique and not changing. In libguestfs 1.12 we have changed most of the virt tools so you can now use a UUID to specify guests instead of a name.

# virt-df -d 799ae7ca-23a2-f622-c691-48feebcddbe6 -h
Filesystem                      Size       Used  Available  Use%
799ae7ca-23a2-f622-c691-48feebcddbe6:/dev/sda1
                                484M        67M       393M   14%
799ae7ca-23a2-f622-c691-48feebcddbe6:/dev/vg_f13x64/lv_root
                                7.4G       4.3G       3.1G   58%

Leave a comment

Filed under Uncategorized

New in libguestfs 1.12: HKEY_USERS in virt-win-reg

In this series of posts I’ll be looking at what’s new in the forthcoming release of libguestfs 1.12.

In 1.12 you will be able to use virt-win-reg to list out and update Windows user preferences stored in HKEY_USERS keys.

There are two ways to use this. You can either specify a User SID like:

virt-win-reg Windows 'HKEY_USERS\S-1-5-19\Software\Policies'

or (as a libguestfs extension) you can specify a local user name directly:

virt-win-reg Windows 'HKEY_USERS\rjones\Control Panel'

Leave a comment

Filed under Uncategorized

New in libguestfs 1.12: display operating system icon from virt-inspector

In this series of posts I’ll be looking at what’s new in the forthcoming release of libguestfs 1.12.

For many operating system types, virt-inspector can now provide an OS icon/logo. The icon is actually grabbed from inside the virtual machine during inspection. It’s done this way to avoid trademark issues.

You can display the icon from the XML using a great little tool called XML Starlet. Here’s how:

# virt-inspector -d FedoraGuest > fedora.xml
# xmlstarlet sel -t -v '//icon' < fedora.xml |
    base64 -i -d |
    display -

Partly related to this: there’s a new display command in guestfish, which lets you display icons and images from any guest:

# guestfish --ro -i -d FedoraRawhidex64
><fs> display /usr/share/icons/hicolor/256x256/apps/fedora-logo-icon.png

Leave a comment

Filed under Uncategorized