FYI, lvs.ml: Unbound value Guestfs.create
by Jim Meyering
FYI, while "make" succeeded in this directory on Friday,
I ran "make clean" today from the top, then "make" and got this:
Making all in examples
make[3]: Entering directory `/home/j/w/co/libguestfs/ocaml/examples'
ocamlfind ocamlopt \
-warn-error A -I .. mlguestfs.cmxa lvs.ml -o lvs
File "lvs.ml", line 11, characters 10-24:
Error: Unbound value Guestfs.create
make[3]: *** [lvs] Error 2
make[3]: Leaving directory `/home/j/w/co/libguestfs/ocaml/examples'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/j/w/co/libguestfs/ocaml'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/j/w/co/libguestfs'
make: *** [all] Error 2
[Exit 2]
15 years, 2 months
[PATCH libguestfs] build: fix compile error
by Jim Meyering
>From 3a09d409df89d72ca476ed829739b4aacf08735d Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Fri, 2 Oct 2009 16:09:19 +0200
Subject: [PATCH libguestfs] build: fix compile error
Link demo scripts with just-build library, not the installed one.
* ocaml/examples/Makefile.am (OCAMLFINDFLAGS): New variable.
(lvs, viewer): Use it.
This fix is based on a suggestion from Rich Jones.
This addresses <http://bugzilla.redhat.com/526917>.
---
ocaml/examples/Makefile.am | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ocaml/examples/Makefile.am b/ocaml/examples/Makefile.am
index b516647..3b9901a 100644
--- a/ocaml/examples/Makefile.am
+++ b/ocaml/examples/Makefile.am
@@ -6,15 +6,18 @@ if HAVE_OCAML
noinst_SCRIPTS = lvs
+OCAMLFINDFLAGS = -ccopt '-L $(top_builddir)/src/.libs'
+
lvs: lvs.ml
- $(OCAMLFIND) ocamlopt -warn-error A -I .. mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt $(OCAMLFINDFLAGS) \
+ -warn-error A -I .. mlguestfs.cmxa $< -o $@
if BUILD_OCAML_VIEWER
noinst_SCRIPTS += viewer
viewer: throbber.ml xmllight_loader.mli xmllight_loader.ml viewer.ml
- ocamlducefind opt \
+ ocamlducefind opt $(OCAMLFINDFLAGS) \
-warn-error A \
-thread \
-package libvirt,lablgtk2,extlib,xml-light,ocamlduce,threads -I .. \
@@ -30,4 +33,4 @@ throbber.ml: Throbber.png Throbber.gif
endif
-endif
\ No newline at end of file
+endif
--
1.6.5.rc2.177.ga9dd6
15 years, 2 months
[PATCH] v2v-snapshot: Improve documentation
by Matthew Booth
Highlight that the tool is not a general purpose snapshotting tool.
Add some examples.
---
snapshot/v2v-snapshot.pl | 79 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 74 insertions(+), 5 deletions(-)
diff --git a/snapshot/v2v-snapshot.pl b/snapshot/v2v-snapshot.pl
index ce66bca..8408d13 100755
--- a/snapshot/v2v-snapshot.pl
+++ b/snapshot/v2v-snapshot.pl
@@ -48,11 +48,13 @@ v2v-snapshot - Convert a guest to use a qcow2 snapshot for storage
=head1 DESCRIPTION
-v2v-snapshot is a tool for creating a local snapshot of a guest's storage. It
-is suitable for use when making a change to a guest which might have to be
-rolled back. It is not intended as a long-term storage option. v2v-snapshot
-creates a qcow2 snapshot for all a guest's block devices and updates the guest's
-libvirt domain to use them.
+v2v-snapshot is a tool for creating a local snapshot of a guest's storage. It is
+suitable for use when making a change to a guest which might have to be rolled
+back. v2v-snapshot creates a qcow2 snapshot for all a guest's block devices and
+updates the guest's libvirt domain to use them.
+
+B<v2v-snapshot can only snapshot a guest which is shutdown. It is not intended
+as a long-term storage option.>
When a change has been tested, v2v-snapshot can either commit the change, which
will update the original storage with the changes made to the snapshot, or
@@ -757,6 +759,73 @@ sub _get_xml_path
return $xmldir.'/'._get_guest_name($dom).'.xml';
}
+=head1 EXAMPLES
+
+=head2 Snapshot a local guest
+
+=over
+
+This example covers snapshotting a guest which is available through libvirt on
+the local machine. The guest domain's name is I<E<lt>guestE<gt>>.
+
+First ensure the guest is shutdown:
+
+ # virsh destroy <guest>
+
+Snapshot the guest:
+
+ # v2v-snapshot <guest>
+
+Start the guest, make some changes, modify hardware, test changes. To commit
+the changes:
+
+ # v2v-snapshot --commit <guest>
+
+Alternatively, to rollback the changes:
+
+ # v2v-snapshot --rollback <guest>
+
+=back
+
+=head2 Snapshot an imported guest
+
+=over
+
+This example covers snapshotting a guest which has been copied from another
+machine. For this to work you must have the domain XML exported from the origin
+machine:
+
+ (Origin) # virsh dumpxml <guest> > guest.xml
+
+You must also present all of the guest's disk images to the local machine in the
+locations specified in guest.xml. If copying the images, the easiest
+way to achieve this is to copy it to the same path on the local machine as it
+had on the origin machine. If the storage can be remotely mounted, it should be
+presented to the local machine with the same paths as on the origin machine. If
+the location of the storage must change, you must manually edit guest.xml to
+reflect the new paths.
+
+If it is possible to create the domain on the local machine:
+
+ # v2v-snapshot -i libvirtxml guest.xml
+
+This command will create the imported domain locally with snapshot storage.
+
+If it is not possible to create the domain locally, for example because it is a
+Xen domain and the local libvirt cannot manage Xen domains:
+
+ # v2v-snapshot -o snapshot-guest.xml -i libvirtxml guest.xml
+
+This command does not attempt the create the domain locally, which would fail.
+Instead it writes updated domain XML to I<snapshot-guest.xml>. The disks in
+snapshot-guest.xml point to the newly created snapshot volumes.
+
+The latter method of import is intended for use when importing a Xen domain from
+a origin machine for conversion with L<virt-v2v(1)>. virt-v2v should be given
+I<snapshot-guest.xml> as the domain XML.
+
+=back
+
=head1 SEE ALSO
L<virt-v2v(1)>,
--
1.6.2.5
15 years, 2 months