[PATCH] sparsify: Fix test-virt-sparsify-in-place-fstrim-unsupported.sh
by Richard W.M. Jones
Since Linux commit f663b5b38fff trimming vfat is now supported by
Linux. This broke the test which assumed it was not supported. Use
another filesystem (minix) which does not support trimming instead.
Thanks: Daniel P. Berrangé and Pino Toscano.
---
...virt-sparsify-in-place-fstrim-unsupported.sh | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/sparsify/test-virt-sparsify-in-place-fstrim-unsupported.sh b/sparsify/test-virt-sparsify-in-place-fstrim-unsupported.sh
index ff7dab3fa..e2b2e9c20 100755
--- a/sparsify/test-virt-sparsify-in-place-fstrim-unsupported.sh
+++ b/sparsify/test-virt-sparsify-in-place-fstrim-unsupported.sh
@@ -21,13 +21,11 @@
#
# https://bugzilla.redhat.com/show_bug.cgi?id=1364347
#
-# This test assumes that the kernel vfat driver does not support
+# This test assumes that the kernel minix driver does not support
# fstrim. It might become supported in a future kernel version in
# which case we could use a different filesystem for this test, or
# delete the test if we are confident that all common filesystems are
# supported.
-#
-# The reason why vfat is significant is because UEFI guests use it.
set -e
set -x
@@ -41,8 +39,13 @@ img=test-virt-sparsify-in-place-fstrim-unsupported.img
log=test-virt-sparsify-in-place-fstrim-unsupported.log
rm -f $img $log
-# Create a test filesystem with a single vfat filesystem.
-guestfish -N $img=fs:vfat exit
+# Create a test filesystem with a single minix filesystem. If this
+# fails, skip the test under the assumption that (like with Enterprise
+# Linux systems) Minix is not supported.
+guestfish -N $img=fs:minix exit || {
+ echo $0: skipping the test because Minix filesystems are not supported
+ exit 77
+}
# This should warn.
virt-sparsify --in-place $img |& tee $log
@@ -58,8 +61,8 @@ if grep "warning:.*fstrim.*not supported" $log; then
exit 1
fi
-# Create a test filesystem with vfat and ext4 filesystems.
-guestfish -N $img=bootroot:vfat:ext4 exit
+# Create a test filesystem with minix and ext4 filesystems.
+guestfish -N $img=bootroot:minix:ext4 exit
# This should warn.
virt-sparsify --in-place $img |& tee $log
--
2.18.0
6 years
Tests and trimming vfat
by Richard W.M. Jones
Here's a fun one:
+ guestfish -N test-virt-sparsify-in-place-fstrim-unsupported.img=fs:vfat exit
+ virt-sparsify --in-place test-virt-sparsify-in-place-fstrim-unsupported.img
+ tee test-virt-sparsify-in-place-fstrim-unsupported.log
[ 2.4] Trimming /dev/sda1
[ 7.5] Sparsify in-place operation completed with no errors
+ grep 'warning:.*fstrim' test-virt-sparsify-in-place-fstrim-unsupported.log
FAIL test-virt-sparsify-in-place-fstrim-unsupported.sh (exit status: 1)
We expect (for the purposes of the regression test) that vfat
filesystems cannot be trimmed. It turns out that fstrim for vfat has
now been implemented in Linux (commit f663b5b38fff) :-) Thanks
Wentao Wang (this is actually great for virt-v2v).
So we need to find another filesystem which doesn't support fstrim.
Or maybe just delete this regression test.
Thoughts?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
6 years
[PATCH] v2v: windows: Fix rhev-apt command line (RHBZ#1624902).
by Richard W.M. Jones
See:
https://bugzilla.redhat.com/show_bug.cgi?id=1584678#c15
Fixes commit bcdbe6405c10ecb7374ae47eee6385be17dbd49e. However this
bug was copied directly from old virt-v2v which did the same thing
(from lib/Sys/VirtConvert/Converter/Windows.pm):
echo installing rhev-apt >>log.txt
"rhev-apt.exe" /S /v /qn >>log.txt
Thanks: Lev Veyde
---
v2v/convert_windows.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index 1e058136e..0346ba4fe 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -347,7 +347,7 @@ echo Wait for PnP to complete
@echo off
echo installing rhev-apt
-\"\\rhev-apt.exe\" /S /v /qn
+\"\\rhev-apt.exe\" /S /v/qn
echo starting rhev-apt
net start rhev-apt
--
2.18.0
6 years
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
by Pino Toscano
Hi,
this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not test all the libvirt input modes (like VDDK, and Xen), but
VMware and libvirtxml work fine as before.
Thanks,
Pino Toscano (7):
v2v: require libvirt
common: Bundle the ocaml-libvirt library for use by virt-v2v
v2v: switch to ocaml-libvirt
v2v: -o libvirt: use a Lazy for the connection
v2v: -o libvirt: switch away from virsh
v2v: test-harness: stop using the external ocaml-libvirt
build: stop looking for ocaml-libvirt
.gitignore | 2 +
Makefile.am | 5 +-
common/mllibvirt/Makefile.am | 102 ++
common/mllibvirt/generator.pl | 890 ++++++++++++++
common/mllibvirt/libvirt.README | 9 +
common/mllibvirt/libvirt.ml | 1624 +++++++++++++++++++++++++
common/mllibvirt/libvirt.mli | 1537 +++++++++++++++++++++++
common/mllibvirt/libvirt_c_epilogue.c | 420 +++++++
common/mllibvirt/libvirt_c_oneoffs.c | 1550 +++++++++++++++++++++++
common/mllibvirt/libvirt_c_prologue.c | 129 ++
configure.ac | 1 +
docs/C_SOURCE_FILES | 1 -
m4/guestfs-ocaml.m4 | 4 -
po/POTFILES | 1 -
v2v/Makefile.am | 26 +-
v2v/copy_to_local.ml | 7 +-
v2v/dummy.c | 2 +
v2v/input_libvirt.ml | 20 +-
v2v/input_libvirt_other.ml | 27 +-
v2v/input_libvirt_other.mli | 5 +-
v2v/input_libvirt_vcenter_https.ml | 13 +-
v2v/input_libvirt_vcenter_https.mli | 2 +-
v2v/input_libvirt_vddk.ml | 21 +-
v2v/input_libvirt_vddk.mli | 4 +-
v2v/input_libvirt_xen_ssh.ml | 13 +-
v2v/input_libvirt_xen_ssh.mli | 2 +-
v2v/input_libvirtxml.ml | 3 +-
v2v/libvirt_utils-c.c | 539 --------
v2v/libvirt_utils.ml | 95 +-
v2v/libvirt_utils.mli | 51 +-
v2v/output_libvirt.ml | 56 +-
v2v/parse_libvirt_xml.ml | 14 +-
v2v/parse_libvirt_xml.mli | 11 +-
v2v/test-harness/Makefile.am | 5 +-
v2v/v2v.ml | 12 +-
35 files changed, 6500 insertions(+), 703 deletions(-)
create mode 100644 common/mllibvirt/Makefile.am
create mode 100755 common/mllibvirt/generator.pl
create mode 100644 common/mllibvirt/libvirt.README
create mode 100644 common/mllibvirt/libvirt.ml
create mode 100644 common/mllibvirt/libvirt.mli
create mode 100644 common/mllibvirt/libvirt_c_epilogue.c
create mode 100644 common/mllibvirt/libvirt_c_oneoffs.c
create mode 100644 common/mllibvirt/libvirt_c_prologue.c
create mode 100644 v2v/dummy.c
delete mode 100644 v2v/libvirt_utils-c.c
--
2.17.1
6 years
[PATCH] v2v: docs: Describe support for SHA-2 certs for Windows 7 / 2008 R2 (RHBZ#1624878).
by Richard W.M. Jones
Thanks: Yan Vugenfirer.
---
v2v/virt-v2v.pod | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index c6810aab7..f9f659cef 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -1139,6 +1139,20 @@ This can also prevent booting with a 7B error [see previous section]
if the guest has group policy containing
C<Device Installation Restrictions>.
+=head2 Support for SHA-2 certificates in Windows 7 and Windows Server 2008 R2
+
+Later versions of the Windows virtio drivers are signed using SHA-2
+certificates (instead of SHA-1). The original shipping Windows 7 and
+Windows Server 2008 R2 did not understand SHA-2 certificates and so
+the Windows virtio drivers will not install properly.
+
+To fix this you must apply SHA-2 Code Signing Support from:
+L<https://docs.microsoft.com/en-us/security-updates/SecurityAdvisories/2015...>
+before converting the guest.
+
+For further information see:
+L<https://bugzilla.redhat.com/show_bug.cgi?id=1624878>
+
=head1 UEFI
VMware allows you to present UEFI firmware to guests (instead of the
--
2.18.0
6 years