5 guestfs-ruby - How to use libguestfs from Ruby
10 g = Guestfs::Guestfs.new()
11 g.add_drive_opts("disk.img",
12 :readonly => 1, :format => "raw")
17 This manual page documents how to call libguestfs from the Ruby
18 programming language. This page just documents the differences from
19 the C API and gives some examples. If you are not familiar with using
20 libguestfs, you also need to read L<guestfs(3)>.
24 Errors from libguestfs functions are mapped into the C<Error>
25 exception. This has a single parameter which is the error message (a
28 =head1 EXAMPLE 1: CREATE A DISK IMAGE
32 =head1 EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE
39 L<guestfs-examples(3)>,
45 L<guestfs-recipes(1)>,
46 L<http://libguestfs.org/>.
50 Richard W.M. Jones (C<rjones at redhat dot com>)
54 Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>
56 The examples in this manual page may be freely copied, modified and
57 distributed without any restrictions.
59 This library is free software; you can redistribute it and/or
60 modify it under the terms of the GNU Lesser General Public
61 License as published by the Free Software Foundation; either
62 version 2 of the License, or (at your option) any later version.
64 This library is distributed in the hope that it will be useful,
65 but WITHOUT ANY WARRANTY; without even the implied warranty of
66 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
67 Lesser General Public License for more details.
69 You should have received a copy of the GNU Lesser General Public
70 License along with this library; if not, write to the Free Software
71 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA