Test failure w/ libguestfs-1.0.61 on RHEL5 -- needs virtio support in guest kernel?
by Charles Duffy
See attachment for full logs. Appears at first glance to be related to
the lack of support for virtio-net in the guest kernel.
/usr/bin/qemu-kvm /usr/bin/qemu-kvm -drive
file=test1.img,cache=off,if=ide -drive file=test2.img,cache=off,if=ide
-drive file=test3.img,cache=off,if=ide -drive
file=../images/test.sqsh,snapshot=on,if=ide -m 500 -no-reboot -kernel
/tmp/libguestfscfrLMf/kernel -initrd /tmp/libguestfscfrLMf/initrd
-append panic=1 console=ttyS0 guestfs=10.0.2.4:6666 guestfs_verbose=1
noapic -nographic -serial stdio -net
channel,6666:unix:/tmp/libguestfscfrLMf/sock,server,nowait -net
user,vlan=0 -net nic,model=virtio,vlan=0 -no-hpet -rtc-td-hack
[...]
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
SIOCADDRT: No such process
Reading all physical volumes. This may take a while...
/init: line 48: /sys/block/vd*/queue/rotational: No such file or directory
verbose daemon enabled
connect: Network is unreachable
connection to 10.0.2.4:6666 failed
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: guestfsd Not tainted 2.6.30 #1
Call Trace:
[<ffffffff8023a51f>] panic+0xe0/0x190
[<ffffffff8023c044>] ? put_files_struct+0xac/0xb9
[<ffffffff802427af>] ? exit_ptrace+0x2f/0x112
[<ffffffff8023d296>] do_exit+0x7e/0x668
[<ffffffff8023d8f8>] do_group_exit+0x78/0xa8
[<ffffffff8023d93f>] sys_exit_group+0x17/0x1b
[<ffffffff8020bbdb>] system_call_fastpath+0x16/0x1b
Rebooting in 1 seconds..sock_read_event: 0x62d010 g->state = 1, fd = 3,
events = 0x1
stdout_event: 0x62d010: child process died
guestfs_wait_ready failed, see earlier error messages
guestfs_wait_ready FAILED
closing guestfs handle 0x62d010 (state 0)
FAIL: tests
15 years, 4 months
libguestfs in EPEL?
by Aron Griffis
Hi,
The libguestfs homepage says that libguestfs and guestfish are
available in EPEL, but I can't find any evidence of them there.
I haven't made much use of EPEL so I might be missing something.
Any suggestions?
Thanks,
Aron
15 years, 4 months
[PATCH] Make Perl strings translatable
by Richard W.M. Jones
This patch makes Perl strings translatable. The Perl strings end up
in the PO files as usual. It does not touch the embedded POD.
Internationalizing the Perl strings was pleasantly simple. Just add:
use Locale::TextDomain 'libguestfs';
at the top of any *.pl or *.pm file. Then for each string in the file
that you want to be translatable you place TWO underscores before it:
- die "virt-inspector: no YAML support\n"
+ die __"virt-inspector: no YAML support\n"
unless exists $INC{"YAML/Any.pm"};
However this doesn't work if the string contains any $substitutions.
In that case you have to use the __x (two underscores and x) operator:
- die "guest image $_ does not exist or is not readable"
+ die __x("guest image {imagename} does not exist or is not readable",
+ imagename => $_)
unless -r $_;
The second case causes a note to be added to the PO file, so hopefully
the translators will understand not to change the placeholders inside
braces:
+#: perl/blib/lib/Sys/Guestfs/Lib.pm:142 perl/lib/Sys/Guestfs/Lib.pm:142
+#, perl-brace-format
+msgid "guest image {imagename} does not exist or is not readable"
+msgstr ""
The patch is otherwise fairly simple. I've changed po/POTFILES.in so
that it is now generated automatically, and it includes the daemon
code which we don't translate yet, but might consider doing in future.
'perl-libintl' is now a required module for virt-df / virt-inspector /
virt-v2v (but not for the basic Perl bindings).
This FAQ is useful to explain some of the reasons for the changes
above:
http://search.cpan.org/dist/libintl-perl/lib/Locale/libintlFAQ.pod
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
15 years, 4 months
[PATCH] Fix: virt-inspector takes ages to run on RHEL 3 guests
by Richard W.M. Jones
Currently virt-inspector takes ages to run on RHEL 3 guests.
I tracked this down to processing the old-style initrd images in these
guests. These initrd images are compressed ext2 filesystems. 'cpio'
tries to parse them as cpio files, and takes a very long time to fail
(and spews out a lot of errors in the process).
These two patches fix the problem: Firstly we introduce a new command
'zfile' for doing the 'file' operation inside compressed files. eg:
guestfs_zfile (g, "gzip", "/boot/initrd.img")
==> "Linux rev 1.0 ext2 filesystem data"
Second patch updates Sys::Guestfs::Lib to ignore such files.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
15 years, 4 months