Originally reported by Marek Goldmann. irb(main):005:0> g.launch open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support => nil irb(main):006:0> g.wait_ready => nil irb(main):007:0> g.list_partitions => ["/dev/sda1"] irb(main):008:0> g.mount( "/dev/sda1", "/" ) => nil irb(main):009:0> g.ls("/") => [".gem", ".rnd", "bin", "boot", "dev", "etc", "home", "lib", "lib64", "lost+found", "media", "mnt", "opt", "proc", "root", "sbin", "selinux", "srv", "sys", "tmp", "usr", "var"] irb(main):010:0> g.command("ls /") TypeError: can't convert Fixnum into String from (irb):10:in `command' from (irb):10 from :0 irb(main):011:0> g.command("'ls /'") TypeError: can't convert Fixnum into String from (irb):11:in `command' from (irb):11 from :0 irb(main):012:0>
The problem here is that the string being passed should be a list, ie: g.command(["ls /"]) However the error message is pretty obscure. It should either silently convert the string to a single element list, or else give a proper error message.
Correction, that should be: g.command( ["ls", "/"] )
This should be fixed[1] by the following cset: http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=227b1eea90713d190a9cf5463af106af0b4eee2c [1] ie. the error message, you still have to pass an array, not a string.
libguestfs-1.0.51-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/libguestfs-1.0.51-1.fc11
libguestfs-1.0.54-2.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/libguestfs-1.0.54-2.fc11
libguestfs-1.0.55-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/libguestfs-1.0.55-1.fc11
libguestfs-1.0.58-2.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/libguestfs-1.0.58-2.fc11
libguestfs-1.0.54-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
libguestfs-1.0.58-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
Long fixed upstream: irb(main):010:0> g.command("ls /") TypeError: wrong argument type String (expected Array)