diff --git a/.gitignore b/.gitignore index 846a3b974..d8684d327 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,6 @@ Makefile.in /AUTHORS /autom4te.cache /bash/guestunmount -/bash/libguestfs-test-tool /bash/virt-builder /bash/virt-cat /bash/virt-copy-in @@ -603,34 +602,6 @@ Makefile.in /utils/boot-benchmark/boot-benchmark.1 /utils/qemu-boot/qemu-boot /utils/qemu-speed-test/qemu-speed-test -/v2v/.depend -/v2v/config.ml -/v2v/oUnit-* -/v2v/output_rhv_upload_*_source.ml -/v2v/real-*.d/ -/v2v/real-*.img -/v2v/real-*.xml -/v2v/stamp-virt-v2v*.pod -/v2v/test-harness/.depend -/v2v/test-harness/META -/v2v/test-harness/stamp-virt-v2v-test-harness.pod -/v2v/test-harness/virt-v2v-test-harness.1 -/v2v/test-v2v-conversion-of-*.sh -/v2v/uefi.ml -/v2v/uefi.mli -/v2v/v2v_unit_tests -/v2v/var_expander_tests -/v2v/virt-v2v -/v2v/virt-v2v.1 -/v2v/virt-v2v-copy-to-local -/v2v/virt-v2v-copy-to-local.1 -/v2v/virt-v2v-input-vmware.1 -/v2v/virt-v2v-input-xen.1 -/v2v/virt-v2v-output-local.1 -/v2v/virt-v2v-output-openstack.1 -/v2v/virt-v2v-output-rhv.1 -/v2v/virt-v2v-support.1 -/v2v/windows.vmdk /website/download/builder/*.xz /website/*.html /website/README.txt diff --git a/Makefile.am b/Makefile.am index a30b8287a..28f542765 100644 --- a/Makefile.am +++ b/Makefile.am @@ -174,10 +174,6 @@ SUBDIRS += get-kernel SUBDIRS += resize SUBDIRS += sparsify SUBDIRS += sysprep -if HAVE_LIBVIRT -SUBDIRS += v2v -SUBDIRS += v2v/test-harness -endif if HAVE_FUSE SUBDIRS += dib endif @@ -358,9 +354,8 @@ po/POTFILES: configure.ac po/POTFILES-ml: configure.ac rm -f $@ $@-t cd $(srcdir); \ - find builder common/ml* customize dib get-kernel resize sparsify sysprep v2v -name '*.ml' | \ + find builder common/ml* customize dib get-kernel resize sparsify sysprep -name '*.ml' | \ grep -v '^builder/templates/' | \ - grep -v '^v2v/config.ml$$' | \ LC_ALL=C sort > $@-t mv $@-t $@ diff --git a/TODO b/TODO index 6f1d7f556..2e37ce67c 100644 --- a/TODO +++ b/TODO @@ -570,39 +570,3 @@ Subsecond handling in virt-diff, virt-ls Handle nanoseconds properly. You should be able to specify them on the command line and display them. - -virt-v2v -o rhv-upload ----------------------- - -* Set or disable the ticket timeout. The default is going to be - increased (from current 60 seconds), so maybe we won't have to - set it. See also: - https://bugzilla.redhat.com/show_bug.cgi?id=1563278 - -* qcow2 cannot be supported yet because there is not yet any - concept in imageio of read+write handles. - https://bugzilla.redhat.com/show_bug.cgi?id=1563299 - -* preallocated cannot be supported yet because imageio doesn't - know how to zero the image efficiently, instead it runs an - fallocate process which writes to every block and that takes - many minutes. - -* Really check what insecure/rhv_cafile do and implement it correctly. - -* Measure and resolve performance problems. - -* Allocated image size is unknown for v2v uploads, but imageio needs - to know it. We pass initial_size == provisioned_size == virtual size. - That can't be fixed from the v2v side. - -* There are unresolved issues about how to clean up disks on failure. - -virt-v2v -o openstack ---------------------- - -Use the metadata service to find the -oo server-id setting. It would -no longer need to be specified on the command line. Note there are -two variations of metadata service in OpenStack, either the config -disk or link-local network address. We would need to support both, or -the possibility that there is no metadata service. diff --git a/bash/Makefile.am b/bash/Makefile.am index 61b37deba..d67353816 100644 --- a/bash/Makefile.am +++ b/bash/Makefile.am @@ -20,15 +20,13 @@ include $(top_srcdir)/subdir-rules.mk scripts = \ guestfish \ guestmount \ + libguestfs-test-tool \ virt-alignment-scan \ - virt-rescue \ - virt-v2v \ - virt-v2v-copy-to-local + virt-rescue # Some of the scripts are simply symbolic links. symlinks = \ guestunmount \ - libguestfs-test-tool \ virt-builder \ virt-cat \ virt-copy-in \ @@ -63,9 +61,9 @@ CLEANFILES += \ # Any tool that has --short-options and --long-options only is handled # by this common script. -libguestfs-test-tool virt-win-reg: +virt-win-reg: rm -f $@ - $(LN_S) virt-v2v-copy-to-local $@ + $(LN_S) libguestfs-test-tool $@ # Any tool that has --short-options and --long-options and a few # common options like -d is handled by this common script. However diff --git a/bash/virt-v2v-copy-to-local b/bash/libguestfs-test-tool similarity index 88% rename from bash/virt-v2v-copy-to-local rename to bash/libguestfs-test-tool index 8360b0b98..0211f036c 100644 --- a/bash/virt-v2v-copy-to-local +++ b/bash/libguestfs-test-tool @@ -1,4 +1,4 @@ -# virt-v2v-copy-to-local bash completion script -*- shell-script -*- +# libguestfs-test-tool bash completion script -*- shell-script -*- # Copyright (C) 2014-2019 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify @@ -40,12 +40,6 @@ _guestfs_options_only () esac } -_virt_v2v_copy_to_local () -{ - _guestfs_options_only "virt-v2v-copy-to-local" -} && -complete -o default -F _virt_v2v_copy_to_local virt-v2v-copy-to-local - _virt_win_reg () { _guestfs_options_only "virt-win-reg" diff --git a/bash/virt-v2v b/bash/virt-v2v deleted file mode 100644 index cddd07391..000000000 --- a/bash/virt-v2v +++ /dev/null @@ -1,59 +0,0 @@ -# virt-v2v bash completion script -*- shell-script -*- -# Copyright (C) 2014 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -_virt_v2v () -{ - local cur prev words cword split - local shortopts longopts items - - _init_completion -s || return - - case "$prev" in - -i) - items="$(virt-v2v --machine-readable | awk -F':' '/input:/ {print $2;}')" - COMPREPLY=( $( compgen -W "$items" -- "$cur") ) - return ;; - -o) - items="$(virt-v2v --machine-readable | awk -F':' '/output:/ {print $2;}')" - COMPREPLY=( $( compgen -W "$items" -- "$cur") ) - return ;; - -oa) - COMPREPLY=( $( compgen -W "sparse preallocated" -- "$cur") ) - return ;; - --vmtype) - COMPREPLY=( $( compgen -W "server desktop" -- "$cur") ) - return ;; - esac - - case "$cur" in - --*) - # --options - longopts="$(virt-v2v --long-options)" - COMPREPLY=( $(compgen -W "$longopts" -- "$cur") ) - return ;; - -*) - # -o and --options - shortopts="$(virt-v2v --short-options)" - longopts="$(virt-v2v --long-options)" - COMPREPLY=( $(compgen -W "$shortopts $longopts" -- "$cur") ) - return ;; - *) - COMPREPLY=( $(compgen "$cur") ) - return ;; - esac -} && -complete -o default -F _virt_v2v virt-v2v diff --git a/configure.ac b/configure.ac index 20fd774e6..160a9dfd5 100644 --- a/configure.ac +++ b/configure.ac @@ -166,10 +166,6 @@ m4_include([m4/guestfs-rust.m4]) HEADING([Checking for Vala]) VAPIGEN_CHECK -dnl virt-v2v. -HEADING([Checking the virt-v2v dependencies]) -m4_include([m4/guestfs-v2v.m4]) - dnl Bash completion. HEADING([Checking for bash completion]) m4_include([m4/guestfs-bash-completion.m4]) @@ -318,8 +314,6 @@ AC_CONFIG_FILES([Makefile test-data/Makefile test-data/binaries/Makefile test-data/blank-disks/Makefile - test-data/fake-virtio-win/Makefile - test-data/fake-virt-tools/Makefile test-data/files/Makefile test-data/phony-guests/Makefile test-data/phony-guests/guests.xml @@ -369,10 +363,6 @@ AC_CONFIG_FILES([Makefile utils/max-disks/Makefile utils/qemu-boot/Makefile utils/qemu-speed-test/Makefile - v2v/Makefile - v2v/config.ml - v2v/test-harness/Makefile - v2v/test-harness/META website/index.html]) AC_OUTPUT diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES index def62f82c..1103e57d1 100644 --- a/docs/C_SOURCE_FILES +++ b/docs/C_SOURCE_FILES @@ -396,6 +396,3 @@ utils/boot-analysis/boot-analysis.h utils/boot-benchmark/boot-benchmark.c utils/qemu-boot/qemu-boot.c utils/qemu-speed-test/qemu-speed-test.c -v2v/dummy.c -v2v/qemuopts-c.c -v2v/test-harness/dummy.c diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod index 96a301a91..97934dcec 100644 --- a/docs/guestfs-building.pod +++ b/docs/guestfs-building.pod @@ -76,7 +76,7 @@ I. =item qemu-img E 1.3.0 -I. Virt-v2v requires qemu-img E 2.2.0. +I. =item kernel E 2.6.34 @@ -272,9 +272,6 @@ Optional. Used only for testing. Optional. qemu-nbd is used for testing. -L requires nbdkit E 1.12 for various input and output -modes. - =item uml_mkcow Optional. For the L. @@ -292,12 +289,6 @@ Optional. Used by virt-builder for checking digital signatures. Optional. If available, virt-builder will use this library for fast, parallel uncompression of templates. -=item zip - -=item unzip - -Optional. Used by virt-v2v to handle OVA files. - =item python-evtx Optional. Used by L to parse Windows Event Log files. @@ -310,10 +301,6 @@ Optional. For localizing OCaml virt tools. Optional. For testing the common OCaml modules. -=item ocaml-libvirt E 0.6.1.5 - -Optional. For building the optional virt-v2v test harness. - =item Perl C E 0.19 =item Perl C diff --git a/docs/guestfs-faq.pod b/docs/guestfs-faq.pod index 946869584..073c3467f 100644 --- a/docs/guestfs-faq.pod +++ b/docs/guestfs-faq.pod @@ -269,13 +269,6 @@ L =over 4 -=item RHEL 5 - -The version shipped in official RHEL 5 is very old and should not be -used except in conjunction with virt-v2v. Use the up-to-date -libguestfs 1.20 package in EPEL 5: -L - =item RHEL 6 =item RHEL 7 @@ -952,7 +945,7 @@ how you installed libguestfs (eg. from source, C, etc.) =back =head2 How do I debug when using any libguestfs program or tool -(eg. virt-v2v or virt-df)? +(eg. virt-customize or virt-df)? There are two C environment variables you can set in order to get more information from libguestfs. diff --git a/docs/guestfs-hacking.pod b/docs/guestfs-hacking.pod index 3130f04f3..9ee448d57 100644 --- a/docs/guestfs-hacking.pod +++ b/docs/guestfs-hacking.pod @@ -45,7 +45,7 @@ the source code of the core library. F is the code generator described above, so that is important. The F in the root directory will tell you in which order the subdirectories get built. And then if you are looking at a particular tool -(eg. F) or language binding (eg. F), go straight to that +(eg. F) or language binding (eg. F), go straight to that subdirectory, but remember that if you didn't run the generator yet, then you may find files which appear to be missing. @@ -126,17 +126,13 @@ A library of pure OCaml utility functions used in many places. =item F OCaml utility functions only used by the OCaml virt tools (like -C, C etc.) +C, C etc.) =item F OCaml bindings for C functions in C, and some POSIX bindings which are missing from the OCaml stdlib. -=item F - -A few generated files used by virt-v2v. - =item F OCaml bindings for the visit functions (see F). @@ -326,7 +322,9 @@ Miscellaneous utilities, such as C. =item F -L command and documentation. +Up to libguestfs E 1.42 this contained the L tool, +but this has now moved into a separate repository: +L =item F @@ -896,7 +894,7 @@ because OCaml programs usually have C files for native bindings etc. So a typical program is described as just its C sources: - virt_v2v_SOURCES = ... utils-c.c xml-c.c + virt_customize_SOURCES = ... crypt-c.c perl_edit-c.c For programs that have no explicit C sources, we create an empty F file, and list that instead: @@ -906,17 +904,17 @@ F file, and list that instead: The OCaml objects which contain most of the code are listed as automake dependencies (other dependencies may also be listed): - virt_v2v_DEPENDENCIES = ... cmdline.cmx v2v.cmx + virt_customize_DEPENDENCIES = ... customize_main.cmx The only other special thing we need to do is to provide a custom link command. This is needed because automake won't assemble the ocamlopt command, the list of objects and the C<-cclib> libraries in the correct order otherwise. - virt_v2v_LINK = \ + virt_customize_LINK = \ $(top_srcdir)/ocaml-link.sh -cclib '-lutils -lgnu' -- ... -The actual rules, which you can examine in F, are a +The actual rules, which you can examine in F, are a little bit more complicated than this because they have to handle: =over 4 @@ -941,49 +939,6 @@ it will not add them all automatically. =back -=head2 VIRT-V2V - -First a little history. Virt-v2v has been through at least two -complete rewrites, so this is probably about the third version (but we -don't intend to rewrite it again). The previous version was written -in Perl and can be found here: -L - -The current version started out as almost a line-for-line rewrite of -the Perl code in OCaml + C, and it still has a fairly similar -structure. Therefore if there are details of this code that you don't -understand (especially in the details of guest conversion), checking -the Perl code may help. - -The files to start with when reading this code are: - -=over 4 - -=item * - -F - -=item * - -F - -=back - -F defines all the structures used and passed around when -communicating between different bits of the program. F -controls how the program runs in stages. - -After studying those files, you may want to branch out into the input -modules (F), the output modules (F) or the -conversion modules (F). The input and output modules -define I<-i> and I<-o> options (see the manual). The conversion -modules define what guest types we can handle and the detailed steps -involved in converting them. - -Every other file in this directory is a support module / library of -some sort. Some code is written in C, especially where we want to use -an external C library such as libxml2. - =head1 MAINTAINER TASKS =head2 MAINTAINER MAKEFILE TARGETS diff --git a/installcheck.sh.in b/installcheck.sh.in index ed744cc60..509466039 100644 --- a/installcheck.sh.in +++ b/installcheck.sh.in @@ -67,8 +67,6 @@ cp @bindir@/virt-sparsify sparsify/ cp @bindir@/virt-sysprep sysprep/ cp @bindir@/virt-tar-in fish/ cp @bindir@/virt-tar-out fish/ -cp @bindir@/virt-v2v v2v/ -cp @bindir@/virt-v2v-copy-to-local v2v/ cp @bindir@/virt-win-reg tools/ # virt-list-filesystems, virt-list-partitions and virt-tar are not @@ -102,7 +100,6 @@ compare @libdir@/libguestfs.so lib/.libs/libguestfs.so compare @bindir@/guestfish fish/guestfish compare @bindir@/guestmount fuse/guestmount compare @bindir@/virt-df df/virt-df -compare @bindir@/virt-v2v v2v/virt-v2v compare @libdir@/guestfs/supermin.d/daemon.tar.gz \ appliance/supermin.d/daemon.tar.gz diff --git a/lib/appliance-uefi.c b/lib/appliance-uefi.c index a33291a6a..5fca8cd37 100644 --- a/lib/appliance-uefi.c +++ b/lib/appliance-uefi.c @@ -51,7 +51,7 @@ * should cause appliance building to fail (no UEFI firmware is not an * error). * - * See also F:find_uefi_firmware + * See also F:find_uefi_firmware */ int guestfs_int_get_uefi (guestfs_h *g, char **code, char **vars, int *flags) diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 index 096631a80..985ec4371 100644 --- a/m4/guestfs-progs.m4 +++ b/m4/guestfs-progs.m4 @@ -113,13 +113,6 @@ if test "x$YACC" = "xyacc"; then AC_MSG_FAILURE([GNU 'bison' is required (yacc won't work).]) fi -dnl zip/unzip, used by virt-v2v -AC_PATH_PROGS([ZIP],[zip],[no]) -AC_DEFINE_UNQUOTED([ZIP],["$ZIP"],[Name of zip program.]) -AM_CONDITIONAL([HAVE_ZIP],[test "x$ZIP" != "xno"]) -AC_PATH_PROGS([UNZIP],[unzip],[no]) -AC_DEFINE_UNQUOTED([UNZIP],["$UNZIP"],[Name of unzip program.]) - dnl Check for valgrind AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind],[no]) AS_IF([test "x$VALGRIND" != "xno"],[ diff --git a/m4/guestfs-v2v.m4 b/m4/guestfs-v2v.m4 deleted file mode 100644 index b14c364e2..000000000 --- a/m4/guestfs-v2v.m4 +++ /dev/null @@ -1,28 +0,0 @@ -# libguestfs -# Copyright (C) 2009-2019 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -dnl Virt-v2v. - -dnl nbdkit python plugin. -AC_MSG_CHECKING([for the nbdkit python plugin name]) -AC_ARG_WITH([virt-v2v-nbdkit-python-plugin], - [AS_HELP_STRING([--with-virt-v2v-nbdkit-python-plugin="python|..."], - [set nbdkit python plugin name used by virt-v2v @<:@default=python@:>@])], - [VIRT_V2V_NBDKIT_PYTHON_PLUGIN="$withval"], - [VIRT_V2V_NBDKIT_PYTHON_PLUGIN=python]) -AC_MSG_RESULT([$VIRT_V2V_NBDKIT_PYTHON_PLUGIN]) -AC_SUBST([VIRT_V2V_NBDKIT_PYTHON_PLUGIN]) diff --git a/run.in b/run.in index 2c43cf87a..57229d010 100755 --- a/run.in +++ b/run.in @@ -104,7 +104,6 @@ prepend PATH "$b/sparsify" prepend PATH "$b/sysprep" prepend PATH "$b/test-tool" prepend PATH "$b/tools" -prepend PATH "$b/v2v" export PATH # Set LD_LIBRARY_PATH and DYLD_LIBRARY_PATH to contain library. diff --git a/test-data/Makefile.am b/test-data/Makefile.am index 30d95efab..0843891b5 100644 --- a/test-data/Makefile.am +++ b/test-data/Makefile.am @@ -22,7 +22,6 @@ SUBDIRS += blank-disks if ENABLE_APPLIANCE SUBDIRS += phony-guests endif -SUBDIRS += fake-virtio-win fake-virt-tools SUBDIRS += files SUBDIRS += . diff --git a/test-data/fake-virt-tools/Makefile.am b/test-data/fake-virt-tools/Makefile.am deleted file mode 100644 index cf2e842a2..000000000 --- a/test-data/fake-virt-tools/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# libguestfs test images -# Copyright (C) 2009-2019 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake virt-tools. -# -# Tests in the v2v subdirectory can set VIRT_TOOLS_DATA_DIR to point -# to this directory in order to test conversions. -# -# Note that the "binaries" are not real! - -include $(top_srcdir)/subdir-rules.mk - -EXTRA_DIST = \ - pnp_wait.exe \ - rhev-apt.exe \ - rhsrvany.exe \ - vmdp.exe diff --git a/test-data/fake-virt-tools/pnp_wait.exe b/test-data/fake-virt-tools/pnp_wait.exe deleted file mode 100644 index 827400630..000000000 --- a/test-data/fake-virt-tools/pnp_wait.exe +++ /dev/null @@ -1 +0,0 @@ -This is a fake pnp_wait.exe, used for testing only diff --git a/test-data/fake-virt-tools/rhev-apt.exe b/test-data/fake-virt-tools/rhev-apt.exe deleted file mode 100644 index 2f472e507..000000000 --- a/test-data/fake-virt-tools/rhev-apt.exe +++ /dev/null @@ -1 +0,0 @@ -This is a fake rhev-apt.exe, used for testing only diff --git a/test-data/fake-virt-tools/rhsrvany.exe b/test-data/fake-virt-tools/rhsrvany.exe deleted file mode 100644 index b47434934..000000000 --- a/test-data/fake-virt-tools/rhsrvany.exe +++ /dev/null @@ -1 +0,0 @@ -This is a fake rhsrvany.exe, used for testing only diff --git a/test-data/fake-virt-tools/vmdp.exe b/test-data/fake-virt-tools/vmdp.exe deleted file mode 100644 index 9ca881a20..000000000 --- a/test-data/fake-virt-tools/vmdp.exe +++ /dev/null @@ -1 +0,0 @@ -This is a fake vmdp.exe, used for testing only diff --git a/test-data/fake-virtio-win/Makefile.am b/test-data/fake-virtio-win/Makefile.am deleted file mode 100644 index f2543fb40..000000000 --- a/test-data/fake-virtio-win/Makefile.am +++ /dev/null @@ -1,601 +0,0 @@ -# libguestfs test images -# Copyright (C) 2009-2019 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake virtio-win (Windows virtio) drivers. -# -# Tests in the v2v subdirectory can set VIRTIO_WIN to point to this -# directory, or to the .iso file in this directory, in order to test -# conversions. -# -# Note that the "drivers" are not real! - -include $(top_srcdir)/subdir-rules.mk - -drivers = \ - drivers/amd64/Win2003/netkvm.cat \ - drivers/amd64/Win2003/netkvm.inf \ - drivers/amd64/Win2003/netkvm.sys \ - drivers/amd64/Win2003/viostor.cat \ - drivers/amd64/Win2003/viostor.inf \ - drivers/amd64/Win2003/viostor.sys \ - drivers/amd64/Win2008/netkvm.cat \ - drivers/amd64/Win2008/netkvm.inf \ - drivers/amd64/Win2008/netkvm.sys \ - drivers/amd64/Win2008R2/netkvm.cat \ - drivers/amd64/Win2008R2/netkvm.inf \ - drivers/amd64/Win2008R2/netkvm.sys \ - drivers/amd64/Win2008R2/qxl.cat \ - drivers/amd64/Win2008R2/qxldd.dll \ - drivers/amd64/Win2008R2/qxl.inf \ - drivers/amd64/Win2008R2/qxl.sys \ - drivers/amd64/Win2008R2/vioscsi.cat \ - drivers/amd64/Win2008R2/vioscsi.inf \ - drivers/amd64/Win2008R2/vioscsi.sys \ - drivers/amd64/Win2008R2/viostor.cat \ - drivers/amd64/Win2008R2/viostor.inf \ - drivers/amd64/Win2008R2/viostor.sys \ - drivers/amd64/Win2008/vioscsi.cat \ - drivers/amd64/Win2008/vioscsi.inf \ - drivers/amd64/Win2008/vioscsi.sys \ - drivers/amd64/Win2008/viostor.cat \ - drivers/amd64/Win2008/viostor.inf \ - drivers/amd64/Win2008/viostor.sys \ - drivers/amd64/Win2012/netkvm.cat \ - drivers/amd64/Win2012/netkvm.inf \ - drivers/amd64/Win2012/netkvm.sys \ - drivers/amd64/Win2012R2/netkvm.cat \ - drivers/amd64/Win2012R2/netkvm.inf \ - drivers/amd64/Win2012R2/netkvm.sys \ - drivers/amd64/Win2012R2/vioscsi.cat \ - drivers/amd64/Win2012R2/vioscsi.inf \ - drivers/amd64/Win2012R2/vioscsi.sys \ - drivers/amd64/Win2012R2/viostor.cat \ - drivers/amd64/Win2012R2/viostor.inf \ - drivers/amd64/Win2012R2/viostor.sys \ - drivers/amd64/Win2012/vioscsi.cat \ - drivers/amd64/Win2012/vioscsi.inf \ - drivers/amd64/Win2012/vioscsi.sys \ - drivers/amd64/Win2012/viostor.cat \ - drivers/amd64/Win2012/viostor.inf \ - drivers/amd64/Win2012/viostor.sys \ - drivers/amd64/Win7/netkvm.cat \ - drivers/amd64/Win7/netkvm.inf \ - drivers/amd64/Win7/netkvm.sys \ - drivers/amd64/Win7/qxl.cat \ - drivers/amd64/Win7/qxldd.dll \ - drivers/amd64/Win7/qxl.inf \ - drivers/amd64/Win7/qxl.sys \ - drivers/amd64/Win7/vioscsi.cat \ - drivers/amd64/Win7/vioscsi.inf \ - drivers/amd64/Win7/vioscsi.sys \ - drivers/amd64/Win7/viostor.cat \ - drivers/amd64/Win7/viostor.inf \ - drivers/amd64/Win7/viostor.sys \ - drivers/amd64/Win8.1/netkvm.cat \ - drivers/amd64/Win8.1/netkvm.inf \ - drivers/amd64/Win8.1/netkvm.sys \ - drivers/amd64/Win8.1/vioscsi.cat \ - drivers/amd64/Win8.1/vioscsi.inf \ - drivers/amd64/Win8.1/vioscsi.sys \ - drivers/amd64/Win8.1/viostor.cat \ - drivers/amd64/Win8.1/viostor.inf \ - drivers/amd64/Win8.1/viostor.sys \ - drivers/amd64/Win8/netkvm.cat \ - drivers/amd64/Win8/netkvm.inf \ - drivers/amd64/Win8/netkvm.sys \ - drivers/amd64/Win8/vioscsi.cat \ - drivers/amd64/Win8/vioscsi.inf \ - drivers/amd64/Win8/vioscsi.sys \ - drivers/amd64/Win8/viostor.cat \ - drivers/amd64/Win8/viostor.inf \ - drivers/amd64/Win8/viostor.sys \ - drivers/i386/Win2003/netkvm.cat \ - drivers/i386/Win2003/netkvm.inf \ - drivers/i386/Win2003/netkvm.sys \ - drivers/i386/Win2003/viostor.cat \ - drivers/i386/Win2003/viostor.inf \ - drivers/i386/Win2003/viostor.sys \ - drivers/i386/Win2008/netkvm.cat \ - drivers/i386/Win2008/netkvm.inf \ - drivers/i386/Win2008/netkvm.sys \ - drivers/i386/Win2008/vioscsi.cat \ - drivers/i386/Win2008/vioscsi.inf \ - drivers/i386/Win2008/vioscsi.sys \ - drivers/i386/Win2008/viostor.cat \ - drivers/i386/Win2008/viostor.inf \ - drivers/i386/Win2008/viostor.sys \ - drivers/i386/Win7/netkvm.cat \ - drivers/i386/Win7/netkvm.inf \ - drivers/i386/Win7/netkvm.sys \ - drivers/i386/Win7/qxl.cat \ - drivers/i386/Win7/qxldd.dll \ - drivers/i386/Win7/qxl.inf \ - drivers/i386/Win7/qxl.sys \ - drivers/i386/Win7/vioscsi.cat \ - drivers/i386/Win7/vioscsi.inf \ - drivers/i386/Win7/vioscsi.sys \ - drivers/i386/Win7/viostor.cat \ - drivers/i386/Win7/viostor.inf \ - drivers/i386/Win7/viostor.sys \ - drivers/i386/Win8.1/netkvm.cat \ - drivers/i386/Win8.1/netkvm.inf \ - drivers/i386/Win8.1/netkvm.sys \ - drivers/i386/Win8.1/vioscsi.cat \ - drivers/i386/Win8.1/vioscsi.inf \ - drivers/i386/Win8.1/vioscsi.sys \ - drivers/i386/Win8.1/viostor.cat \ - drivers/i386/Win8.1/viostor.inf \ - drivers/i386/Win8.1/viostor.sys \ - drivers/i386/Win8/netkvm.cat \ - drivers/i386/Win8/netkvm.inf \ - drivers/i386/Win8/netkvm.sys \ - drivers/i386/Win8/vioscsi.cat \ - drivers/i386/Win8/vioscsi.inf \ - drivers/i386/Win8/vioscsi.sys \ - drivers/i386/Win8/viostor.cat \ - drivers/i386/Win8/viostor.inf \ - drivers/i386/Win8/viostor.sys \ - drivers/i386/WinXP/netkvm.cat \ - drivers/i386/WinXP/netkvm.inf \ - drivers/i386/WinXP/netkvm.sys \ - drivers/i386/WinXP/qxl.cat \ - drivers/i386/WinXP/qxldd.dll \ - drivers/i386/WinXP/qxl.inf \ - drivers/i386/WinXP/qxl.sys \ - drivers/i386/WinXP/viostor.cat \ - drivers/i386/WinXP/viostor.inf \ - drivers/i386/WinXP/viostor.sys - -cd_files = \ - cd/Balloon/2k12/amd64/balloon.cat \ - cd/Balloon/2k12/amd64/balloon.inf \ - cd/Balloon/2k12/amd64/balloon.pdb \ - cd/Balloon/2k12/amd64/balloon.sys \ - cd/Balloon/2k12/amd64/blnsvr.exe \ - cd/Balloon/2k12/amd64/blnsvr.pdb \ - cd/Balloon/2k12/amd64/WdfCoInstaller01011.dll \ - cd/Balloon/2k12R2/amd64/balloon.cat \ - cd/Balloon/2k12R2/amd64/balloon.inf \ - cd/Balloon/2k12R2/amd64/balloon.pdb \ - cd/Balloon/2k12R2/amd64/balloon.sys \ - cd/Balloon/2k12R2/amd64/blnsvr.exe \ - cd/Balloon/2k12R2/amd64/blnsvr.pdb \ - cd/Balloon/2k12R2/amd64/WdfCoInstaller01011.dll \ - cd/Balloon/2k3/amd64/balloon.cat \ - cd/Balloon/2k3/amd64/balloon.inf \ - cd/Balloon/2k3/amd64/balloon.pdb \ - cd/Balloon/2k3/amd64/balloon.sys \ - cd/Balloon/2k3/amd64/blnsvr.exe \ - cd/Balloon/2k3/amd64/blnsvr.pdb \ - cd/Balloon/2k3/amd64/WdfCoInstaller01009.dll \ - cd/Balloon/2k3/x86/balloon.cat \ - cd/Balloon/2k3/x86/balloon.inf \ - cd/Balloon/2k3/x86/balloon.pdb \ - cd/Balloon/2k3/x86/balloon.sys \ - cd/Balloon/2k3/x86/blnsvr.exe \ - cd/Balloon/2k3/x86/blnsvr.pdb \ - cd/Balloon/2k3/x86/WdfCoInstaller01009.dll \ - cd/Balloon/2k8/amd64/balloon.cat \ - cd/Balloon/2k8/amd64/balloon.inf \ - cd/Balloon/2k8/amd64/balloon.pdb \ - cd/Balloon/2k8/amd64/balloon.sys \ - cd/Balloon/2k8/amd64/blnsvr.exe \ - cd/Balloon/2k8/amd64/blnsvr.pdb \ - cd/Balloon/2k8/amd64/WdfCoInstaller01009.dll \ - cd/Balloon/2k8R2/amd64/balloon.cat \ - cd/Balloon/2k8R2/amd64/balloon.inf \ - cd/Balloon/2k8R2/amd64/balloon.pdb \ - cd/Balloon/2k8R2/amd64/balloon.sys \ - cd/Balloon/2k8R2/amd64/blnsvr.exe \ - cd/Balloon/2k8R2/amd64/blnsvr.pdb \ - cd/Balloon/2k8R2/amd64/WdfCoInstaller01009.dll \ - cd/Balloon/2k8/x86/balloon.cat \ - cd/Balloon/2k8/x86/balloon.inf \ - cd/Balloon/2k8/x86/balloon.pdb \ - cd/Balloon/2k8/x86/balloon.sys \ - cd/Balloon/2k8/x86/blnsvr.exe \ - cd/Balloon/2k8/x86/blnsvr.pdb \ - cd/Balloon/2k8/x86/WdfCoInstaller01009.dll \ - cd/Balloon/w7/amd64/balloon.cat \ - cd/Balloon/w7/amd64/balloon.inf \ - cd/Balloon/w7/amd64/balloon.pdb \ - cd/Balloon/w7/amd64/balloon.sys \ - cd/Balloon/w7/amd64/blnsvr.exe \ - cd/Balloon/w7/amd64/blnsvr.pdb \ - cd/Balloon/w7/amd64/WdfCoInstaller01009.dll \ - cd/Balloon/w7/x86/balloon.cat \ - cd/Balloon/w7/x86/balloon.inf \ - cd/Balloon/w7/x86/balloon.pdb \ - cd/Balloon/w7/x86/balloon.sys \ - cd/Balloon/w7/x86/blnsvr.exe \ - cd/Balloon/w7/x86/blnsvr.pdb \ - cd/Balloon/w7/x86/WdfCoInstaller01009.dll \ - cd/Balloon/w8.1/amd64/balloon.cat \ - cd/Balloon/w8.1/amd64/balloon.inf \ - cd/Balloon/w8.1/amd64/balloon.pdb \ - cd/Balloon/w8.1/amd64/balloon.sys \ - cd/Balloon/w8.1/amd64/blnsvr.exe \ - cd/Balloon/w8.1/amd64/blnsvr.pdb \ - cd/Balloon/w8.1/amd64/WdfCoInstaller01011.dll \ - cd/Balloon/w8.1/x86/balloon.cat \ - cd/Balloon/w8.1/x86/balloon.inf \ - cd/Balloon/w8.1/x86/balloon.pdb \ - cd/Balloon/w8.1/x86/balloon.sys \ - cd/Balloon/w8.1/x86/blnsvr.exe \ - cd/Balloon/w8.1/x86/blnsvr.pdb \ - cd/Balloon/w8.1/x86/WdfCoInstaller01011.dll \ - cd/Balloon/w8/amd64/balloon.cat \ - cd/Balloon/w8/amd64/balloon.inf \ - cd/Balloon/w8/amd64/balloon.pdb \ - cd/Balloon/w8/amd64/balloon.sys \ - cd/Balloon/w8/amd64/blnsvr.exe \ - cd/Balloon/w8/amd64/blnsvr.pdb \ - cd/Balloon/w8/amd64/WdfCoInstaller01011.dll \ - cd/Balloon/w8/x86/balloon.cat \ - cd/Balloon/w8/x86/balloon.inf \ - cd/Balloon/w8/x86/balloon.pdb \ - cd/Balloon/w8/x86/balloon.sys \ - cd/Balloon/w8/x86/blnsvr.exe \ - cd/Balloon/w8/x86/blnsvr.pdb \ - cd/Balloon/w8/x86/WdfCoInstaller01011.dll \ - cd/Balloon/xp/x86/balloon.cat \ - cd/Balloon/xp/x86/balloon.inf \ - cd/Balloon/xp/x86/balloon.pdb \ - cd/Balloon/xp/x86/balloon.sys \ - cd/Balloon/xp/x86/blnsvr.exe \ - cd/Balloon/xp/x86/blnsvr.pdb \ - cd/Balloon/xp/x86/WdfCoInstaller01009.dll \ - cd/guest-agent/qemu-ga-x64.msi \ - cd/guest-agent/qemu-ga-x86.msi \ - cd/NetKVM/2k12/amd64/netkvm.cat \ - cd/NetKVM/2k12/amd64/netkvmco.dll \ - cd/NetKVM/2k12/amd64/netkvm.inf \ - cd/NetKVM/2k12/amd64/netkvm.pdb \ - cd/NetKVM/2k12/amd64/netkvm.sys \ - cd/NetKVM/2k12/amd64/readme.doc \ - cd/NetKVM/2k12R2/amd64/netkvm.cat \ - cd/NetKVM/2k12R2/amd64/netkvmco.dll \ - cd/NetKVM/2k12R2/amd64/netkvm.inf \ - cd/NetKVM/2k12R2/amd64/netkvm.pdb \ - cd/NetKVM/2k12R2/amd64/netkvm.sys \ - cd/NetKVM/2k12R2/amd64/readme.doc \ - cd/NetKVM/2k3/amd64/netkvm.cat \ - cd/NetKVM/2k3/amd64/netkvm.inf \ - cd/NetKVM/2k3/amd64/netkvm.pdb \ - cd/NetKVM/2k3/amd64/netkvm.sys \ - cd/NetKVM/2k3/x86/netkvm.cat \ - cd/NetKVM/2k3/x86/netkvm.inf \ - cd/NetKVM/2k3/x86/netkvm.pdb \ - cd/NetKVM/2k3/x86/netkvm.sys \ - cd/NetKVM/2k8/amd64/netkvm.cat \ - cd/NetKVM/2k8/amd64/netkvmco.dll \ - cd/NetKVM/2k8/amd64/netkvm.inf \ - cd/NetKVM/2k8/amd64/netkvm.pdb \ - cd/NetKVM/2k8/amd64/netkvm.sys \ - cd/NetKVM/2k8/amd64/readme.doc \ - cd/NetKVM/2k8R2/amd64/netkvm.cat \ - cd/NetKVM/2k8R2/amd64/netkvmco.dll \ - cd/NetKVM/2k8R2/amd64/netkvm.inf \ - cd/NetKVM/2k8R2/amd64/netkvm.pdb \ - cd/NetKVM/2k8R2/amd64/netkvm.sys \ - cd/NetKVM/2k8R2/amd64/readme.doc \ - cd/NetKVM/2k8/x86/netkvm.cat \ - cd/NetKVM/2k8/x86/netkvmco.dll \ - cd/NetKVM/2k8/x86/netkvm.inf \ - cd/NetKVM/2k8/x86/netkvm.pdb \ - cd/NetKVM/2k8/x86/netkvm.sys \ - cd/NetKVM/2k8/x86/readme.doc \ - cd/NetKVM/w7/amd64/netkvm.cat \ - cd/NetKVM/w7/amd64/netkvmco.dll \ - cd/NetKVM/w7/amd64/netkvm.inf \ - cd/NetKVM/w7/amd64/netkvm.pdb \ - cd/NetKVM/w7/amd64/netkvm.sys \ - cd/NetKVM/w7/amd64/readme.doc \ - cd/NetKVM/w7/x86/netkvm.cat \ - cd/NetKVM/w7/x86/netkvmco.dll \ - cd/NetKVM/w7/x86/netkvm.inf \ - cd/NetKVM/w7/x86/netkvm.pdb \ - cd/NetKVM/w7/x86/netkvm.sys \ - cd/NetKVM/w7/x86/readme.doc \ - cd/NetKVM/w8.1/amd64/netkvm.cat \ - cd/NetKVM/w8.1/amd64/netkvmco.dll \ - cd/NetKVM/w8.1/amd64/netkvm.inf \ - cd/NetKVM/w8.1/amd64/netkvm.pdb \ - cd/NetKVM/w8.1/amd64/netkvm.sys \ - cd/NetKVM/w8.1/amd64/readme.doc \ - cd/NetKVM/w8.1/x86/netkvm.cat \ - cd/NetKVM/w8.1/x86/netkvmco.dll \ - cd/NetKVM/w8.1/x86/netkvm.inf \ - cd/NetKVM/w8.1/x86/netkvm.pdb \ - cd/NetKVM/w8.1/x86/netkvm.sys \ - cd/NetKVM/w8.1/x86/readme.doc \ - cd/NetKVM/w8/amd64/netkvm.cat \ - cd/NetKVM/w8/amd64/netkvmco.dll \ - cd/NetKVM/w8/amd64/netkvm.inf \ - cd/NetKVM/w8/amd64/netkvm.pdb \ - cd/NetKVM/w8/amd64/netkvm.sys \ - cd/NetKVM/w8/amd64/readme.doc \ - cd/NetKVM/w8/x86/netkvm.cat \ - cd/NetKVM/w8/x86/netkvmco.dll \ - cd/NetKVM/w8/x86/netkvm.inf \ - cd/NetKVM/w8/x86/netkvm.pdb \ - cd/NetKVM/w8/x86/netkvm.sys \ - cd/NetKVM/w8/x86/readme.doc \ - cd/NetKVM/xp/x86/netkvm.cat \ - cd/NetKVM/xp/x86/netkvm.inf \ - cd/NetKVM/xp/x86/netkvm.pdb \ - cd/NetKVM/xp/x86/netkvm.sys \ - cd/qemupciserial/qemupciserial.inf \ - cd/viorng/2k12/amd64/viorng.cat \ - cd/viorng/2k12/amd64/viorngci.dll \ - cd/viorng/2k12/amd64/viorng.inf \ - cd/viorng/2k12/amd64/viorng.pdb \ - cd/viorng/2k12/amd64/viorng.sys \ - cd/viorng/2k12/amd64/viorngum.dll \ - cd/viorng/2k12/amd64/WdfCoInstaller01011.dll \ - cd/viorng/2k12R2/amd64/viorng.cat \ - cd/viorng/2k12R2/amd64/viorngci.dll \ - cd/viorng/2k12R2/amd64/viorng.inf \ - cd/viorng/2k12R2/amd64/viorng.pdb \ - cd/viorng/2k12R2/amd64/viorng.sys \ - cd/viorng/2k12R2/amd64/viorngum.dll \ - cd/viorng/2k12R2/amd64/WdfCoInstaller01011.dll \ - cd/viorng/2k8/amd64/viorng.cat \ - cd/viorng/2k8/amd64/viorngci.dll \ - cd/viorng/2k8/amd64/viorng.inf \ - cd/viorng/2k8/amd64/viorng.pdb \ - cd/viorng/2k8/amd64/viorng.sys \ - cd/viorng/2k8/amd64/viorngum.dll \ - cd/viorng/2k8/amd64/WdfCoInstaller01009.dll \ - cd/viorng/2k8R2/amd64/viorng.cat \ - cd/viorng/2k8R2/amd64/viorngci.dll \ - cd/viorng/2k8R2/amd64/viorng.inf \ - cd/viorng/2k8R2/amd64/viorng.pdb \ - cd/viorng/2k8R2/amd64/viorng.sys \ - cd/viorng/2k8R2/amd64/viorngum.dll \ - cd/viorng/2k8R2/amd64/WdfCoInstaller01009.dll \ - cd/viorng/2k8/x86/viorng.cat \ - cd/viorng/2k8/x86/viorngci.dll \ - cd/viorng/2k8/x86/viorng.inf \ - cd/viorng/2k8/x86/viorng.pdb \ - cd/viorng/2k8/x86/viorng.sys \ - cd/viorng/2k8/x86/viorngum.dll \ - cd/viorng/2k8/x86/WdfCoInstaller01009.dll \ - cd/viorng/w7/amd64/viorng.cat \ - cd/viorng/w7/amd64/viorngci.dll \ - cd/viorng/w7/amd64/viorng.inf \ - cd/viorng/w7/amd64/viorng.pdb \ - cd/viorng/w7/amd64/viorng.sys \ - cd/viorng/w7/amd64/viorngum.dll \ - cd/viorng/w7/amd64/WdfCoInstaller01009.dll \ - cd/viorng/w7/x86/viorng.cat \ - cd/viorng/w7/x86/viorngci.dll \ - cd/viorng/w7/x86/viorng.inf \ - cd/viorng/w7/x86/viorng.pdb \ - cd/viorng/w7/x86/viorng.sys \ - cd/viorng/w7/x86/viorngum.dll \ - cd/viorng/w7/x86/WdfCoInstaller01009.dll \ - cd/viorng/w8.1/amd64/viorng.cat \ - cd/viorng/w8.1/amd64/viorngci.dll \ - cd/viorng/w8.1/amd64/viorng.inf \ - cd/viorng/w8.1/amd64/viorng.pdb \ - cd/viorng/w8.1/amd64/viorng.sys \ - cd/viorng/w8.1/amd64/viorngum.dll \ - cd/viorng/w8.1/amd64/WdfCoInstaller01011.dll \ - cd/viorng/w8.1/x86/viorng.cat \ - cd/viorng/w8.1/x86/viorngci.dll \ - cd/viorng/w8.1/x86/viorng.inf \ - cd/viorng/w8.1/x86/viorng.pdb \ - cd/viorng/w8.1/x86/viorng.sys \ - cd/viorng/w8.1/x86/viorngum.dll \ - cd/viorng/w8.1/x86/WdfCoInstaller01011.dll \ - cd/viorng/w8/amd64/viorng.cat \ - cd/viorng/w8/amd64/viorngci.dll \ - cd/viorng/w8/amd64/viorng.inf \ - cd/viorng/w8/amd64/viorng.pdb \ - cd/viorng/w8/amd64/viorng.sys \ - cd/viorng/w8/amd64/viorngum.dll \ - cd/viorng/w8/amd64/WdfCoInstaller01011.dll \ - cd/viorng/w8/x86/viorng.cat \ - cd/viorng/w8/x86/viorngci.dll \ - cd/viorng/w8/x86/viorng.inf \ - cd/viorng/w8/x86/viorng.pdb \ - cd/viorng/w8/x86/viorng.sys \ - cd/viorng/w8/x86/viorngum.dll \ - cd/viorng/w8/x86/WdfCoInstaller01011.dll \ - cd/vioscsi/2k12/amd64/vioscsi.cat \ - cd/vioscsi/2k12/amd64/vioscsi.inf \ - cd/vioscsi/2k12/amd64/vioscsi.pdb \ - cd/vioscsi/2k12/amd64/vioscsi.sys \ - cd/vioscsi/2k12R2/amd64/vioscsi.cat \ - cd/vioscsi/2k12R2/amd64/vioscsi.inf \ - cd/vioscsi/2k12R2/amd64/vioscsi.pdb \ - cd/vioscsi/2k12R2/amd64/vioscsi.sys \ - cd/vioscsi/2k8/amd64/vioscsi.cat \ - cd/vioscsi/2k8/amd64/vioscsi.inf \ - cd/vioscsi/2k8/amd64/vioscsi.pdb \ - cd/vioscsi/2k8/amd64/vioscsi.sys \ - cd/vioscsi/2k8R2/amd64/vioscsi.cat \ - cd/vioscsi/2k8R2/amd64/vioscsi.inf \ - cd/vioscsi/2k8R2/amd64/vioscsi.pdb \ - cd/vioscsi/2k8R2/amd64/vioscsi.sys \ - cd/vioscsi/2k8/x86/vioscsi.cat \ - cd/vioscsi/2k8/x86/vioscsi.inf \ - cd/vioscsi/2k8/x86/vioscsi.pdb \ - cd/vioscsi/2k8/x86/vioscsi.sys \ - cd/vioscsi/w7/amd64/vioscsi.cat \ - cd/vioscsi/w7/amd64/vioscsi.inf \ - cd/vioscsi/w7/amd64/vioscsi.pdb \ - cd/vioscsi/w7/amd64/vioscsi.sys \ - cd/vioscsi/w7/x86/vioscsi.cat \ - cd/vioscsi/w7/x86/vioscsi.inf \ - cd/vioscsi/w7/x86/vioscsi.pdb \ - cd/vioscsi/w7/x86/vioscsi.sys \ - cd/vioscsi/w8.1/amd64/vioscsi.cat \ - cd/vioscsi/w8.1/amd64/vioscsi.inf \ - cd/vioscsi/w8.1/amd64/vioscsi.pdb \ - cd/vioscsi/w8.1/amd64/vioscsi.sys \ - cd/vioscsi/w8.1/x86/vioscsi.cat \ - cd/vioscsi/w8.1/x86/vioscsi.inf \ - cd/vioscsi/w8.1/x86/vioscsi.pdb \ - cd/vioscsi/w8.1/x86/vioscsi.sys \ - cd/vioscsi/w8/amd64/vioscsi.cat \ - cd/vioscsi/w8/amd64/vioscsi.inf \ - cd/vioscsi/w8/amd64/vioscsi.pdb \ - cd/vioscsi/w8/amd64/vioscsi.sys \ - cd/vioscsi/w8/x86/vioscsi.cat \ - cd/vioscsi/w8/x86/vioscsi.inf \ - cd/vioscsi/w8/x86/vioscsi.pdb \ - cd/vioscsi/w8/x86/vioscsi.sys \ - cd/vioserial/2k12/amd64/vioser.cat \ - cd/vioserial/2k12/amd64/vioser.inf \ - cd/vioserial/2k12/amd64/vioser.pdb \ - cd/vioserial/2k12/amd64/vioser.sys \ - cd/vioserial/2k12/amd64/WdfCoInstaller01011.dll \ - cd/vioserial/2k12R2/amd64/vioser.cat \ - cd/vioserial/2k12R2/amd64/vioser.inf \ - cd/vioserial/2k12R2/amd64/vioser.pdb \ - cd/vioserial/2k12R2/amd64/vioser.sys \ - cd/vioserial/2k12R2/amd64/WdfCoInstaller01011.dll \ - cd/vioserial/2k3/amd64/vioser.cat \ - cd/vioserial/2k3/amd64/vioser.inf \ - cd/vioserial/2k3/amd64/vioser.pdb \ - cd/vioserial/2k3/amd64/vioser.sys \ - cd/vioserial/2k3/amd64/WdfCoInstaller01009.dll \ - cd/vioserial/2k3/x86/vioser.cat \ - cd/vioserial/2k3/x86/vioser.inf \ - cd/vioserial/2k3/x86/vioser.pdb \ - cd/vioserial/2k3/x86/vioser.sys \ - cd/vioserial/2k3/x86/WdfCoInstaller01009.dll \ - cd/vioserial/2k8/amd64/vioser.cat \ - cd/vioserial/2k8/amd64/vioser.inf \ - cd/vioserial/2k8/amd64/vioser.pdb \ - cd/vioserial/2k8/amd64/vioser.sys \ - cd/vioserial/2k8/amd64/WdfCoInstaller01009.dll \ - cd/vioserial/2k8R2/amd64/vioser.cat \ - cd/vioserial/2k8R2/amd64/vioser.inf \ - cd/vioserial/2k8R2/amd64/vioser.pdb \ - cd/vioserial/2k8R2/amd64/vioser.sys \ - cd/vioserial/2k8R2/amd64/WdfCoInstaller01009.dll \ - cd/vioserial/2k8/x86/vioser.cat \ - cd/vioserial/2k8/x86/vioser.inf \ - cd/vioserial/2k8/x86/vioser.pdb \ - cd/vioserial/2k8/x86/vioser.sys \ - cd/vioserial/2k8/x86/WdfCoInstaller01009.dll \ - cd/vioserial/w7/amd64/vioser.cat \ - cd/vioserial/w7/amd64/vioser.inf \ - cd/vioserial/w7/amd64/vioser.pdb \ - cd/vioserial/w7/amd64/vioser.sys \ - cd/vioserial/w7/amd64/WdfCoInstaller01009.dll \ - cd/vioserial/w7/x86/vioser.cat \ - cd/vioserial/w7/x86/vioser.inf \ - cd/vioserial/w7/x86/vioser.pdb \ - cd/vioserial/w7/x86/vioser.sys \ - cd/vioserial/w7/x86/WdfCoInstaller01009.dll \ - cd/vioserial/w8.1/amd64/vioser.cat \ - cd/vioserial/w8.1/amd64/vioser.inf \ - cd/vioserial/w8.1/amd64/vioser.pdb \ - cd/vioserial/w8.1/amd64/vioser.sys \ - cd/vioserial/w8.1/amd64/WdfCoInstaller01011.dll \ - cd/vioserial/w8.1/x86/vioser.cat \ - cd/vioserial/w8.1/x86/vioser.inf \ - cd/vioserial/w8.1/x86/vioser.pdb \ - cd/vioserial/w8.1/x86/vioser.sys \ - cd/vioserial/w8.1/x86/WdfCoInstaller01011.dll \ - cd/vioserial/w8/amd64/vioser.cat \ - cd/vioserial/w8/amd64/vioser.inf \ - cd/vioserial/w8/amd64/vioser.pdb \ - cd/vioserial/w8/amd64/vioser.sys \ - cd/vioserial/w8/amd64/WdfCoInstaller01011.dll \ - cd/vioserial/w8/x86/vioser.cat \ - cd/vioserial/w8/x86/vioser.inf \ - cd/vioserial/w8/x86/vioser.pdb \ - cd/vioserial/w8/x86/vioser.sys \ - cd/vioserial/w8/x86/WdfCoInstaller01011.dll \ - cd/vioserial/xp/x86/vioser.cat \ - cd/vioserial/xp/x86/vioser.inf \ - cd/vioserial/xp/x86/vioser.pdb \ - cd/vioserial/xp/x86/vioser.sys \ - cd/vioserial/xp/x86/WdfCoInstaller01009.dll \ - cd/viostor/2k12/amd64/viostor.cat \ - cd/viostor/2k12/amd64/viostor.inf \ - cd/viostor/2k12/amd64/viostor.pdb \ - cd/viostor/2k12/amd64/viostor.sys \ - cd/viostor/2k12R2/amd64/viostor.cat \ - cd/viostor/2k12R2/amd64/viostor.inf \ - cd/viostor/2k12R2/amd64/viostor.pdb \ - cd/viostor/2k12R2/amd64/viostor.sys \ - cd/viostor/2k3/amd64/viostor.cat \ - cd/viostor/2k3/amd64/viostor.inf \ - cd/viostor/2k3/amd64/viostor.pdb \ - cd/viostor/2k3/amd64/viostor.sys \ - cd/viostor/2k3/x86/viostor.cat \ - cd/viostor/2k3/x86/viostor.inf \ - cd/viostor/2k3/x86/viostor.pdb \ - cd/viostor/2k3/x86/viostor.sys \ - cd/viostor/2k8/amd64/viostor.cat \ - cd/viostor/2k8/amd64/viostor.inf \ - cd/viostor/2k8/amd64/viostor.pdb \ - cd/viostor/2k8/amd64/viostor.sys \ - cd/viostor/2k8R2/amd64/viostor.cat \ - cd/viostor/2k8R2/amd64/viostor.inf \ - cd/viostor/2k8R2/amd64/viostor.pdb \ - cd/viostor/2k8R2/amd64/viostor.sys \ - cd/viostor/2k8/x86/viostor.cat \ - cd/viostor/2k8/x86/viostor.inf \ - cd/viostor/2k8/x86/viostor.pdb \ - cd/viostor/2k8/x86/viostor.sys \ - cd/viostor/w7/amd64/viostor.cat \ - cd/viostor/w7/amd64/viostor.inf \ - cd/viostor/w7/amd64/viostor.pdb \ - cd/viostor/w7/amd64/viostor.sys \ - cd/viostor/w7/x86/viostor.cat \ - cd/viostor/w7/x86/viostor.inf \ - cd/viostor/w7/x86/viostor.pdb \ - cd/viostor/w7/x86/viostor.sys \ - cd/viostor/w8.1/amd64/viostor.cat \ - cd/viostor/w8.1/amd64/viostor.inf \ - cd/viostor/w8.1/amd64/viostor.pdb \ - cd/viostor/w8.1/amd64/viostor.sys \ - cd/viostor/w8.1/x86/viostor.cat \ - cd/viostor/w8.1/x86/viostor.inf \ - cd/viostor/w8.1/x86/viostor.pdb \ - cd/viostor/w8.1/x86/viostor.sys \ - cd/viostor/w8/amd64/viostor.cat \ - cd/viostor/w8/amd64/viostor.inf \ - cd/viostor/w8/amd64/viostor.pdb \ - cd/viostor/w8/amd64/viostor.sys \ - cd/viostor/w8/x86/viostor.cat \ - cd/viostor/w8/x86/viostor.inf \ - cd/viostor/w8/x86/viostor.pdb \ - cd/viostor/w8/x86/viostor.sys \ - cd/viostor/xp/x86/viostor.cat \ - cd/viostor/xp/x86/viostor.inf \ - cd/viostor/xp/x86/viostor.pdb \ - cd/viostor/xp/x86/viostor.sys \ - cd/virtio-win-1.7.4_amd64.vfd \ - cd/virtio-win-1.7.4_x86.vfd \ - cd/virtio-win_license.txt - -EXTRA_DIST = $(drivers) $(cd_files) - -check_DATA = fake-virtio-win.iso - -CLEANFILES += fake-virtio-win.iso - -fake-virtio-win.iso: $(cd_files) - $(GENISOIMAGE) -J -r -o $@ cd diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k12R2/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.inf deleted file mode 100644 index 9367f77e8..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=09/16/2013,52.65.104.7000 diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/2k3/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.inf deleted file mode 100644 index c2e29ac60..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=09/16/2013,51.65.104.7000 diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/2k3/x86/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/2k3/x86/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k3/x86/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.inf deleted file mode 100644 index 96bc822f6..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,52.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/2k8/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.inf deleted file mode 100644 index f359495e8..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,51.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/2k8/x86/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/2k8/x86/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8/x86/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.inf deleted file mode 100644 index 96bc822f6..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,52.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/2k8R2/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/w7/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.inf deleted file mode 100644 index 96bc822f6..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,52.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/w7/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/w7/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/w7/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.inf deleted file mode 100644 index f359495e8..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,51.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/x86/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/x86/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/w7/x86/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/x86/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w7/x86/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/w7/x86/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w7/x86/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8.1/x86/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/Balloon/w8/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/w8/amd64/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/w8/amd64/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/amd64/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/x86/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/Balloon/w8/x86/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/x86/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/x86/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/x86/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/w8/x86/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/x86/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/w8/x86/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/w8/x86/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/w8/x86/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/xp/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/Balloon/xp/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/xp/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.cat b/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.inf b/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.inf deleted file mode 100644 index c2e29ac60..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=09/16/2013,51.65.104.7000 diff --git a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.pdb b/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.sys b/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/xp/x86/balloon.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/xp/x86/blnsvr.exe b/test-data/fake-virtio-win/cd/Balloon/xp/x86/blnsvr.exe deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/xp/x86/blnsvr.exe +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/Balloon/xp/x86/blnsvr.pdb b/test-data/fake-virtio-win/cd/Balloon/xp/x86/blnsvr.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/Balloon/xp/x86/blnsvr.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12/amd64/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k12R2/amd64/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.inf deleted file mode 100644 index cbe255d78..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=11/29/2012,52.64.104.4900 diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.inf deleted file mode 100644 index 3ec43dcb2..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=11/29/2012,51.64.104.4900 diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k3/x86/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.inf deleted file mode 100644 index 85bc1842b..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=09/26/2013,60.65.104.7200 diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/amd64/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.inf deleted file mode 100644 index 85bc1842b..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=09/26/2013,60.65.104.7200 diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8/x86/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.inf deleted file mode 100644 index 1218fd10e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,61.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/2k8R2/amd64/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.inf deleted file mode 100644 index 1218fd10e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,61.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/amd64/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.inf deleted file mode 100644 index 1218fd10e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,61.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/w7/x86/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w7/x86/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/amd64/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8.1/x86/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/amd64/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvmco.dll b/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvmco.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/netkvmco.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/readme.doc b/test-data/fake-virtio-win/cd/NetKVM/w8/x86/readme.doc deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/w8/x86/readme.doc +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.cat b/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.inf b/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.inf deleted file mode 100644 index 3ec43dcb2..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=11/29/2012,51.64.104.4900 diff --git a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.pdb b/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.sys b/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/NetKVM/xp/x86/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/guest-agent/qemu-ga-x64.msi b/test-data/fake-virtio-win/cd/guest-agent/qemu-ga-x64.msi deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/guest-agent/qemu-ga-x64.msi +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/guest-agent/qemu-ga-x86.msi b/test-data/fake-virtio-win/cd/guest-agent/qemu-ga-x86.msi deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/guest-agent/qemu-ga-x86.msi +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/qemupciserial/qemupciserial.inf b/test-data/fake-virtio-win/cd/qemupciserial/qemupciserial.inf deleted file mode 100644 index 4f65616a5..000000000 --- a/test-data/fake-virtio-win/cd/qemupciserial/qemupciserial.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=09/24/2012,1.3.0 diff --git a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/viorng/2k12/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.cat b/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.inf b/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.sys b/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12/amd64/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.cat b/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.inf b/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.sys b/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k12R2/amd64/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/viorng/2k8/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.cat b/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.inf b/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.inf deleted file mode 100644 index 19338107b..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,60.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.sys b/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/amd64/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/viorng/2k8/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.cat b/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.inf b/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.inf deleted file mode 100644 index 19338107b..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,60.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.sys b/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8/x86/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.cat b/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.inf b/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.inf deleted file mode 100644 index b1066f6a1..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,61.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.sys b/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/2k8R2/amd64/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/viorng/w7/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.cat b/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.inf b/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.inf deleted file mode 100644 index b1066f6a1..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,61.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.sys b/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/amd64/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/viorng/w7/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.cat b/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.inf b/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.inf deleted file mode 100644 index b1066f6a1..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,61.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.sys b/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/w7/x86/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/w7/x86/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w7/x86/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.cat b/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.inf b/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.sys b/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/amd64/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/viorng/w8.1/x86/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.cat b/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.inf b/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.sys b/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8.1/x86/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/viorng/w8/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.cat b/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.inf b/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.sys b/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/amd64/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/x86/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/viorng/w8/x86/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/x86/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.cat b/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.inf b/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.inf deleted file mode 100644 index 7f5039087..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=12/04/2014,62.71.104.9600 diff --git a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.pdb b/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.sys b/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorng.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorngci.dll b/test-data/fake-virtio-win/cd/viorng/w8/x86/viorngci.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorngci.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorngum.dll b/test-data/fake-virtio-win/cd/viorng/w8/x86/viorngum.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viorng/w8/x86/viorngum.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12/amd64/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k12R2/amd64/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/amd64/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8/x86/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/2k8R2/amd64/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/amd64/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w7/x86/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/amd64/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8.1/x86/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/amd64/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.cat b/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.inf b/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.pdb b/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.sys b/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioscsi/w8/x86/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.inf deleted file mode 100644 index 94856f735..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,62.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.inf deleted file mode 100644 index 94856f735..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,62.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k12R2/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.inf deleted file mode 100644 index c70ca59fc..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,52.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/2k3/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.inf deleted file mode 100644 index d7fd66647..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,51.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k3/x86/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.inf deleted file mode 100644 index c70ca59fc..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,52.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/2k8/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.inf deleted file mode 100644 index d7fd66647..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,51.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8/x86/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.inf deleted file mode 100644 index c70ca59fc..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,52.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/2k8R2/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/w7/amd64/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.inf deleted file mode 100644 index c70ca59fc..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,52.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/w7/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.inf deleted file mode 100644 index d7fd66647..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,51.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w7/x86/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.inf deleted file mode 100644 index 94856f735..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,62.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.inf deleted file mode 100644 index 94856f735..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,62.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8.1/x86/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/vioserial/w8/amd64/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.inf deleted file mode 100644 index 94856f735..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,62.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/amd64/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/x86/WdfCoInstaller01011.dll b/test-data/fake-virtio-win/cd/vioserial/w8/x86/WdfCoInstaller01011.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/x86/WdfCoInstaller01011.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.inf deleted file mode 100644 index 94856f735..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,62.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/w8/x86/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/xp/x86/WdfCoInstaller01009.dll b/test-data/fake-virtio-win/cd/vioserial/xp/x86/WdfCoInstaller01009.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/xp/x86/WdfCoInstaller01009.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.cat b/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.inf b/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.inf deleted file mode 100644 index d7fd66647..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/19/2014,51.71.104.9400 diff --git a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.pdb b/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.sys b/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/vioserial/xp/x86/vioser.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k12R2/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.inf deleted file mode 100644 index e363d331c..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/27/2012,52.64.104.4800 diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.cat b/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.inf b/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.inf deleted file mode 100644 index e363d331c..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/27/2012,52.64.104.4800 diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.sys b/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k3/x86/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.cat b/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.inf b/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.sys b/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8/x86/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/2k8R2/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.cat b/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.inf b/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.sys b/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w7/x86/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.cat b/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.inf b/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.sys b/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8.1/x86/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.cat b/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.inf b/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.sys b/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/amd64/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.cat b/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.inf b/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.sys b/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/w8/x86/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.cat b/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.inf b/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.inf deleted file mode 100644 index 34a351871..000000000 --- a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/27/2012,51.64.104.4800 diff --git a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.pdb b/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.pdb deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.pdb +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.sys b/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/viostor/xp/x86/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/virtio-win-1.7.4_amd64.vfd b/test-data/fake-virtio-win/cd/virtio-win-1.7.4_amd64.vfd deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/virtio-win-1.7.4_amd64.vfd +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/virtio-win-1.7.4_x86.vfd b/test-data/fake-virtio-win/cd/virtio-win-1.7.4_x86.vfd deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/virtio-win-1.7.4_x86.vfd +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/cd/virtio-win_license.txt b/test-data/fake-virtio-win/cd/virtio-win_license.txt deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/cd/virtio-win_license.txt +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.inf deleted file mode 100644 index cbe255d78..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=11/29/2012,52.64.104.4900 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2003/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.inf deleted file mode 100644 index e363d331c..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/27/2012,52.64.104.4800 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2003/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.inf deleted file mode 100644 index 85bc1842b..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=09/26/2013,60.65.104.7200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.inf deleted file mode 100644 index 1218fd10e..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,61.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.inf deleted file mode 100644 index 67e3fab0f..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer = 10/29/2013,6.1.0.10020 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxldd.dll b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxldd.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxldd.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.cat b/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.inf b/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.sys b/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.cat b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.inf b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.sys b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win2012R2/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.inf deleted file mode 100644 index 1218fd10e..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,61.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.cat b/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.inf b/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.inf deleted file mode 100644 index 3310167e3..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer = 07/17/2013,6.1.0.10018 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.sys b/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxldd.dll b/test-data/fake-virtio-win/drivers/amd64/Win7/qxldd.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxldd.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.cat b/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.inf b/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.sys b/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win7/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.cat b/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.inf b/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.sys b/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8.1/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.cat b/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.inf b/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.sys b/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.cat b/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.inf b/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.sys b/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.cat b/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.inf b/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.sys b/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/amd64/Win8/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.cat b/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.inf b/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.inf deleted file mode 100644 index 3ec43dcb2..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=11/29/2012,51.64.104.4900 diff --git a/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.sys b/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2003/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.cat b/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.inf b/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.inf deleted file mode 100644 index e363d331c..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/27/2012,52.64.104.4800 diff --git a/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.sys b/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2003/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.cat b/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.inf b/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.inf deleted file mode 100644 index 85bc1842b..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=09/26/2013,60.65.104.7200 diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.sys b/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.cat b/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.inf b/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.sys b/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.cat b/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.inf b/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.sys b/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win2008/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.cat b/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.inf b/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.inf deleted file mode 100644 index 1218fd10e..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,61.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.sys b/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.cat b/test-data/fake-virtio-win/drivers/i386/Win7/qxl.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.inf b/test-data/fake-virtio-win/drivers/i386/Win7/qxl.inf deleted file mode 100644 index 3310167e3..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer = 07/17/2013,6.1.0.10018 diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.sys b/test-data/fake-virtio-win/drivers/i386/Win7/qxl.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxldd.dll b/test-data/fake-virtio-win/drivers/i386/Win7/qxldd.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/qxldd.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.cat b/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.inf b/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.inf deleted file mode 100644 index 98e60b7d5..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,60.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.sys b/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/viostor.cat b/test-data/fake-virtio-win/drivers/i386/Win7/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/viostor.inf b/test-data/fake-virtio-win/drivers/i386/Win7/viostor.inf deleted file mode 100644 index 6f0c10504..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,60.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/viostor.sys b/test-data/fake-virtio-win/drivers/i386/Win7/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win7/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.cat b/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.inf b/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.sys b/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.cat b/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.inf b/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.sys b/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.cat b/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.inf b/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.sys b/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8.1/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.cat b/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.inf b/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.inf deleted file mode 100644 index 571dbd46e..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=12/19/2014,62.70.104.9800 diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.sys b/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.cat b/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.inf b/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.inf deleted file mode 100644 index 61c81c528..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=03/10/2015,62.72.104.10200 diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.sys b/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/vioscsi.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/viostor.cat b/test-data/fake-virtio-win/drivers/i386/Win8/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/viostor.inf b/test-data/fake-virtio-win/drivers/i386/Win8/viostor.inf deleted file mode 100644 index 2138dcc26..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=06/04/2014,62.71.104.8600 diff --git a/test-data/fake-virtio-win/drivers/i386/Win8/viostor.sys b/test-data/fake-virtio-win/drivers/i386/Win8/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/Win8/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.cat b/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.inf b/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.inf deleted file mode 100644 index 3ec43dcb2..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.inf +++ /dev/null @@ -1,2 +0,0 @@ -[version] -DriverVer=11/29/2012,51.64.104.4900 diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.sys b/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/netkvm.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.cat b/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.inf b/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.inf deleted file mode 100644 index d1fe96b24..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer = 07/17/2013,5.1.0.10018 diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.sys b/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxldd.dll b/test-data/fake-virtio-win/drivers/i386/WinXP/qxldd.dll deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxldd.dll +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.cat b/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.cat deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.cat +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.inf b/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.inf deleted file mode 100644 index 34a351871..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.inf +++ /dev/null @@ -1,2 +0,0 @@ -[Version] -DriverVer=11/27/2012,51.64.104.4800 diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.sys b/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.sys deleted file mode 100644 index acbc96201..000000000 --- a/test-data/fake-virtio-win/drivers/i386/WinXP/viostor.sys +++ /dev/null @@ -1 +0,0 @@ -fake diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am index 89ee230ba..14b19ae65 100644 --- a/tests/regressions/Makefile.am +++ b/tests/regressions/Makefile.am @@ -45,8 +45,6 @@ EXTRA_DIST = \ rhbz1091803.sh \ rhbz1174551.sh \ rhbz1175196.sh \ - rhbz1232192.sh \ - rhbz1232192.xml \ rhbz1285847.sh \ rhbz1370424.sh \ rhbz1370424.xml \ @@ -78,7 +76,6 @@ TESTS = \ rhbz1011907-1165785.sh \ rhbz1174551.sh \ rhbz1175196.sh \ - rhbz1232192.sh \ rhbz1285847.sh \ rhbz1370424.sh \ rhbz1477623.sh \ diff --git a/tests/regressions/rhbz1232192.sh b/tests/regressions/rhbz1232192.sh deleted file mode 100755 index 2d4b342bc..000000000 --- a/tests/regressions/rhbz1232192.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# libguestfs -# Copyright (C) 2015 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Regression test for virt-v2v handling of blank disks: -# https://bugzilla.redhat.com/show_bug.cgi?id=1232192 - -set -e - -$TEST_FUNCTIONS -skip_if_skipped -skip_unless virt-v2v --help -skip_if_backend uml -skip_unless_phony_guest windows.img -skip_unless_phony_guest blank-disk.img - -export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools" - -virt-v2v -i libvirtxml rhbz1232192.xml -o null --no-copy diff --git a/tests/regressions/rhbz1232192.xml b/tests/regressions/rhbz1232192.xml deleted file mode 100644 index 099530de9..000000000 --- a/tests/regressions/rhbz1232192.xml +++ /dev/null @@ -1,26 +0,0 @@ - - rhbz1232192 - 1048576 - 2 - - hvm - - - - - - - - - - - - - - - - - - - - diff --git a/v2v/DOM.ml b/v2v/DOM.ml deleted file mode 100644 index 41fa4a357..000000000 --- a/v2v/DOM.ml +++ /dev/null @@ -1,171 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Poor man's XML DOM, mutable for ease of modification. *) - -open Std_utils -open Tools_utils - -open Printf - -type node = - | PCData of string - | Comment of string - | Element of element -and element = { - e_name : string; (* Name of element. *) - mutable e_attrs : attr list; (* Attributes. *) - mutable e_children : node list; (* Child elements. *) -} -and attr = string * string -and doc = Doc of element - -let doc name attrs children = - Doc { e_name = name; e_attrs = attrs; e_children = children } - -let e name attrs children = - Element { e_name = name; e_attrs = attrs; e_children = children } - -(* This outputs nicely formatted and indented XML, ie. with lots of - * whitespace. As far as I know this is safe for the kind of documents - * we will be writing, ie. libvirt XML and OVF metadata, where - * whitespace is generally not significant, but readability is useful. - *) -let rec node_to_buf ?(indent = 0) buf = function - | PCData str -> - Buffer.add_string buf (xml_quote_pcdata str) - | Comment str -> - buffer_add_spaces buf indent; - bprintf buf "" (xml_quote_pcdata str) - | Element e -> - element_to_buf ~indent buf e -and element_to_buf ?(indent = 0) buf - { e_name = name; e_attrs = attrs; e_children = children } = - buffer_add_spaces buf indent; - bprintf buf "<%s" name; - List.iter (fun (n, v) -> bprintf buf " %s='%s'" n (xml_quote_attr v)) attrs; - if children <> [] then ( - Buffer.add_string buf ">"; - let last_child_was_element = ref false in - List.iter ( - function - | Element _ as child -> - last_child_was_element := true; - Buffer.add_char buf '\n'; - node_to_buf ~indent:(indent+2) buf child; - | PCData _ as child -> - last_child_was_element := false; - node_to_buf ~indent:(indent+2) buf child; - | Comment _ as child -> - last_child_was_element := true; - Buffer.add_char buf '\n'; - node_to_buf ~indent:(indent+2) buf child; - ) children; - if !last_child_was_element then ( - Buffer.add_char buf '\n'; - buffer_add_spaces buf indent - ); - bprintf buf "" name - ) else ( - Buffer.add_string buf "/>" - ) - -and buffer_add_spaces buf n = - Buffer.add_string buf (String.spaces n) - -(* Quote XML content. Note you must use single - * quotes around the attribute. - *) -and xml_quote_attr str = - let str = String.replace str "&" "&" in - let str = String.replace str "'" "'" in - let str = String.replace str "<" "<" in - let str = String.replace str ">" ">" in - str - -and xml_quote_pcdata str = - let str = String.replace str "&" "&" in - let str = String.replace str "<" "<" in - let str = String.replace str ">" ">" in - str - -let doc_to_buf buf (Doc doc) = - bprintf buf "\n"; - element_to_buf buf doc; - bprintf buf "\n" - -let doc_to_string doc = - let buf = Buffer.create 4096 in - doc_to_buf buf doc; - Buffer.contents buf - -let doc_to_chan chan doc = - let buf = Buffer.create 4096 in - doc_to_buf buf doc; - Buffer.output_buffer chan buf - -let path_to_nodes (Doc doc) path = - match path with - | [] -> invalid_arg "path_to_nodes: empty path" - | top_name :: path -> - if doc.e_name <> top_name then [] - else ( - let rec loop nodes path = - match path with - | [] -> [] - | [p] -> - List.filter ( - function - | PCData _ -> false - | Comment _ -> false - | Element e when e.e_name = p -> true - | Element _ -> false - ) nodes - | p :: ps -> - let children = - List.filter_map ( - function - | PCData _ -> None - | Comment _ -> None - | Element e when e.e_name = p -> Some e.e_children - | Element _ -> None - ) nodes in - List.concat (List.map (fun nodes -> loop nodes ps) children) - in - loop doc.e_children path - ) - -let filter_node_list_by_attr nodes attr = - List.filter ( - function - | Element { e_attrs = attrs } when List.mem attr attrs -> true - | Element _ | PCData _ | Comment _ -> false - ) nodes - -let find_node_by_attr nodes attr = - match filter_node_list_by_attr nodes attr with - | [] -> raise Not_found - | x::_ -> x - -let append_attr attr = function - | PCData _ | Comment _ -> invalid_arg "append_attr" - | Element e -> e.e_attrs <- e.e_attrs @ [attr] - -let append_child child = function - | PCData _ | Comment _ -> invalid_arg "append_child" - | Element e -> e.e_children <- e.e_children @ [child] diff --git a/v2v/DOM.mli b/v2v/DOM.mli deleted file mode 100644 index c1f0602dc..000000000 --- a/v2v/DOM.mli +++ /dev/null @@ -1,92 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Poor man's XML DOM, mutable for ease of modification. *) - -type element -type doc = Doc of element -type attr = string * string - -type node = - | PCData of string (** Text. *) - | Comment of string (** *) - | Element of element (** with attrs and children *) - -val doc : string -> attr list -> node list -> doc -(** A quick way to create a document. *) - -val e : string -> attr list -> node list -> node -(** A quick way to create elements. - - Typical use is: -{v - e "foo" [] [ - e "bar" [] [] - e "baz" [ "a", "b"; "c", "d"] [] - ] -v} - which creates the following OCaml tree structure: -{v - Element { - e_name = "foo"; - e_attrs = []; - e_children = [ - Element { e_name = "bar"; ... }; - Element { e_name = "baz"; e_attrs = [ "a", "b"; "c", "d" ]; ... }; - ] - } -v} - which corresponds to the following XML: -{v - - - - -v} -*) - -val doc_to_string : doc -> string -(** Convert a document to a string representation. *) - -val doc_to_chan : out_channel -> doc -> unit -(** Write the XML document to an output channel. *) - -val path_to_nodes : doc -> string list -> node list -(** Search down the path and return a list of all matching elements. - Returns an empty list if none were found. *) - -val filter_node_list_by_attr : node list -> attr -> node list -(** Find DOM elements which have a particular attribute name=value (not - recursively). If not found, returns an empty list. *) - -val find_node_by_attr : node list -> attr -> node -(** Find the first DOM element which has a particular attribute - name=value (not recursively). If not found, raises - [Not_found]. *) - -val append_attr : attr -> node -> unit -(** [element] must be an [Element _] node. [append_attr attr element] - appends [attr] to the attributes of [element]. - - This mutates [element]. *) - -val append_child : node -> node -> unit -(** [element] must be an [Element _] node. [append_child child - element] appends [child] to the children of [element]. - - This mutates [element]. *) diff --git a/v2v/Makefile.am b/v2v/Makefile.am deleted file mode 100644 index ed145e644..000000000 --- a/v2v/Makefile.am +++ /dev/null @@ -1,765 +0,0 @@ -# libguestfs virt-v2v tool -# Copyright (C) 2009-2019 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -include $(top_srcdir)/subdir-rules.mk - -BUILT_SOURCES = \ - config.ml \ - output_rhv_upload_createvm_source.ml \ - output_rhv_upload_deletedisks_source.ml \ - output_rhv_upload_plugin_source.ml \ - output_rhv_upload_precheck_source.ml \ - output_rhv_upload_vmcheck_source.ml \ - uefi.ml \ - uefi.mli - -EXTRA_DIST = \ - $(SOURCES_MLI) $(SOURCES_ML) $(SOURCES_C) \ - copy_to_local.ml \ - copy_to_local.mli \ - embed.sh \ - rhv-upload-createvm.py \ - rhv-upload-deletedisks.py \ - rhv-upload-plugin.py \ - rhv-upload-precheck.py \ - rhv-upload-vmcheck.py \ - var_expander_tests.ml \ - v2v_unit_tests.ml \ - virt-v2v.pod \ - virt-v2v-copy-to-local.pod \ - virt-v2v-input-vmware.pod \ - virt-v2v-input-xen.pod \ - virt-v2v-output-local.pod \ - virt-v2v-output-openstack.pod \ - virt-v2v-output-rhv.pod \ - virt-v2v-support.pod - -SOURCES_MLI = \ - changeuid.mli \ - cmdline.mli \ - config.mli \ - convert_linux.mli \ - convert_windows.mli \ - create_json.mli \ - create_libvirt_xml.mli \ - create_ovf.mli \ - DOM.mli \ - input_disk.mli \ - input_libvirt.mli \ - input_libvirt_other.mli \ - input_libvirt_vcenter_https.mli \ - input_libvirt_vddk.mli \ - input_libvirt_xen_ssh.mli \ - input_libvirtxml.mli \ - input_ova.mli \ - input_vmx.mli \ - inspect_source.mli \ - libvirt_utils.mli \ - linux.mli \ - linux_bootloaders.mli \ - linux_kernels.mli \ - measure_disk.mli \ - modules_list.mli \ - name_from_disk.mli \ - nbdkit.mli \ - networks.mli \ - openstack_image_properties.mli \ - output_glance.mli \ - output_json.mli \ - output_libvirt.mli \ - output_local.mli \ - output_null.mli \ - output_openstack.mli \ - output_qemu.mli \ - output_rhv.mli \ - output_rhv_upload.mli \ - output_rhv_upload_createvm_source.mli \ - output_rhv_upload_deletedisks_source.mli \ - output_rhv_upload_plugin_source.mli \ - output_rhv_upload_precheck_source.mli \ - output_rhv_upload_vmcheck_source.mli \ - output_vdsm.mli \ - parse_ova.mli \ - parse_ovf_from_ova.mli \ - parse_libvirt_xml.mli \ - parse_vmx.mli \ - python_script.mli \ - qemuopts.mli \ - target_bus_assignment.mli \ - types.mli \ - uefi.mli \ - utils.mli \ - v2v.mli \ - vCenter.mli \ - var_expander.mli \ - windows.mli \ - windows_virtio.mli - -SOURCES_ML = \ - config.ml \ - types.ml \ - uefi.ml \ - utils.ml \ - var_expander.ml \ - python_script.ml \ - name_from_disk.ml \ - nbdkit.ml \ - vCenter.ml \ - libvirt_utils.ml \ - DOM.ml \ - changeuid.ml \ - parse_ovf_from_ova.ml \ - parse_ova.ml \ - create_ovf.ml \ - create_json.ml \ - linux.ml \ - windows.ml \ - windows_virtio.ml \ - modules_list.ml \ - input_disk.ml \ - parse_vmx.ml \ - parse_libvirt_xml.ml \ - create_libvirt_xml.ml \ - openstack_image_properties.ml \ - qemuopts.ml \ - input_libvirtxml.ml \ - input_libvirt_other.ml \ - input_libvirt_vcenter_https.ml \ - input_libvirt_vddk.ml \ - input_libvirt_xen_ssh.ml \ - input_libvirt.ml \ - input_ova.ml \ - input_vmx.ml \ - linux_bootloaders.ml \ - linux_kernels.ml \ - convert_linux.ml \ - convert_windows.ml \ - output_null.ml \ - output_glance.ml \ - output_json.ml \ - output_libvirt.ml \ - output_local.ml \ - output_qemu.ml \ - output_rhv.ml \ - output_rhv_upload_createvm_source.ml \ - output_rhv_upload_deletedisks_source.ml \ - output_rhv_upload_plugin_source.ml \ - output_rhv_upload_precheck_source.ml \ - output_rhv_upload_vmcheck_source.ml \ - output_rhv_upload.ml \ - output_vdsm.ml \ - output_openstack.ml \ - inspect_source.ml \ - target_bus_assignment.ml \ - measure_disk.ml \ - networks.ml \ - cmdline.ml \ - v2v.ml - -SOURCES_C = \ - qemuopts-c.c - -# These files are generated and contain *.py embedded as an OCaml string. -output_rhv_upload_createvm_source.ml: $(srcdir)/rhv-upload-createvm.py - $(srcdir)/embed.sh code $^ $@ -output_rhv_upload_deletedisks_source.ml: $(srcdir)/rhv-upload-deletedisks.py - $(srcdir)/embed.sh code $^ $@ -output_rhv_upload_plugin_source.ml: $(srcdir)/rhv-upload-plugin.py - $(srcdir)/embed.sh code $^ $@ -output_rhv_upload_precheck_source.ml: $(srcdir)/rhv-upload-precheck.py - $(srcdir)/embed.sh code $^ $@ -output_rhv_upload_vmcheck_source.ml: $(srcdir)/rhv-upload-vmcheck.py - $(srcdir)/embed.sh code $^ $@ - -# These are created by the generator in common/mlv2v and -# need to be copied here. -uefi.mli: $(top_srcdir)/common/mlv2v/uefi.mli - rm -f $@ - cp $< $@ -uefi.ml: $(top_srcdir)/common/mlv2v/uefi.ml - rm -f $@ - cp $< $@ - -if HAVE_OCAML - -bin_PROGRAMS = virt-v2v virt-v2v-copy-to-local - -virt_v2v_SOURCES = $(SOURCES_C) -virt_v2v_CPPFLAGS = \ - -DCAML_NAME_SPACE \ - -I. \ - -I$(top_builddir) \ - -I$(shell $(OCAMLC) -where) \ - -I$(top_srcdir)/common/qemuopts \ - -I$(top_srcdir)/lib -virt_v2v_CFLAGS = \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) \ - $(LIBVIRT_CFLAGS) - -BOBJECTS = \ - $(top_builddir)/common/mlcustomize/firstboot.cmo \ - $(top_builddir)/common/mlcustomize/SELinux_relabel.cmo \ - $(SOURCES_ML:.ml=.cmo) -XOBJECTS = $(BOBJECTS:.cmo=.cmx) - -# -I $(top_builddir)/lib/.libs is a hack which forces corresponding -L -# option to be passed to gcc, so we don't try linking against an -# installed copy of libguestfs. -OCAMLPACKAGES = \ - -package str,unix \ - -I $(top_builddir)/common/utils/.libs \ - -I $(top_builddir)/common/qemuopts/.libs \ - -I $(top_builddir)/lib/.libs \ - -I $(top_builddir)/gnulib/lib/.libs \ - -I $(top_builddir)/ocaml \ - -I $(top_builddir)/common/mlstdutils \ - -I $(top_builddir)/common/mlutils \ - -I $(top_builddir)/common/mlgettext \ - -I $(top_builddir)/common/mlpcre \ - -I $(top_builddir)/common/mlxml \ - -I $(top_builddir)/common/mltools \ - -I $(top_builddir)/common/mllibvirt \ - -I $(top_builddir)/common/mlcustomize -if HAVE_OCAML_PKG_GETTEXT -OCAMLPACKAGES += -package gettext-stub -endif - -OCAMLCLIBS = \ - -lqemuopts \ - $(LIBVIRT_LIBS) \ - $(LIBXML2_LIBS) \ - $(JANSSON_LIBS) \ - $(LIBINTL) \ - -lgnu - -OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' - -if !HAVE_OCAMLOPT -OBJECTS = $(BOBJECTS) -else -OBJECTS = $(XOBJECTS) -endif - -OCAMLLINKFLAGS = \ - mlstdutils.$(MLARCHIVE) \ - mlguestfs.$(MLARCHIVE) \ - mlgettext.$(MLARCHIVE) \ - mlpcre.$(MLARCHIVE) \ - mlxml.$(MLARCHIVE) \ - mlcutils.$(MLARCHIVE) \ - mltools.$(MLARCHIVE) \ - mllibvirt.$(MLARCHIVE) \ - mlcustomize.$(MLARCHIVE) \ - $(LINK_CUSTOM_OCAMLC_ONLY) - -virt_v2v_DEPENDENCIES = $(OBJECTS) $(top_srcdir)/ocaml-link.sh -virt_v2v_LINK = \ - $(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ - $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \ - $(OBJECTS) -o $@ - -virt_v2v_copy_to_local_SOURCES = \ - dummy.c -virt_v2v_copy_to_local_CPPFLAGS = \ - -DCAML_NAME_SPACE \ - -I. \ - -I$(top_builddir) \ - -I$(shell $(OCAMLC) -where) \ - -I$(top_srcdir)/lib -virt_v2v_copy_to_local_CFLAGS = \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) \ - $(LIBVIRT_CFLAGS) - -COPY_TO_LOCAL_BOBJECTS = \ - types.cmo \ - uefi.cmo \ - utils.cmo \ - libvirt_utils.cmo \ - nbdkit.cmo \ - vCenter.cmo \ - copy_to_local.cmo -COPY_TO_LOCAL_XOBJECTS = $(COPY_TO_LOCAL_BOBJECTS:.cmo=.cmx) - -if !HAVE_OCAMLOPT -COPY_TO_LOCAL_OBJECTS = $(COPY_TO_LOCAL_BOBJECTS) -else -COPY_TO_LOCAL_OBJECTS = $(COPY_TO_LOCAL_XOBJECTS) -endif - -virt_v2v_copy_to_local_DEPENDENCIES = \ - $(COPY_TO_LOCAL_OBJECTS) \ - ../common/mlstdutils/mlstdutils.$(MLARCHIVE) \ - ../common/mlxml/mlxml.$(MLARCHIVE) \ - ../common/mlgettext/mlgettext.$(MLARCHIVE) \ - ../common/mlpcre/mlpcre.$(MLARCHIVE) \ - ../common/mlutils/mlcutils.$(MLARCHIVE) \ - ../common/mltools/mltools.$(MLARCHIVE) \ - ../common/mllibvirt/mllibvirt.$(MLARCHIVE) \ - ../common/mlcustomize/mlcustomize.$(MLARCHIVE) \ - $(top_srcdir)/ocaml-link.sh -virt_v2v_copy_to_local_LINK = \ - $(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ - $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \ - $(COPY_TO_LOCAL_OBJECTS) -o $@ - -# Data directory. - -virttoolsdatadir = $(datadir)/virt-tools - -# Manual pages and HTML files for the website. - -man_MANS = \ - virt-v2v.1 \ - virt-v2v-copy-to-local.1 \ - virt-v2v-input-vmware.1 \ - virt-v2v-input-xen.1 \ - virt-v2v-output-local.1 \ - virt-v2v-output-openstack.1 \ - virt-v2v-output-rhv.1 \ - virt-v2v-support.1 - -noinst_DATA = \ - $(top_builddir)/website/virt-v2v.1.html \ - $(top_builddir)/website/virt-v2v-copy-to-local.1.html \ - $(top_builddir)/website/virt-v2v-input-vmware.1.html \ - $(top_builddir)/website/virt-v2v-input-xen.1.html \ - $(top_builddir)/website/virt-v2v-output-local.1.html \ - $(top_builddir)/website/virt-v2v-output-openstack.1.html \ - $(top_builddir)/website/virt-v2v-output-rhv.1.html \ - $(top_builddir)/website/virt-v2v-support.1.html - -virt-v2v.1 $(top_builddir)/website/virt-v2v.1.html: stamp-virt-v2v.pod - -stamp-virt-v2v.pod: virt-v2v.pod - $(PODWRAPPER) \ - --man virt-v2v.1 \ - --html $(top_builddir)/website/virt-v2v.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -virt-v2v-copy-to-local.1 $(top_builddir)/website/virt-v2v-copy-to-local.1.html: stamp-virt-v2v-copy-to-local.pod - -stamp-virt-v2v-copy-to-local.pod: virt-v2v-copy-to-local.pod - $(PODWRAPPER) \ - --man virt-v2v-copy-to-local.1 \ - --html $(top_builddir)/website/virt-v2v-copy-to-local.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -virt-v2v-input-vmware.1 $(top_builddir)/website/virt-v2v-input-vmware.1.html: stamp-virt-v2v-input-vmware.pod - -stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod - $(PODWRAPPER) \ - --man virt-v2v-input-vmware.1 \ - --html $(top_builddir)/website/virt-v2v-input-vmware.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -virt-v2v-input-xen.1 $(top_builddir)/website/virt-v2v-input-xen.1.html: stamp-virt-v2v-input-xen.pod - -stamp-virt-v2v-input-xen.pod: virt-v2v-input-xen.pod - $(PODWRAPPER) \ - --man virt-v2v-input-xen.1 \ - --html $(top_builddir)/website/virt-v2v-input-xen.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -virt-v2v-output-local.1 $(top_builddir)/website/virt-v2v-output-local.1.html: stamp-virt-v2v-output-local.pod - -stamp-virt-v2v-output-local.pod: virt-v2v-output-local.pod - $(PODWRAPPER) \ - --man virt-v2v-output-local.1 \ - --html $(top_builddir)/website/virt-v2v-output-local.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -virt-v2v-output-openstack.1 $(top_builddir)/website/virt-v2v-output-openstack.1.html: stamp-virt-v2v-output-openstack.pod - -stamp-virt-v2v-output-openstack.pod: virt-v2v-output-openstack.pod - $(PODWRAPPER) \ - --man virt-v2v-output-openstack.1 \ - --html $(top_builddir)/website/virt-v2v-output-openstack.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -virt-v2v-output-rhv.1 $(top_builddir)/website/virt-v2v-output-rhv.1.html: stamp-virt-v2v-output-rhv.pod - -stamp-virt-v2v-output-rhv.pod: virt-v2v-output-rhv.pod - $(PODWRAPPER) \ - --man virt-v2v-output-rhv.1 \ - --html $(top_builddir)/website/virt-v2v-output-rhv.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -virt-v2v-support.1 $(top_builddir)/website/virt-v2v-support.1.html: stamp-virt-v2v-support.pod - -stamp-virt-v2v-support.pod: virt-v2v-support.pod - $(PODWRAPPER) \ - --man virt-v2v-support.1 \ - --html $(top_builddir)/website/virt-v2v-support.1.html \ - --license GPLv2+ \ - --warning safe \ - $< - touch $@ - -# Tests. - -# The virt-v2v tests here are not meant to be thorough tests of guest -# conversion. There is a test suite used to test conversion which is -# kept outside libguestfs because it contains lots of proprietary -# unredistributable guests like Windows. -# -# The tests here instead are testing: -# -# - virt-v2v command line arguments -# - virt-v2v reads and writes files to the correct places -# - valgrind & memory leaks -# - any conversion properties that can be tested using just the -# phony guests (but we don't go out of our way here) -# - that up to date guests don't crash virt-v2v - -TESTS_ENVIRONMENT = $(top_builddir)/run --test - -TESTS = \ - test-v2v-copy-to-local.sh \ - test-v2v-docs.sh \ - test-v2v-python-syntax.sh \ - test-v2v-i-ova-bad-sha1.sh \ - test-v2v-i-ova-bad-sha256.sh \ - test-v2v-i-ova-formats.sh \ - test-v2v-i-ova-good-checksums.sh \ - test-v2v-i-ova-gz.sh \ - test-v2v-i-ova-invalid-manifest1.sh \ - test-v2v-i-ova-invalid-manifest2.sh \ - test-v2v-i-ova-snapshots.sh \ - test-v2v-i-ova-subfolders.sh \ - test-v2v-i-ova-tar.sh \ - test-v2v-i-ova-two-disks.sh \ - test-v2v-i-vmx.sh \ - test-v2v-it-vddk-io-query.sh \ - test-v2v-o-rhv-upload-oo-query.sh \ - test-v2v-o-vdsm-oo-query.sh \ - test-v2v-bad-networks-and-bridges.sh - -if HAVE_OCAML_PKG_OUNIT -TESTS += v2v_unit_tests var_expander_tests -endif - -if ENABLE_APPLIANCE -TESTS += \ - test-v2v-cdrom.sh \ - test-v2v-floppy.sh \ - test-v2v-i-disk.sh \ - test-v2v-i-ova.sh \ - test-v2v-in-place.sh \ - test-v2v-mac.sh \ - test-v2v-machine-readable.sh \ - test-v2v-networks-and-bridges.sh \ - test-v2v-no-copy.sh \ - test-v2v-o-glance.sh \ - test-v2v-o-json.sh \ - test-v2v-o-libvirt.sh \ - test-v2v-o-null.sh \ - test-v2v-o-openstack.sh \ - test-v2v-o-qemu.sh \ - test-v2v-o-rhv.sh \ - test-v2v-o-rhv-upload.sh \ - test-v2v-o-vdsm-options.sh \ - test-v2v-oa-option.sh \ - test-v2v-of-option.sh \ - test-v2v-on-option.sh \ - test-v2v-print-estimate.sh \ - test-v2v-print-source.sh \ - test-v2v-sound.sh \ - test-v2v-virtio-win-iso.sh \ - test-v2v-windows-conversion.sh \ - $(SLOW_TESTS) \ - $(ROOT_TESTS) -endif ENABLE_APPLIANCE - -# The VMDK file is used for some -i ova tests. -check_DATA = windows.vmdk -if ENABLE_APPLIANCE -windows.vmdk: ../test-data/phony-guests/windows.img - rm -f $@ $@-t - if [ -s $< ]; then \ - qemu-img convert -f raw $< -O vmdk $@-t; \ - mv $@-t $@; \ - else \ - touch $@; \ - fi -else -windows.vmdk: - touch $@ -endif - -DISTCLEANFILES += \ - windows.vmdk - -check-valgrind: - $(MAKE) VG="@VG@" check - -SLOW_TESTS = \ - $(real_guests_scripts) \ - test-v2v-trim.sh - -check-slow: - $(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1 - -ROOT_TESTS = \ - test-v2v-i-ova-as-root.sh - -check-root: - $(MAKE) check TESTS="$(ROOT_TESTS)" - -# A selection of real guests that test-v2v-conversion-of.sh will -# try to convert. This is only used by 'make check-slow'. - -real_guests_scripts = \ - test-v2v-conversion-of-centos-6.sh \ - test-v2v-conversion-of-centos-7.0.sh \ - test-v2v-conversion-of-debian-6.sh \ - test-v2v-conversion-of-debian-7.sh \ - test-v2v-conversion-of-debian-8.sh \ - test-v2v-conversion-of-debian-9.sh \ - test-v2v-conversion-of-fedora-20.sh \ - test-v2v-conversion-of-fedora-23.sh \ - test-v2v-conversion-of-fedora-29.sh \ - test-v2v-conversion-of-opensuse-13.1.sh \ - test-v2v-conversion-of-opensuse-13.2.sh \ - test-v2v-conversion-of-opensuse-42.1.sh \ - test-v2v-conversion-of-rhel-5.10.sh \ - test-v2v-conversion-of-rhel-6.8.sh \ - test-v2v-conversion-of-rhel-7.0.sh \ - test-v2v-conversion-of-rhel-7.2.sh \ - test-v2v-conversion-of-ubuntu-10.04.sh \ - test-v2v-conversion-of-ubuntu-12.04.sh \ - test-v2v-conversion-of-ubuntu-14.04.sh \ - test-v2v-conversion-of-ubuntu-16.04.sh \ - test-v2v-conversion-of-ubuntu-18.04.sh \ - test-v2v-conversion-of-windows-6.2-server.sh \ - test-v2v-conversion-of-windows-6.3-server.sh \ - test-v2v-conversion-of-windows-10.0-server.sh - -test-v2v-conversion-of-%.sh: - rm -f $@ $@-t - f=`echo "$@" | $(SED) 's/test-v2v-conversion-of-\(.*\).sh/\1/'`; \ - echo 'script=$@ exec $$srcdir/test-v2v-conversion-of.sh' "$$f" > $@-t - chmod 0755 $@-t - mv $@-t $@ - -CLEANFILES += \ - $(real_guests_scripts) \ - real-*.img \ - real-*.xml - -EXTRA_DIST += \ - test-v2v-bad-networks-and-bridges.sh \ - test-v2v-cdrom.expected \ - test-v2v-cdrom.sh \ - test-v2v-cdrom.xml \ - test-v2v-copy-to-local.sh \ - test-v2v-docs.sh \ - test-v2v-floppy.expected \ - test-v2v-floppy.sh \ - test-v2v-floppy.xml \ - test-v2v-i-disk.sh \ - test-v2v-i-ova-as-root.ovf \ - test-v2v-i-ova-as-root.sh \ - test-v2v-i-ova-bad-sha1.sh \ - test-v2v-i-ova-bad-sha256.sh \ - test-v2v-i-ova-checksums.ovf \ - test-v2v-i-ova-formats.expected \ - test-v2v-i-ova-formats.ovf \ - test-v2v-i-ova-formats.sh \ - test-v2v-i-ova-good-checksums.sh \ - test-v2v-i-ova-gz.expected \ - test-v2v-i-ova-gz.ovf \ - test-v2v-i-ova-gz.sh \ - test-v2v-i-ova-invalid-manifest1.sh \ - test-v2v-i-ova-invalid-manifest2.sh \ - test-v2v-i-ova-snapshots.expected \ - test-v2v-i-ova-snapshots.expected2 \ - test-v2v-i-ova-snapshots.ovf \ - test-v2v-i-ova-snapshots.sh \ - test-v2v-i-ova-subfolders.expected \ - test-v2v-i-ova-subfolders.expected2 \ - test-v2v-i-ova-subfolders.ovf \ - test-v2v-i-ova-subfolders.sh \ - test-v2v-i-ova-tar.expected \ - test-v2v-i-ova-tar.expected2 \ - test-v2v-i-ova-tar.ovf \ - test-v2v-i-ova-tar.sh \ - test-v2v-i-ova-two-disks.expected \ - test-v2v-i-ova-two-disks.expected2 \ - test-v2v-i-ova-two-disks.ovf \ - test-v2v-i-ova-two-disks.sh \ - test-v2v-i-ova.ovf \ - test-v2v-i-ova.sh \ - test-v2v-i-ova.xml \ - test-v2v-i-vmx.sh \ - test-v2v-i-vmx-1.expected \ - test-v2v-i-vmx-2.expected \ - test-v2v-i-vmx-3.expected \ - test-v2v-i-vmx-4.expected \ - test-v2v-i-vmx-5.expected \ - test-v2v-i-vmx-1.vmx \ - test-v2v-i-vmx-2.vmx \ - test-v2v-i-vmx-3.vmx \ - test-v2v-i-vmx-4.vmx \ - test-v2v-i-vmx-5.vmx \ - test-v2v-in-place.sh \ - test-v2v-it-vddk-io-query.sh \ - test-v2v-machine-readable.sh \ - test-v2v-mac-expected.xml \ - test-v2v-mac.sh \ - test-v2v-mac.xml \ - test-v2v-networks-and-bridges-expected.xml \ - test-v2v-networks-and-bridges.sh \ - test-v2v-networks-and-bridges.xml \ - test-v2v-no-copy.sh \ - test-v2v-o-glance.sh \ - test-v2v-o-json.sh \ - test-v2v-o-libvirt.sh \ - test-v2v-o-null.sh \ - test-v2v-o-openstack.sh \ - test-v2v-o-qemu.sh \ - test-v2v-o-rhv.ovf.expected \ - test-v2v-o-rhv.sh \ - test-v2v-o-rhv-upload.sh \ - test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py \ - test-v2v-o-rhv-upload-module/ovirtsdk4/types.py \ - test-v2v-o-rhv-upload-oo-query.sh \ - test-v2v-o-vdsm-oo-query.sh \ - test-v2v-o-vdsm-options.ovf.expected \ - test-v2v-o-vdsm-options.sh \ - test-v2v-oa-option.sh \ - test-v2v-of-option.sh \ - test-v2v-on-option.sh \ - test-v2v-print-estimate.sh \ - test-v2v-print-source.expected \ - test-v2v-print-source.sh \ - test-v2v-print-source.xml \ - test-v2v-python-syntax.sh \ - test-v2v-conversion-of.sh \ - test-v2v-sound.sh \ - test-v2v-sound.xml \ - test-v2v-trim.sh \ - test-v2v-virtio-win-iso.sh \ - test-v2v-windows-conversion.sh - -# Unit tests. -check_PROGRAMS = -if HAVE_OCAML_PKG_OUNIT -check_PROGRAMS += v2v_unit_tests var_expander_tests -endif - -v2v_unit_tests_BOBJECTS = \ - types.cmo \ - uefi.cmo \ - utils.cmo \ - DOM.cmo \ - create_ovf.cmo \ - windows.cmo \ - linux.cmo \ - windows_virtio.cmo \ - parse_vmx.cmo \ - v2v_unit_tests.cmo -v2v_unit_tests_XOBJECTS = $(v2v_unit_tests_BOBJECTS:.cmo=.cmx) - -v2v_unit_tests_SOURCES = $(virt_v2v_SOURCES) -v2v_unit_tests_CPPFLAGS = $(virt_v2v_CPPFLAGS) -v2v_unit_tests_CFLAGS = $(virt_v2v_CFLAGS) - -var_expander_tests_BOBJECTS = \ - var_expander.cmo \ - var_expander_tests.cmo -var_expander_tests_XOBJECTS = $(var_expander_tests_BOBJECTS:.cmo=.cmx) - -var_expander_tests_SOURCES = dummy.c -var_expander_tests_CPPFLAGS = $(virt_v2v_CPPFLAGS) -var_expander_tests_CFLAGS = $(virt_v2v_CFLAGS) - -if !HAVE_OCAMLOPT -# Can't call this v2v_unit_tests_OBJECTS because automake gets confused. -v2v_unit_tests_THEOBJECTS = $(v2v_unit_tests_BOBJECTS) -v2v_unit_tests.cmo: OCAMLPACKAGES += -package oUnit - -var_expander_tests_THEOBJECTS = $(var_expander_tests_BOBJECTS) -var_expander_tests.cmo: OCAMLPACKAGES += -package oUnit -else -v2v_unit_tests_THEOBJECTS = $(v2v_unit_tests_XOBJECTS) -v2v_unit_tests.cmx: OCAMLPACKAGES += -package oUnit - -var_expander_tests_THEOBJECTS = $(var_expander_tests_XOBJECTS) -var_expander_tests.cmx: OCAMLPACKAGES += -package oUnit -endif - -v2v_unit_tests_DEPENDENCIES = \ - $(v2v_unit_tests_THEOBJECTS) \ - ../common/mlstdutils/mlstdutils.$(MLARCHIVE) \ - ../common/mlxml/mlxml.$(MLARCHIVE) \ - ../common/mlgettext/mlgettext.$(MLARCHIVE) \ - ../common/mlpcre/mlpcre.$(MLARCHIVE) \ - ../common/mlutils/mlcutils.$(MLARCHIVE) \ - ../common/mltools/mltools.$(MLARCHIVE) \ - ../common/mlcustomize/mlcustomize.$(MLARCHIVE) \ - $(top_srcdir)/ocaml-link.sh -v2v_unit_tests_LINK = \ - $(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ - $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) \ - $(OCAMLPACKAGES) -package oUnit \ - $(OCAMLLINKFLAGS) \ - $(v2v_unit_tests_THEOBJECTS) -o $@ - -var_expander_tests_DEPENDENCIES = \ - $(var_expander_tests_THEOBJECTS) \ - ../common/mlpcre/mlpcre.$(MLARCHIVE) \ - $(top_srcdir)/ocaml-link.sh -var_expander_tests_LINK = \ - $(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ - $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) \ - $(OCAMLPACKAGES) -package oUnit \ - $(OCAMLLINKFLAGS) \ - $(var_expander_tests_THEOBJECTS) -o $@ - -# Dependencies. -.depend: \ - $(srcdir)/*.mli \ - $(srcdir)/*.ml \ - config.ml \ - output_rhv_upload_*_source.ml - $(top_builddir)/ocaml-dep.sh $^ --include .depend - -endif - -.PHONY: docs diff --git a/v2v/changeuid.ml b/v2v/changeuid.ml deleted file mode 100644 index 100fe2e04..000000000 --- a/v2v/changeuid.ml +++ /dev/null @@ -1,84 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Functions for making files and directories as another user. *) - -open Unix -open Printf - -open Std_utils -open Tools_utils -open Unix_utils -open Common_gettext.Gettext - -open Utils - -type t = { - uid : int option; - gid : int option; -} - -let create ?uid ?gid () = { uid = uid; gid = gid } - -let with_fork { uid; gid } name f = - let pid = fork () in - - if pid = 0 then ( - (* Child. *) - Option.may setgid gid; - Option.may setuid uid; - (try f () - with exn -> - eprintf "%s: changeuid: %s: %s\n%!" prog name (Printexc.to_string exn); - Exit._exit 1 - ); - Exit._exit 0 - ); - - (* Parent. *) - let _, status = waitpid [] pid in - match status with - | WEXITED 0 -> () - | WEXITED i -> - error (f_"subprocess exited with non-zero error code %d") i - | WSIGNALED i | WSTOPPED i -> - error (f_"subprocess signalled or stopped by signal %d") i - -let mkdir t path perm = - with_fork t (sprintf "mkdir: %s" path) (fun () -> mkdir path perm) - -let rmdir t path = - with_fork t (sprintf "rmdir: %s" path) (fun () -> rmdir path) - -let output t path f = - with_fork t path (fun () -> with_open_out path f) - -let make_file t path content = - output t path (fun chan -> output_string chan content) - -let unlink t path = - with_fork t (sprintf "unlink: %s" path) (fun () -> unlink path) - -let func t = with_fork t "func" - -let command t cmd = - with_fork t cmd ( - fun () -> - let r = Sys.command cmd in - if r <> 0 then failwith "external command failed" - ) diff --git a/v2v/changeuid.mli b/v2v/changeuid.mli deleted file mode 100644 index da0e78149..000000000 --- a/v2v/changeuid.mli +++ /dev/null @@ -1,69 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Functions for making files and directories as another user. - - [-o rhv] output mode has to write files as UID:GID 36:36, - otherwise RHV cannot read them. Because the files are located on - NFS (and hence might be root-squashed) we also cannot chown the - files. We cannot setuid the whole process to 36:36 because it - needs to do other root things like mounting and unmounting the NFS - volume. - - The solution to this craziness is to fork a subprocess every time - we need to create a file, setuid in the subprocess, and write the - file. The subprocess then exits, leaving the main process still - running as root. - - This mini-library encapsulates this tomfoolery into something that - is slightly more sane to use. - - NB. We are {b not} dropping permissions for security reasons. - This file has nothing to do with security. *) - -type t -(** Abstract handle. *) - -val create : ?uid:int -> ?gid:int -> unit -> t -(** Create handle. The optional [?uid] and [?gid] parameters are the - user/group to run as. If omitted, then we don't change user - and/or group (but we still do the forking anyway). *) - -val mkdir : t -> string -> int -> unit -(** [mkdir t path perm] creates the directory [path] with mode [perm]. *) - -val rmdir : t -> string -> unit -(** [rmdir t path] removes the directory [path]. *) - -val make_file : t -> string -> string -> unit -(** [make_file t path content] creates the file [path] with content - [content]. The current umask controls file permissions. *) - -val output : t -> string -> (out_channel -> unit) -> unit -(** [output t path f] creates the file [path] with content from - function [f]. The current umask controls file permissions. *) - -val unlink : t -> string -> unit -(** [unlink t path] deletes the file [path]. *) - -val func : t -> (unit -> unit) -> unit -(** [func t f] runs the arbitrary function [f]. *) - -val command : t -> string -> unit -(** [command t cmd] runs [cmd] as the alternate user/group after - forking. *) diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml deleted file mode 100644 index 77700393f..000000000 --- a/v2v/cmdline.ml +++ /dev/null @@ -1,727 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Command line argument parsing. *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext -open Getopt.OptionName - -open Types -open Utils - -type cmdline = { - bandwidth : bandwidth option; - compressed : bool; - debug_overlays : bool; - do_copy : bool; - in_place : bool; - network_map : Networks.t; - output_alloc : output_allocation; - output_format : string option; - output_name : string option; - print_estimate : bool; - print_source : bool; - root_choice : root_choice; - static_ips : static_ip list; - ks : Tools_utils.key_store; -} - -(* Matches --mac command line parameters. *) -let mac_re = PCRE.compile ~anchored:true "([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)" - -let parse_cmdline () = - let bandwidth = ref None in - let bandwidth_file = ref None in - let compressed = ref false in - let debug_overlays = ref false in - let do_copy = ref true in - let print_estimate = ref false in - let print_source = ref false in - let qemu_boot = ref false in - - let input_conn = ref None in - let input_format = ref None in - let input_password = ref None in - let input_transport = ref None in - let in_place = ref false in - let output_conn = ref None in - let output_format = ref None in - let output_name = ref None in - let output_password = ref None in - let output_storage = ref None in - - let set_string_option_once optname optref arg = - match !optref with - | Some _ -> - error (f_"%s option used more than once on the command line") optname - | None -> - optref := Some arg - in - - let input_mode = ref `Not_set in - let set_input_mode mode = - if !input_mode <> `Not_set then - error (f_"%s option used more than once on the command line") "-i"; - match mode with - | "disk" | "local" -> input_mode := `Disk - | "libvirt" -> input_mode := `Libvirt - | "libvirtxml" -> input_mode := `LibvirtXML - | "ova" -> input_mode := `OVA - | "vmx" -> input_mode := `VMX - | s -> - error (f_"unknown -i option: %s") s - in - - let input_options = ref [] in - let set_input_option_compat k v = - input_options := (k, v) :: !input_options - in - let set_input_option option = - let k, v = String.split "=" option in - set_input_option_compat k v - in - - let network_map = Networks.create () in - let static_ips = ref [] in - let add_network str = - match String.split ":" str with - | "", "" -> - error (f_"invalid -n/--network parameter") - | out, "" | "", out -> - Networks.add_default_network network_map out - | in_, out -> - Networks.add_network network_map in_ out - in - let add_bridge str = - match String.split ":" str with - | "", "" -> - error (f_"invalid -b/--bridge parameter") - | out, "" | "", out -> - Networks.add_default_bridge network_map out - | in_, out -> - Networks.add_bridge network_map in_ out - in - let add_mac str = - if not (PCRE.matches mac_re str) then - error (f_"cannot parse --mac \"%s\" parameter") str; - let mac = PCRE.sub 1 and out = PCRE.sub 3 in - match PCRE.sub 2 with - | "network" -> - Networks.add_mac network_map mac Network out - | "bridge" -> - Networks.add_mac network_map mac Bridge out - | "ip" -> - let add if_mac_addr if_ip_address if_default_gateway - if_prefix_length if_nameservers = - List.push_back static_ips - { if_mac_addr; if_ip_address; if_default_gateway; - if_prefix_length; if_nameservers } - in - (match String.nsplit "," out with - | [] -> - error (f_"invalid --mac ip option") - | [ip] -> add mac ip None None [] - | [ip; gw] -> add mac ip (Some gw) None [] - | ip :: gw :: len :: nameservers -> - let len = - try int_of_string len with - | Failure _ -> error (f_"cannot parse --mac ip prefix length field as an integer: %s") len in - add mac ip (Some gw) (Some len) nameservers - ); - | _ -> assert false - in - - let no_trim_warning _ = - warning (f_"the --no-trim option has been removed and now does nothing") - in - - let output_mode = ref `Not_set in - let set_output_mode mode = - if !output_mode <> `Not_set then - error (f_"%s option used more than once on the command line") "-o"; - match mode with - | "glance" -> output_mode := `Glance - | "libvirt" -> output_mode := `Libvirt - | "disk" | "local" -> output_mode := `Local - | "json" -> output_mode := `JSON - | "null" -> output_mode := `Null - | "openstack" | "osp" | "rhosp" -> output_mode := `Openstack - | "ovirt" | "rhv" | "rhev" -> output_mode := `RHV - | "ovirt-upload" | "ovirt_upload" | "rhv-upload" | "rhv_upload" -> - output_mode := `RHV_Upload - | "qemu" -> output_mode := `QEmu - | "vdsm" -> output_mode := `VDSM - | s -> - error (f_"unknown -o option: %s") s - in - - let output_alloc = ref `Not_set in - let set_output_alloc mode = - if !output_alloc <> `Not_set then - error (f_"%s option used more than once on the command line") "-oa"; - match mode with - | "sparse" -> output_alloc := `Sparse - | "preallocated" -> output_alloc := `Preallocated - | s -> - error (f_"unknown -oa option: %s") s - in - - let output_options = ref [] in - let set_output_option_compat k v = - output_options := (k, v) :: !output_options - in - let set_output_option option = - let k, v = String.split "=" option in - set_output_option_compat k v - in - - let root_choice = ref AskRoot in - let set_root_choice = function - | "ask" -> root_choice := AskRoot - | "single" -> root_choice := SingleRoot - | "first" -> root_choice := FirstRoot - | dev when String.is_prefix dev "/dev/" -> root_choice := RootDev dev - | s -> - error (f_"unknown --root option: %s") s - in - - let vmtype_warning _ = - warning (f_"the --vmtype option has been removed and now does nothing") - in - - let i_options = - String.concat "|" (Modules_list.input_modules ()) - and o_options = - String.concat "|" (Modules_list.output_modules ()) - and ovf_flavours_str = String.concat "|" Create_ovf.ovf_flavours in - - let argspec = [ - [ L"bandwidth" ], Getopt.String ("bps", set_string_option_once "--bandwidth" bandwidth), - s_"Set bandwidth to bits per sec"; - [ L"bandwidth-file" ], Getopt.String ("filename", set_string_option_once "--bandwidth-file" bandwidth_file), - s_"Set bandwidth dynamically from file"; - [ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge), - s_"Map bridge ‘in’ to ‘out’"; - [ L"compressed" ], Getopt.Set compressed, - s_"Compress output file (-of qcow2 only)"; - [ L"debug-overlay"; L"debug-overlays" ], Getopt.Set debug_overlays, - s_"Save overlay files"; - [ S 'i' ], Getopt.String (i_options, set_input_mode), - s_"Set input mode (default: libvirt)"; - [ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn), - s_"Libvirt URI"; - [ M"if" ], Getopt.String ("format", set_string_option_once "-if" input_format), - s_"Input format (for -i disk)"; - [ M"io" ], Getopt.String ("option[=value]", set_input_option), - s_"Set option for input mode"; - [ M"ip" ], Getopt.String ("filename", set_string_option_once "-ip" input_password), - s_"Use password from file to connect to input hypervisor"; - [ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport), - s_"Input transport"; - [ L"in-place" ], Getopt.Set in_place, - s_"Only tune the guest in the input VM"; - [ L"mac" ], Getopt.String ("mac:network|bridge|ip:out", add_mac), - s_"Map NIC to network or bridge or assign static IP"; - [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), - s_"Map network ‘in’ to ‘out’"; - [ L"no-copy" ], Getopt.Clear do_copy, - s_"Just write the metadata"; - [ L"no-trim" ], Getopt.String ("-", no_trim_warning), - s_"Ignored for backwards compatibility"; - [ S 'o' ], Getopt.String (o_options, set_output_mode), - s_"Set output mode (default: libvirt)"; - [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), - s_"Set output allocation mode"; - [ M"oc" ], Getopt.String ("uri", set_string_option_once "-oc" output_conn), - s_"Output hypervisor connection"; - [ M"of" ], Getopt.String ("raw|qcow2", set_string_option_once "-of" output_format), - s_"Set output format"; - [ M"on" ], Getopt.String ("name", set_string_option_once "-on" output_name), - s_"Rename guest when converting"; - [ M"oo" ], Getopt.String ("option[=value]", set_output_option), - s_"Set option for output mode"; - [ M"op" ], Getopt.String ("filename", set_string_option_once "-op" output_password), - s_"Use password from file to connect to output hypervisor"; - [ M"os" ], Getopt.String ("storage", set_string_option_once "-os" output_storage), - s_"Set output storage location"; - [ L"password-file" ], Getopt.String ("filename", set_string_option_once "--password-file" input_password), - s_"Same as ‘-ip filename’"; - [ L"print-estimate" ], Getopt.Set print_estimate, - s_"Estimate size of source and stop"; - [ L"print-source" ], Getopt.Set print_source, - s_"Print source and stop"; - [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)"; - [ L"root" ], Getopt.String ("ask|... ", set_root_choice), - s_"How to choose root filesystem"; - [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"), - s_"Same as ‘-io vddk-config=filename’"; - [ L"vddk-cookie" ], Getopt.String ("cookie", set_input_option_compat "vddk-cookie"), - s_"Same as ‘-io vddk-cookie=filename’"; - [ L"vddk-libdir" ], Getopt.String ("libdir", set_input_option_compat "vddk-libdir"), - s_"Same as ‘-io vddk-libdir=libdir’"; - [ L"vddk-nfchostport" ], Getopt.String ("nfchostport", set_input_option_compat "vddk-nfchostport"), - s_"Same as ‘-io vddk-nfchostport=nfchostport’"; - [ L"vddk-port" ], Getopt.String ("port", set_input_option_compat "vddk-port"), - s_"Same as ‘-io vddk-port=port’"; - [ L"vddk-snapshot" ], Getopt.String ("snapshot-moref", set_input_option_compat "vddk-snapshot"), - s_"Same as ‘-io vddk-snapshot=snapshot-moref’"; - [ L"vddk-thumbprint" ], Getopt.String ("thumbprint", set_input_option_compat "vddk-thumbprint"), - s_"Same as ‘-io vddk-thumbprint=thumbprint’"; - [ L"vddk-transports" ], Getopt.String ("transports", set_input_option_compat "vddk-transports"), - s_"Same as ‘-io vddk-transports=transports’"; - [ L"vdsm-compat" ], Getopt.String ("0.10|1.1", set_output_option_compat "vdsm-compat"), - s_"Same as ‘-oo vdsm-compat=0.10|1.1’"; - [ L"vdsm-image-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-image-uuid"), - s_"Same as ‘-oo vdsm-image-uuid=uuid’"; - [ L"vdsm-vol-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-vol-uuid"), - s_"Same as ‘-oo vdsm-vol-uuid=uuid’"; - [ L"vdsm-vm-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-vm-uuid"), - s_"Same as ‘-oo vdsm-vm-uuid=uuid’"; - [ L"vdsm-ovf-output" ], Getopt.String ("dir", set_output_option_compat "vdsm-ovf-output"), - s_"Same as ‘-oo vdsm-ovf-output=dir’"; - [ L"vdsm-ovf-flavour" ], Getopt.String (ovf_flavours_str, set_output_option_compat "vdsm-ovf-flavour"), - s_"Same as ‘-oo vdsm-ovf-flavour=flavour’"; - [ L"vmtype" ], Getopt.String ("-", vmtype_warning), - s_"Ignored for backwards compatibility"; - ] in - let args = ref [] in - let anon_fun s = List.push_front s args in - let usage_msg = - sprintf (f_"\ -%s: convert a guest to use KVM - - virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi -os imported esx_guest - - virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi esx_guest \ - -o rhv -os rhv.nfs:/export_domain --network ovirtmgmt - - virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp - - virt-v2v -i disk disk.img -o local -os /var/tmp - - virt-v2v -i disk disk.img -o glance - -There is a companion front-end called \"virt-p2v\" which comes as an -ISO or CD image that can be booted on physical machines. - -A short summary of the options is given below. For detailed help please -read the man page virt-v2v(1). -") - prog in - let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true ~machine_readable:true usage_msg in - Getopt.parse opthandle.getopt; - - (* Dereference the arguments. *) - let args = List.rev !args in - let bandwidth = - match !bandwidth, !bandwidth_file with - | None, None -> None - | Some rate, None -> Some (StaticBandwidth rate) - | rate, Some filename -> Some (DynamicBandwidth (rate, filename)) in - let compressed = !compressed in - let debug_overlays = !debug_overlays in - let do_copy = !do_copy in - let input_conn = !input_conn in - let input_format = !input_format in - let input_mode = !input_mode in - let input_options = List.rev !input_options in - let input_password = !input_password in - let input_transport = - match !input_transport with - | None -> None - | Some "ssh" -> Some `SSH - | Some "vddk" -> Some `VDDK - | Some transport -> - error (f_"unknown input transport ‘-it %s’") transport in - let in_place = !in_place in - let output_alloc = - match !output_alloc with - | `Not_set | `Sparse -> Sparse - | `Preallocated -> Preallocated in - let output_conn = !output_conn in - let output_format = !output_format in - let output_mode = !output_mode in - let output_name = !output_name in - let output_options = List.rev !output_options in - let output_password = !output_password in - let output_storage = !output_storage in - let print_estimate = !print_estimate in - let print_source = !print_source in - let qemu_boot = !qemu_boot in - let root_choice = !root_choice in - let static_ips = !static_ips in - - (* No arguments and machine-readable mode? Print out some facts - * about what this binary supports. - *) - (match args, machine_readable () with - | [], Some { pr } -> - pr "virt-v2v\n"; - pr "libguestfs-rewrite\n"; - pr "vcenter-https\n"; - pr "xen-ssh\n"; - pr "vddk\n"; - pr "colours-option\n"; - pr "vdsm-compat-option\n"; - pr "in-place\n"; - pr "io/oo\n"; - pr "mac-option\n"; - pr "bandwidth-option\n"; - pr "mac-ip-option\n"; - List.iter (pr "input:%s\n") (Modules_list.input_modules ()); - List.iter (pr "output:%s\n") (Modules_list.output_modules ()); - List.iter (pr "convert:%s\n") (Modules_list.convert_modules ()); - List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours; - exit 0 - | _, _ -> () - ); - - (* Some options cannot be used with --in-place. *) - if in_place then ( - if print_estimate then - error (f_"--in-place and --print-estimate cannot be used together") - ); - - (* Input transport affects whether some input options should or - * should not be used. - *) - let input_transport = - let is_query = input_options = ["?", ""] in - let no_options () = - if is_query then ( - printf (f_"No -io (input options) are supported with this input transport.\n"); - exit 0 - ) - else if input_options <> [] then - error (f_"no -io (input options) are allowed here"); - in - match input_transport with - | None -> no_options (); None - | Some `SSH -> no_options (); Some `SSH - | Some `VDDK -> - if is_query then ( - Input_libvirt_vddk.print_input_options (); - exit 0 - ) - else ( - let vddk_options = - Input_libvirt_vddk.parse_input_options input_options in - Some (`VDDK vddk_options) - ) in - - (* Output mode affects whether some output options should or - * should not be used. - *) - let output_mode = - let is_query = output_options = ["?", ""] in - let no_options () = - if is_query then ( - printf (f_"No -oo (output options) are supported in this output mode.\n"); - exit 0 - ) - else if output_options <> [] then - error (f_"no -oo (output options) are allowed here"); - in - match output_mode with - | `Not_set -> no_options (); `Not_set - | `Glance -> no_options (); `Glance - | `Libvirt -> no_options (); `Libvirt - | `Local -> no_options (); `Local - | `Null -> no_options (); `Null - | `RHV -> no_options (); `RHV - | `QEmu -> no_options (); `QEmu - - | `JSON -> - if is_query then ( - Output_json.print_output_options (); - exit 0 - ) - else ( - let json_options = - Output_json.parse_output_options output_options in - `JSON json_options - ) - - | `Openstack -> - if is_query then ( - Output_openstack.print_output_options (); - exit 0 - ) - else ( - let os_options = - Output_openstack.parse_output_options output_options in - `Openstack os_options - ) - - | `RHV_Upload -> - if is_query then ( - Output_rhv_upload.print_output_options (); - exit 0 - ) - else ( - let rhv_options = - Output_rhv_upload.parse_output_options output_options in - `RHV_Upload rhv_options - ) - - | `VDSM -> - if is_query then ( - Output_vdsm.print_output_options (); - exit 0 - ) - else ( - let vdsm_options = - Output_vdsm.parse_output_options output_options in - `VDSM vdsm_options - ) in - - (* Parsing of the argument(s) depends on the input mode. *) - let input = - match input_mode with - | `Disk -> - (* -i disk: Expecting a single argument, the disk filename. *) - let disk = - match args with - | [disk] -> disk - | _ -> - error (f_"expecting a disk image (filename) on the command line") in - Input_disk.input_disk input_format disk - - | `Not_set - | `Libvirt -> - (* -i libvirt: Expecting a single argument which is the name - * of the libvirt guest. - *) - let guest = - match args with - | [guest] -> guest - | _ -> - error (f_"expecting a libvirt guest name on the command line") in - let input_transport = - match input_transport with - | None -> None - | (Some (`VDDK _) as vddk) -> vddk - | Some `SSH -> - error (f_"only ‘-it vddk’ can be used here") in - Input_libvirt.input_libvirt input_conn input_password input_transport - guest - - | `LibvirtXML -> - (* -i libvirtxml: Expecting a filename (XML file). *) - let filename = - match args with - | [filename] -> filename - | _ -> - error (f_"expecting a libvirt XML file name on the command line") in - Input_libvirtxml.input_libvirtxml filename - - | `OVA -> - (* -i ova: Expecting an ova filename (tar file). *) - let filename = - match args with - | [filename] -> filename - | _ -> - error (f_"expecting an OVA file name on the command line") in - Input_ova.input_ova filename - - | `VMX -> - (* -i vmx: Expecting a vmx filename or SSH remote path. *) - let arg = - match args with - | [arg] -> arg - | _ -> - error (f_"expecting a single VMX file name or SSH remote path on the command line") in - let input_transport = - match input_transport with - | None -> None - | Some `SSH -> Some `SSH - | Some (`VDDK _) -> - error (f_"only ‘-it ssh’ can be used here") in - Input_vmx.input_vmx input_password input_transport arg in - - (* Common error message. *) - let error_option_cannot_be_used_in_output_mode mode opt = - error (f_"-o %s: %s option cannot be used in this output mode") mode opt - in - - (* Parse the output mode. *) - if output_mode <> `Not_set && in_place then - error (f_"-o and --in-place cannot be used at the same time"); - let output, output_format, output_alloc = - match output_mode with - | `Glance -> - if output_conn <> None then - error_option_cannot_be_used_in_output_mode "glance" "-oc"; - if output_password <> None then - error_option_cannot_be_used_in_output_mode "glance" "-op"; - if output_storage <> None then - error_option_cannot_be_used_in_output_mode "glance" "-os"; - if qemu_boot then - error_option_cannot_be_used_in_output_mode "glance" "--qemu-boot"; - if not do_copy then - error_option_cannot_be_used_in_output_mode "glance" "--no-copy"; - Output_glance.output_glance (), - output_format, output_alloc - - | `Not_set - | `Libvirt -> - if output_password <> None then - error_option_cannot_be_used_in_output_mode "libvirt" "-op"; - let output_storage = Option.default "default" output_storage in - if qemu_boot then - error_option_cannot_be_used_in_output_mode "libvirt" "--qemu-boot"; - if not do_copy then - error_option_cannot_be_used_in_output_mode "libvirt" "--no-copy"; - Output_libvirt.output_libvirt output_conn output_storage, - output_format, output_alloc - - | `JSON json_options -> - if output_password <> None then - error_option_cannot_be_used_in_output_mode "json" "-op"; - if output_conn <> None then - error_option_cannot_be_used_in_output_mode "json" "-oc"; - let os = - match output_storage with - | None -> - error (f_"-o json: output directory was not specified, use '-os /dir'") - | Some d when not (is_directory d) -> - error (f_"-os %s: output directory does not exist or is not a directory") d - | Some d -> d in - if qemu_boot then - error_option_cannot_be_used_in_output_mode "json" "--qemu-boot"; - Output_json.output_json os json_options, - output_format, output_alloc - - | `Local -> - if output_password <> None then - error_option_cannot_be_used_in_output_mode "local" "-op"; - let os = - match output_storage with - | None -> - error (f_"-o local: output directory was not specified, use '-os /dir'") - | Some d when not (is_directory d) -> - error (f_"-os %s: output directory does not exist or is not a directory") d - | Some d -> d in - if qemu_boot then - error_option_cannot_be_used_in_output_mode "local" "--qemu-boot"; - Output_local.output_local os, - output_format, output_alloc - - | `Null -> - if output_alloc <> Sparse then - error_option_cannot_be_used_in_output_mode "null" "-oa"; - if output_conn <> None then - error_option_cannot_be_used_in_output_mode "null" "-oc"; - if output_format <> None then - error_option_cannot_be_used_in_output_mode "null" "-of"; - if output_password <> None then - error_option_cannot_be_used_in_output_mode "null" "-op"; - if output_storage <> None then - error_option_cannot_be_used_in_output_mode "null" "-os"; - if qemu_boot then - error_option_cannot_be_used_in_output_mode "null" "--qemu-boot"; - Output_null.output_null (), - (* Force output format to raw sparse in -o null mode. *) - Some "raw", Sparse - - | `QEmu -> - if output_password <> None then - error_option_cannot_be_used_in_output_mode "qemu" "-op"; - let os = - match output_storage with - | None -> - error (f_"-o qemu: output directory was not specified, use '-os /dir'") - | Some d when not (is_directory d) -> - error (f_"-os %s: output directory does not exist or is not a directory") d - | Some d -> d in - Output_qemu.output_qemu os qemu_boot, - output_format, output_alloc - - | `Openstack os_options -> - if output_alloc <> Sparse then - error_option_cannot_be_used_in_output_mode "openstack" "-oa"; - if output_format <> None then - error_option_cannot_be_used_in_output_mode "openstack" "-of"; - if qemu_boot then - error_option_cannot_be_used_in_output_mode "openstack" "--qemu-boot"; - Output_openstack.output_openstack output_conn output_password - output_storage os_options, - (* Force output format to raw sparse in -o openstack mode. *) - Some "raw", Sparse - - | `RHV -> - if output_password <> None then - error_option_cannot_be_used_in_output_mode "rhv" "-op"; - let os = - match output_storage with - | None -> - error (f_"-o rhv: output storage was not specified, use ‘-os’"); - | Some d -> d in - if qemu_boot then - error_option_cannot_be_used_in_output_mode "rhv" "--qemu-boot"; - Output_rhv.output_rhv os output_alloc, - output_format, output_alloc - - | `RHV_Upload rhv_options -> - let output_conn = - match output_conn with - | None -> - error (f_"-o rhv-upload: use ‘-oc’ to point to the oVirt or RHV server REST API URL, which is usually https://servername/ovirt-engine/api") - | Some oc -> oc in - (* In theory we could make the password optional in future. *) - let output_password = - match output_password with - | None -> - error (f_"-o rhv-upload: output password file was not specified, use ‘-op’ to point to a file which contains the password used to connect to the oVirt or RHV server") - | Some op -> op in - let os = - match output_storage with - | None -> - error (f_"-o rhv-upload: output storage was not specified, use ‘-os’"); - | Some os -> os in - if qemu_boot then - error_option_cannot_be_used_in_output_mode "rhv-upload" "--qemu-boot"; - Output_rhv_upload.output_rhv_upload output_alloc output_conn - output_password os - rhv_options, - output_format, output_alloc - - | `VDSM vdsm_options -> - if output_password <> None then - error_option_cannot_be_used_in_output_mode "vdsm" "-op"; - let os = - match output_storage with - | None -> - error (f_"-o vdsm: output storage was not specified, use ‘-os’"); - | Some d -> d in - if qemu_boot then - error_option_cannot_be_used_in_output_mode "vdsm" "--qemu-boot"; - Output_vdsm.output_vdsm os vdsm_options output_alloc, - output_format, output_alloc in - - { - bandwidth; compressed; debug_overlays; do_copy; in_place; - network_map; output_alloc; output_format; output_name; - print_estimate; print_source; root_choice; static_ips; - ks = opthandle.ks; - }, - input, output diff --git a/v2v/cmdline.mli b/v2v/cmdline.mli deleted file mode 100644 index e7a688359..000000000 --- a/v2v/cmdline.mli +++ /dev/null @@ -1,38 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Command line argument parsing. *) - -type cmdline = { - bandwidth : Types.bandwidth option; - compressed : bool; - debug_overlays : bool; - do_copy : bool; - in_place : bool; - network_map : Networks.t; - output_alloc : Types.output_allocation; - output_format : string option; - output_name : string option; - print_estimate : bool; - print_source : bool; - root_choice : Types.root_choice; - static_ips : Types.static_ip list; - ks : Tools_utils.key_store; -} - -val parse_cmdline : unit -> cmdline * Types.input * Types.output diff --git a/v2v/config.ml.in b/v2v/config.ml.in deleted file mode 100644 index 240f60868..000000000 --- a/v2v/config.ml.in +++ /dev/null @@ -1,20 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * @configure_input@ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - *) - -let virt_v2v_nbdkit_python_plugin = "@VIRT_V2V_NBDKIT_PYTHON_PLUGIN@" diff --git a/v2v/config.mli b/v2v/config.mli deleted file mode 100644 index b9f4d6225..000000000 --- a/v2v/config.mli +++ /dev/null @@ -1,26 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - *) - -val virt_v2v_nbdkit_python_plugin : string -(** Return the name of the nbdkit python plugin used by - [virt-v2v -o rhv-upload]. - - As above this must also be the Python 3 version of the plugin, - unless you change it. The configure command to change this is: - - [./configure --with-virt-v2v-nbdkit-python-plugin=...] *) diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml deleted file mode 100644 index 3762ead38..000000000 --- a/v2v/convert_linux.ml +++ /dev/null @@ -1,1124 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Convert a Linux guest to run on KVM. *) - -(* < mdbooth> It's all in there for a reason :/ *) - -open Printf - -open C_utils -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Utils -open Types -open Linux_kernels - -module G = Guestfs - -(* The conversion function. *) -let convert (g : G.guestfs) inspect source_disks output rcaps _ = - (*----------------------------------------------------------------------*) - (* Inspect the guest first. We already did some basic inspection in - * the common v2v.ml code, but that has to deal with generic guests - * (anything common to Linux and Windows). Here we do more detailed - * inspection which can make the assumption that we are dealing with - * a Linux guest using RPM or Debian packages. - *) - - (* Basic inspection data available as local variables. *) - assert (inspect.i_type = "linux"); - - let family = - match inspect.i_distro with - | "fedora" - | "rhel" | "centos" | "scientificlinux" | "redhat-based" - | "oraclelinux" -> `RHEL_family - | "sles" | "suse-based" | "opensuse" -> `SUSE_family - | "debian" | "ubuntu" | "linuxmint" | "kalilinux" -> `Debian_family - | _ -> assert false in - - assert (inspect.i_package_format = "rpm" || inspect.i_package_format = "deb"); - - (* We use Augeas for inspection and conversion, so initialize it early. - * Calling debug_augeas_errors will display any //error nodes in - * debugging output if verbose (but otherwise it does nothing). - *) - g#aug_init "/" 1; - debug_augeas_errors g; - - (* Clean RPM database. This must be done early to avoid RHBZ#1143866. *) - Array.iter g#rm_f (g#glob_expand "/var/lib/rpm/__db.00?"); - - (* Detect the installed bootloader. *) - let bootloader = Linux_bootloaders.detect_bootloader g inspect in - Linux.augeas_reload g; - - (* Detect which kernels are installed and offered by the bootloader. *) - let bootloader_kernels = - Linux_kernels.detect_kernels g inspect family bootloader in - - (*----------------------------------------------------------------------*) - (* Conversion step. *) - - let rec do_convert () = - augeas_grub_configuration (); - - unconfigure_xen (); - unconfigure_vbox (); - unconfigure_vmware (); - unconfigure_citrix (); - unconfigure_kudzu (); - unconfigure_prltools (); - - install_linux_tools (); - - let kernel = configure_kernel () in - - if output#keep_serial_console then ( - configure_console (); - bootloader#configure_console (); - ) else ( - remove_console (); - bootloader#remove_console (); - ); - - let acpi = supports_acpi () in - - let video = - match rcaps.rcaps_video with - | None -> QXL - | Some video -> video in - - let block_type = - match rcaps.rcaps_block_bus with - | None -> if kernel.ki_supports_virtio_blk then Virtio_blk else IDE - | Some block_type -> block_type in - - let net_type = - match rcaps.rcaps_net_bus with - | None -> if kernel.ki_supports_virtio_net then Virtio_net else E1000 - | Some net_type -> net_type in - - configure_display_driver video; - remap_block_devices block_type; - configure_kernel_modules block_type net_type; - rebuild_initrd kernel; - - SELinux_relabel.relabel g; - - (* XXX Look up this information in libosinfo in future. *) - let machine = - match inspect.i_arch with - | "i386"|"x86_64" -> I440FX - | _ -> Virt in - - (* Return guest capabilities from the convert () function. *) - let guestcaps = { - gcaps_block_bus = block_type; - gcaps_net_bus = net_type; - gcaps_video = video; - gcaps_virtio_rng = kernel.ki_supports_virtio_rng; - gcaps_virtio_balloon = kernel.ki_supports_virtio_balloon; - gcaps_isa_pvpanic = kernel.ki_supports_isa_pvpanic; - gcaps_machine = machine; - gcaps_arch = Utils.kvm_arch inspect.i_arch; - gcaps_acpi = acpi; - } in - - guestcaps - - and augeas_grub_configuration () = - if bootloader#set_augeas_configuration () then - Linux.augeas_reload g - - and unconfigure_xen () = - (* Remove kmod-xenpv-* (RHEL 3). *) - let xenmods = - List.filter_map ( - fun { G.app2_name = name } -> - if name = "kmod-xenpv" || String.is_prefix name "kmod-xenpv-" then - Some name - else - None - ) inspect.i_apps in - Linux.remove g inspect xenmods; - - (* Undo related nastiness if kmod-xenpv was installed. *) - if xenmods <> [] then ( - (* kmod-xenpv modules may have been manually copied to other kernels. - * Hunt them down and destroy them. - *) - let dirs = g#find "/lib/modules" in - let dirs = Array.to_list dirs in - let dirs = List.filter (fun s -> String.find s "/xenpv" >= 0) dirs in - let dirs = List.map ((^) "/lib/modules/") dirs in - let dirs = List.filter g#is_dir dirs in - - (* Check it's not owned by an installed application. *) - let dirs = List.filter ( - fun d -> not (Linux.is_file_owned g inspect d) - ) dirs in - - (* Remove any unowned xenpv directories. *) - List.iter g#rm_rf dirs; - - (* rc.local may contain an insmod or modprobe of the xen-vbd driver, - * added by an installation script. - *) - (try - let lines = g#read_lines "/etc/rc.local" in - let lines = Array.to_list lines in - let rex = PCRE.compile "\\b(insmod|modprobe)\\b.*\\bxen-vbd" in - let lines = List.map ( - fun s -> - if PCRE.matches rex s then - "#" ^ s - else - s - ) lines in - let file = String.concat "\n" lines ^ "\n" in - g#write "/etc/rc.local" file - with - G.Error msg -> eprintf "%s: /etc/rc.local: %s (ignored)\n" prog msg - ); - ); - - if family = `SUSE_family then ( - (* Remove xen modules from INITRD_MODULES and DOMU_INITRD_MODULES. *) - let variables = ["INITRD_MODULES"; "DOMU_INITRD_MODULES"] in - let xen_modules = ["xennet"; "xen-vnif"; "xenblk"; "xen-vbd"] in - let modified = ref false in - List.iter ( - fun var -> - List.iter ( - fun xen_mod -> - let expr = - sprintf "/file/etc/sysconfig/kernel/%s/value[. = '%s']" - var xen_mod in - let entries = g#aug_match expr in - let entries = Array.to_list entries in - if entries <> [] then ( - List.iter (fun e -> ignore (g#aug_rm e)) entries; - modified := true - ) - ) xen_modules - ) variables; - if !modified then g#aug_save () - ); - - and unconfigure_vbox () = - (* Uninstall VirtualBox Guest Additions. *) - let package_name = "virtualbox-guest-additions" in - let has_guest_additions = - List.exists ( - fun { G.app2_name = name } -> name = package_name - ) inspect.i_apps in - if has_guest_additions then - Linux.remove g inspect [package_name]; - - (* Guest Additions might have been installed from a tarball. The - * above code won't detect this case. Look for the uninstall tool - * and try running it. - * - * Note that it's important we do this early in the conversion - * process, as this uninstallation script naively overwrites - * configuration files with versions it cached prior to - * installation. - *) - let vboxconfig = "/var/lib/VBoxGuestAdditions/config" in - if g#is_file ~followsymlinks:true vboxconfig then ( - let lines = g#read_lines vboxconfig in - let lines = Array.to_list lines in - let rex = PCRE.compile "^INSTALL_DIR=(.*)$" in - let lines = List.filter_map ( - fun line -> - if PCRE.matches rex line then ( - let path = PCRE.sub 1 in - let path = shell_unquote path in - if String.length path >= 1 && path.[0] = '/' then ( - let vboxuninstall = path ^ "/uninstall.sh" in - Some vboxuninstall - ) - else None - ) - else None - ) lines in - let lines = List.filter (g#is_file ~followsymlinks:true) lines in - match lines with - | [] -> () - | vboxuninstall :: _ -> - try - ignore (g#command [| vboxuninstall |]); - - (* Reload Augeas to detect changes made by vbox tools uninst. *) - Linux.augeas_reload g - with - G.Error msg -> - warning (f_"VirtualBox Guest Additions were detected, but uninstallation failed. The error message was: %s (ignored)") - msg - ) - - and unconfigure_vmware () = - (* Look for any configured VMware yum repos and disable them. *) - let repos = - g#aug_match "/files/etc/yum.repos.d/*/*[baseurl =~ regexp('https?://([^/]+\\.)?vmware\\.com/.*')]" in - let repos = Array.to_list repos in - List.iter ( - fun repo -> - g#aug_set (repo ^ "/enabled") "0"; - g#aug_save () - ) repos; - - (* Uninstall VMware Tools. *) - let remove = ref [] and libraries = ref [] in - (* On Ubuntu, the ubuntu-server metapackage depends on - * open-vm-tools, and thus any attempt to remove it will cause - * dependency issues. Hence, special case this situation, and - * leave open-vm-tools installed in this case. - *) - let has_ubuntu_server = - if family = `Debian_family then - List.exists ( - fun { G.app2_name = name } -> - name = "ubuntu-server" - ) inspect.i_apps - else false in - List.iter ( - fun { G.app2_name = name } -> - if String.is_prefix name "vmware-tools-libraries-" then - List.push_front name libraries - else if String.is_prefix name "vmware-tools-" then - List.push_front name remove - else if name = "VMwareTools" then - List.push_front name remove - else if String.is_prefix name "kmod-vmware-tools" then - List.push_front name remove - else if String.is_prefix name "open-vm-tools-" then - List.push_front name remove - else if name = "open-vm-tools" && not has_ubuntu_server then - List.push_front name remove - ) inspect.i_apps; - let libraries = !libraries in - - (* VMware tools includes 'libraries' packages which provide custom - * versions of core functionality. We need to install non-custom - * versions of everything provided by these packages before - * attempting to uninstall them, or we'll hit dependency - * issues. - *) - if libraries <> [] then ( - (* We only support removal of libraries on systems which use yum. *) - if inspect.i_package_management = "yum" then ( - List.iter ( - fun library -> - let provides = - g#command_lines [| "rpm"; "-q"; "--provides"; library |] in - let provides = Array.to_list provides in - - (* The packages provide themselves, filter this out. *) - let provides = - List.filter ( - fun s -> - not (library = s || String.is_prefix s (library ^ " = ")) - ) provides in - - (* If the package provides something other than itself, then - * proceed installing the replacements; in the other case, - * just mark the package for removal, as it means no other - * package can depend on something provided. - *) - if provides <> [] then ( - (* Trim whitespace. *) - let provides = List.map String.trim provides in - - (* Install the dependencies with yum. Use yum explicitly - * because we don't have package names and local install is - * impractical. - *) - let cmd = ["yum"; "-q"; "resolvedep"] @ provides in - let cmd = Array.of_list cmd in - let replacements = g#command_lines cmd in - let replacements = Array.to_list replacements in - - let cmd = [ "yum"; "install"; "-y" ] @ replacements in - let cmd = Array.of_list cmd in - (try - ignore (g#command cmd); - List.push_front library remove - with G.Error msg -> - eprintf "%s: could not install replacement for %s. Error was: %s. %s was not removed.\n" - prog library msg library - ); - ) else ( - List.push_front library remove; - ); - ) libraries - ) - ); - - let remove = !remove in - Linux.remove g inspect remove; - - (* VMware Tools may have been installed from a tarball, so the - * above code won't remove it. Look for the uninstall tool and run - * if present. - *) - let uninstaller = "/usr/bin/vmware-uninstall-tools.pl" in - if g#is_file ~followsymlinks:true uninstaller then ( - try - (* The VMware tools uninstaller will rebuild the ramdisk for - * the kernels present either at installation time, or at - * later time (when the tools are applied to newly - * installed kernels). Since we do not want to potentially - * rebuilt all the available kernels, trick the "database" - * of the VMware tools installation to not do any ramdisk - * restore. In any case, we will rebuilt the ramdisk of the - * default kernel already. - *) - let locations = "/etc/vmware-tools/locations" in - if g#is_file ~followsymlinks:true locations then ( - g#write_append locations "remove_answer RESTORE_RAMDISK_CMD\n"; - g#write_append locations "remove_answer RESTORE_RAMDISK_KERNELS\n"; - g#write_append locations "remove_answer RESTORE_RAMDISK_ONECALL\n"; - ); - if family = `SUSE_family then - ignore (g#command [| "/usr/bin/env"; - "rootdev=" ^ inspect.i_root; - uninstaller |]) - else - ignore (g#command [| uninstaller |]); - - (* Reload Augeas to detect changes made by vbox tools uninst. *) - Linux.augeas_reload g - with - G.Error msg -> - warning (f_"VMware tools was detected, but uninstallation failed. The error message was: %s (ignored)") - msg - ) - - and unconfigure_citrix () = - let pkgs = - List.filter ( - fun { G.app2_name = name } -> String.is_prefix name "xe-guest-utilities" - ) inspect.i_apps in - let pkgs = List.map (fun { G.app2_name = name } -> name) pkgs in - - if pkgs <> [] then ( - Linux.remove g inspect pkgs; - - (* Installing these guest utilities automatically unconfigures - * ttys in /etc/inittab if the system uses it. We need to put - * them back. - *) - let rex = PCRE.compile "^([1-6]):([2-5]+):respawn:(.*)" in - let updated = ref false in - let rec loop () = - let comments = g#aug_match "/files/etc/inittab/#comment" in - let comments = Array.to_list comments in - match comments with - | [] -> () - | commentp :: _ -> - let comment = g#aug_get commentp in - if PCRE.matches rex comment then ( - let name = PCRE.sub 1 - and runlevels = PCRE.sub 2 - and process = PCRE.sub 3 in - - if String.find process "getty" >= 0 then ( - updated := true; - - (* Create a new entry immediately after the comment. *) - g#aug_insert commentp name false; - g#aug_set ("/files/etc/inittab/" ^ name ^ "/runlevels") runlevels; - g#aug_set ("/files/etc/inittab/" ^ name ^ "/action") "respawn"; - g#aug_set ("/files/etc/inittab/" ^ name ^ "/process") process; - - (* Delete the comment node. *) - ignore (g#aug_rm commentp); - - (* As the aug_rm invalidates the output of aug_match, we - * now have to restart the whole loop. - *) - loop () - ) - ) - in - loop (); - if !updated then g#aug_save (); - ) - - and unconfigure_kudzu () = - (* Disable kudzu in the guest - * Kudzu will detect the changed network hardware at boot time and - * either: - * - require manual intervention, or - * - disable the network interface - * Neither of these behaviours is desirable. - *) - if g#is_file ~followsymlinks:true "/etc/init.d/kudzu" - && g#is_file ~followsymlinks:true "/sbin/chkconfig" then ( - ignore (g#command [| "/sbin/chkconfig"; "kudzu"; "off" |]) - ) - - and unconfigure_prltools () = - let prltools_path = "/usr/lib/parallels-tools/install" in - if g#is_file ~followsymlinks:true prltools_path then ( - try - ignore (g#command [| prltools_path; "-r" |]); - - (* Reload Augeas to detect changes made by prltools uninst. *) - Linux.augeas_reload g - with - G.Error msg -> - warning (f_"Parallels tools was detected, but uninstallation failed. The error message was: %s (ignored)") - msg - ) - - and install_linux_tools () = - let has_qemu_guest_agent = - List.exists ( - fun { G.app2_name = name } -> - name = "qemu-guest-agent" - ) inspect.i_apps in - if not has_qemu_guest_agent then - Windows_virtio.install_linux_tools g inspect - - and configure_kernel () = - (* Previously this function would try to install kernels, but we - * don't do that any longer. - *) - - (* Check a non-Xen kernel exists. *) - let only_xen_kernels = List.for_all ( - fun { ki_is_xen_pv_only_kernel = pv_only } -> pv_only - ) bootloader_kernels in - if only_xen_kernels then - error (f_"only Xen kernels are installed in this guest.\n\nRead the %s(1) manual, section \"Xen paravirtualized guests\", to see what to do.") prog; - - (* Enable the best non-Xen kernel, where "best" means the one with - * the highest version, preferring non-debug kernels which support - * virtio. - *) - let best_kernel = - let compare_best_kernels k1 k2 = - let i = compare k1.ki_supports_virtio_net k2.ki_supports_virtio_net in - if i <> 0 then i - else ( - let i = compare_app2_versions k1.ki_app k2.ki_app in - if i <> 0 then i - (* Favour non-debug kernels over debug kernels (RHBZ#1170073). *) - else compare k2.ki_is_debug k1.ki_is_debug - ) - in - let kernels = bootloader_kernels in - let kernels = - List.filter (fun { ki_is_xen_pv_only_kernel = pv_only } -> not pv_only) - kernels in - let kernels = List.sort compare_best_kernels kernels in - let kernels = List.rev kernels (* so best is first *) in - List.hd kernels in - if verbose () then ( - eprintf "best kernel for this guest:\n"; - print_kernel_info stderr "\t" best_kernel - ); - if best_kernel <> List.hd bootloader_kernels then ( - debug "best kernel is not the bootloader default, setting bootloader default ..."; - bootloader#set_default_kernel best_kernel.ki_vmlinuz - ); - - (* Update /etc/sysconfig/kernel DEFAULTKERNEL (RHBZ#1176801). *) - if g#is_file ~followsymlinks:true "/etc/sysconfig/kernel" then ( - let entries = - g#aug_match "/files/etc/sysconfig/kernel/DEFAULTKERNEL/value" in - let entries = Array.to_list entries in - if entries <> [] then ( - List.iter (fun path -> g#aug_set path best_kernel.ki_name) entries; - g#aug_save () - ) - ); - - best_kernel - - (* Even though the kernel was already installed (this version of - * virt-v2v does not install new kernels), it could have an - * initrd that does not have support virtio. Therefore rebuild - * the initrd. - *) - and rebuild_initrd kernel = - match kernel.ki_initrd with - | None -> () - | Some initrd -> - (* Enable the basic virtio modules in the kernel. *) - let modules = - let modules = - (* The order of modules here is deliberately the same as the - * order specified in the postinstall script of kmod-virtio in - * RHEL3. The reason is that the probing order determines the - * major number of vdX block devices. If we change it, RHEL 3 - * KVM guests won't boot. - *) - List.filter (fun m -> List.mem m kernel.ki_modules) - [ "virtio"; "virtio_ring"; "virtio_blk"; - "virtio_scsi"; "virtio_net"; "virtio_pci" ] in - if modules <> [] then modules - else - (* Fallback copied from old virt-v2v. XXX Why not "ide"? *) - [ "sym53c8xx" ] in - - (* Move the old initrd file out of the way. Note that dracut/mkinitrd - * will refuse to overwrite an old file so we have to do this. - *) - g#mv initrd (initrd ^ ".pre-v2v"); - - (* dracut and mkinitrd want what they call the "kernel version". What - * they actually mean is the last element of the module path - * (eg. /lib/modules/2.6.32-496.el6.x86_64 -> 2.6.32-496.el6.x86_64) - * which might include the arch. Get that here. - *) - let mkinitrd_kv = - let modpath = kernel.ki_modpath in - match last_part_of modpath '/' with - | Some x -> x - | None -> invalid_arg (sprintf "invalid module path: %s" modpath) in - - let run_dracut_command dracut_path = - (* Dracut. *) - let args = - dracut_path :: - (if verbose () then [ "--verbose" ] else []) - @ [ "--add-drivers"; String.concat " " modules; initrd; mkinitrd_kv ] - in - ignore (g#command (Array.of_list args)) - in - - let run_update_initramfs_command () = - let args = - "/usr/sbin/update-initramfs" :: - (if verbose () then [ "-v" ] else []) - @ [ "-c"; "-k"; mkinitrd_kv ] - in - ignore (g#command (Array.of_list args)) - in - - if g#is_file ~followsymlinks:true "/sbin/dracut" then - run_dracut_command "/sbin/dracut" - else if g#is_file ~followsymlinks:true "/usr/bin/dracut" then - run_dracut_command "/usr/bin/dracut" - else if family = `SUSE_family - && g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( - ignore ( - g#command [| "/usr/bin/env"; - "rootdev=" ^ inspect.i_root; - "/sbin/mkinitrd"; - "-m"; String.concat " " modules; - "-i"; initrd; - "-k"; kernel.ki_vmlinuz; - "-d"; inspect.i_root |] - ) - ) - else if family = `Debian_family then ( - if not (g#is_file ~followsymlinks:true "/usr/sbin/update-initramfs") then - error (f_"unable to rebuild initrd (%s) because update-initramfs was not found in the guest") - initrd; - - if List.length modules > 0 then ( - (* The modules to add to initrd are defined in: - * /etc/initramfs-tools/modules - * File format is same as modules(5). - *) - let path = "/files/etc/initramfs-tools/modules" in - g#aug_transform "modules" "/etc/initramfs-tools/modules"; - Linux.augeas_reload g; - g#aug_set (sprintf "%s/#comment[last()+1]" path) - "The following modules were added by virt-v2v"; - List.iter ( - fun m -> g#aug_clear (sprintf "%s/%s" path m) - ) modules; - g#aug_save (); - ); - - run_update_initramfs_command () - ) - else if g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( - let module_args = List.map (sprintf "--with=%s") modules in - let args = - [ "/sbin/mkinitrd" ] @ module_args @ [ initrd; mkinitrd_kv ] in - - (* We explicitly modprobe ext2 here. This is required by - * mkinitrd on RHEL 3, and shouldn't hurt on other OSs. We - * don't care if this fails. - *) - (try g#modprobe "ext2" with G.Error _ -> ()); - - (* loop is a module in RHEL 5. Try to load it. Doesn't matter - * for other OSs if it doesn't exist, but RHEL 5 will complain: - * "All of your loopback devices are in use." - *) - (try g#modprobe "loop" with G.Error _ -> ()); - - (* On RHEL 3 we have to take extra gritty to get a working - * loopdev. mkinitrd runs the nash command `findlodev' - * which does this: - * - * for (devNum = 0; devNum < 256; devNum++) { - * sprintf(devName, "/dev/loop%s%d", separator, devNum); - * if ((fd = open(devName, O_RDONLY)) < 0) return 0; - * if (ioctl(fd, LOOP_GET_STATUS, &loopInfo)) { - * close(fd); - * printf("%s\n", devName); - * return 0; - * // etc - * - * In a modern kernel, /dev/loop isn't created until it is - * used. But we can create /dev/loop0 manually. Note we have - * to do this in the appliance /dev. (RHBZ#1171130) - *) - if family = `RHEL_family && inspect.i_major_version = 3 then - ignore (g#debug "sh" [| "mknod"; "-m"; "0666"; - "/dev/loop0"; "b"; "7"; "0" |]); - - (* RHEL 4 mkinitrd determines if the root filesystem is on LVM - * by checking if the device name (after following symlinks) - * starts with /dev/mapper. However, on recent kernels/udevs, - * /dev/mapper/foo is just a symlink to /dev/dm-X. This means - * that RHEL 4 mkinitrd running in the appliance fails to - * detect root on LVM. We check ourselves if root is on LVM, - * and frig RHEL 4's mkinitrd if it is by setting root_lvm=1 in - * its environment. This overrides an internal variable in - * mkinitrd, and is therefore extremely nasty and applicable - * only to a particular version of mkinitrd. - *) - let env = - if family = `RHEL_family && inspect.i_major_version = 4 then - Some "root_lvm=1" - else - None in - - match env with - | None -> ignore (g#command (Array.of_list args)) - | Some env -> - let cmd = sprintf "sh -c '%s %s'" env (String.concat " " args) in - ignore (g#sh cmd) - ) - else ( - error (f_"unable to rebuild initrd (%s) because mkinitrd or dracut was not found in the guest") - initrd - ) - - (* We configure a console on ttyS0. Make sure existing console - * references use it. N.B. Note that the RHEL 6 xen guest kernel - * presents a console device called /dev/hvc0, whereas previous xen - * guest kernels presented /dev/xvc0. The regular kernel running - * under KVM also presents a virtio console device called /dev/hvc0, - * so ideally we would just leave it alone. However, RHEL 6 libvirt - * doesn't yet support this device so we can't attach to it. We - * therefore use /dev/ttyS0 for RHEL 6 anyway. - *) - and configure_console () = - (* Look for gettys using xvc0 or hvc0. RHEL 6 doesn't use inittab - * but this still works. - *) - let paths = g#aug_match "/files/etc/inittab/*/process" in - let paths = Array.to_list paths in - let rex = PCRE.compile "\\b([xh]vc0)\\b" in - List.iter ( - fun path -> - let proc = g#aug_get path in - let proc' = PCRE.replace ~global:true rex "ttyS0" proc in - if proc <> proc' then g#aug_set path proc' - ) paths; - - let paths = g#aug_match "/files/etc/securetty/*" in - let paths = Array.to_list paths in - List.iter ( - fun path -> - let tty = g#aug_get path in - if tty = "xvc0" || tty = "hvc0" then - g#aug_set path "ttyS0" - ) paths; - - g#aug_save () - - (* If the target doesn't support a serial console, we want to remove - * all references to it instead. - *) - and remove_console () = - (* Look for gettys using xvc0 or hvc0. RHEL 6 doesn't use inittab - * but this still works. - *) - let paths = g#aug_match "/files/etc/inittab/*/process" in - let paths = Array.to_list paths in - let rex = PCRE.compile "\\b([xh]vc0|ttyS0)\\b" in - List.iter ( - fun path -> - let proc = g#aug_get path in - if PCRE.matches rex proc then - ignore (g#aug_rm (path ^ "/..")) - ) paths; - - let paths = g#aug_match "/files/etc/securetty/*" in - let paths = Array.to_list paths in - List.iter ( - fun path -> - let tty = g#aug_get path in - if tty = "xvc0" || tty = "hvc0" then - ignore (g#aug_rm path) - ) paths; - - g#aug_save () - - and supports_acpi () = - (* ACPI known to cause RHEL 3 to fail. *) - if family = `RHEL_family && inspect.i_major_version == 3 then - false - else - true - - and configure_display_driver video = - let video_driver = match video with QXL -> "qxl" | Cirrus -> "cirrus" in - - let updated = ref false in - - let xorg_conf = - if not (g#is_file ~followsymlinks:true "/etc/X11/xorg.conf") && - g#is_file ~followsymlinks:true "/etc/X11/XF86Config" - then ( - g#aug_set "/augeas/load/Xorg/incl[last()+1]" "/etc/X11/XF86Config"; - g#aug_load (); - "/etc/X11/XF86Config" - ) - else - "/etc/X11/xorg.conf" in - - let paths = g#aug_match ("/files" ^ xorg_conf ^ "/Device/Driver") in - Array.iter ( - fun path -> - g#aug_set path video_driver; - updated := true - ) paths; - - (* Remove VendorName and BoardName if present. *) - let paths = g#aug_match ("/files" ^ xorg_conf ^ "/Device/VendorName") in - Array.iter (fun path -> ignore (g#aug_rm path)) paths; - let paths = g#aug_match ("/files" ^ xorg_conf ^ "/Device/BoardName") in - Array.iter (fun path -> ignore (g#aug_rm path)) paths; - - g#aug_save (); - - (* If we updated the X driver, check that X itself is installed, - * and warn if not. Old virt-v2v used to attempt to install X here - * but that way lies insanity and ruin. - *) - if !updated && - not (g#is_file ~followsymlinks:true "/usr/bin/X") && - not (g#is_file ~followsymlinks:true "/usr/bin/X11/X") then - warning (f_"The display driver was updated to ‘%s’, but X11 does not seem to be installed in the guest. X may not function correctly.") - video_driver - - and configure_kernel_modules block_type net_type = - (* This function modifies modules.conf (and its various aliases). *) - - let augeas_modprobe query = - (* Execute g#aug_match, but against every known location of - modules.conf. *) - let paths = [ - "/files/etc/conf.modules/alias"; (* modules_conf.aug *) - "/files/etc/modules.conf/alias"; - "/files/etc/modprobe.conf/alias"; (* modprobe.aug *) - "/files/etc/modprobe.conf.local/alias"; - "/files/etc/modprobe.d/*/alias"; - ] in - let paths = - List.map ( - fun p -> - let p = sprintf "%s[%s]" p query in - Array.to_list (g#aug_match p) - ) paths in - List.flatten paths - - and discover_modpath () = - (* Find what /etc/modprobe.conf is called today. *) - if g#is_dir ~followsymlinks:true "/etc/modprobe.d" then ( - (* Create a new file /etc/modprobe.d/virt-v2v-added.conf. *) - "/etc/modprobe.d/virt-v2v-added.conf" - ) else ( - (* List of methods, in order of preference. *) - let paths = [ - "/etc/modprobe.conf.local"; - "/etc/modprobe.conf"; - "/etc/modules.conf"; - "/etc/conf.modules" - ] in - try List.find (g#is_file ~followsymlinks:true) paths - with Not_found -> - error (f_"unable to find any valid modprobe configuration file such as /etc/modprobe.conf"); - ) - in - - (* Update 'alias eth0 ...'. *) - let paths = augeas_modprobe ". =~ regexp('eth[0-9]+')" in - let net_device = - match net_type with - | Virtio_net -> "virtio_net" - | E1000 -> "e1000" - | RTL8139 -> "rtl8139cp" - in - - List.iter ( - fun path -> g#aug_set (path ^ "/modulename") net_device - ) paths; - - (* Update 'alias scsi_hostadapter ...' *) - let paths = augeas_modprobe ". =~ regexp('scsi_hostadapter.*')" in - (match block_type with - | Virtio_blk | Virtio_SCSI -> - let block_module = - match block_type with - | Virtio_blk -> "virtio_blk" - | Virtio_SCSI -> "virtio_scsi" - | IDE -> assert false in - - if paths <> [] then ( - (* There's only 1 scsi controller in the converted guest. - * Convert only the first scsi_hostadapter entry to virtio - * and delete other scsi_hostadapter entries. - *) - let path, paths_to_delete = List.hd paths, List.tl paths in - - (* Note that we delete paths in reverse order. This means we don't - * have to worry about alias indices being changed. - *) - List.iter (fun path -> ignore (g#aug_rm path)) - (List.rev paths_to_delete); - - g#aug_set (path ^ "/modulename") block_module - ) else ( - (* We have to add a scsi_hostadapter. *) - let modpath = discover_modpath () in - g#aug_set (sprintf "/files%s/alias[last()+1]" modpath) - "scsi_hostadapter"; - g#aug_set (sprintf "/files%s/alias[last()]/modulename" modpath) - block_module - ) - | IDE -> - (* There is no scsi controller in an IDE guest. *) - List.iter (fun path -> ignore (g#aug_rm path)) (List.rev paths) - ); - - (* Display a warning about any leftover Xen modules which we - * haven't converted. These are likely to cause an error when - * we run mkinitrd. - *) - let xen_modules = [ "xennet"; "xen-vnif"; "xenblk"; "xen-vbd" ] in - let query = - "modulename =~ regexp('" ^ String.concat "|" xen_modules ^ "')" in - let paths = augeas_modprobe query in - List.iter ( - fun path -> - let device = g#aug_get path in - let module_ = g#aug_get (path ^ "/modulename") in - warning (f_"don’t know how to update %s which loads the %s module") - device module_; - ) paths; - - (* Update files. *) - g#aug_save () - - and remap_block_devices block_type = - (* This function's job is to iterate over boot configuration - * files, replacing "hda" with "vda" or whatever is appropriate. - * This is mostly applicable to old guests, since newer OSes use - * LABEL or UUID where possible. - * - * The original Convert::Linux::_remap_block_devices function was - * very complex indeed. This drops most of the complexity. In - * particular it assumes all non-removable source disks will be - * added to the target in the order they appear in the libvirt XML. - *) - let ide_block_prefix = - match family, inspect.i_major_version with - | `RHEL_family, v when v < 5 -> - (* RHEL < 5 used old ide driver *) "hd" - | `RHEL_family, 5 -> - (* RHEL 5 uses libata, but udev still uses: *) "hd" - | `SUSE_family, _ -> - (* SUSE uses libata, but still presents IDE disks as: *) "hd" - | _, _ -> - (* All modern distros use libata: *) "sd" in - - let block_prefix_after_conversion = - match block_type with - | Virtio_blk -> "vd" - | Virtio_SCSI -> "sd" - | IDE -> ide_block_prefix in - - let map = - List.mapi ( - fun i disk -> - let block_prefix_before_conversion = - match disk.s_controller with - | Some Source_IDE -> ide_block_prefix - | Some (Source_virtio_SCSI | Source_SCSI | Source_SATA) -> "sd" - | Some Source_virtio_blk -> "vd" - | None -> - (* This is basically a guess. It assumes the source used IDE. *) - ide_block_prefix in - let source_dev = block_prefix_before_conversion ^ drive_name i in - let target_dev = block_prefix_after_conversion ^ drive_name i in - source_dev, target_dev - ) source_disks in - - (* If a Xen guest has non-PV devices, Xen also simultaneously - * presents these as xvd devices. i.e. hdX and xvdX both exist and - * are the same device. - * - * This mapping is also useful for P2V conversion of Citrix - * Xenserver guests done in HVM mode. Disks are detected as sdX, - * although the guest uses xvdX natively. - *) - let map = map @ - List.mapi ( - fun i disk -> - "xvd" ^ drive_name i, block_prefix_after_conversion ^ drive_name i - ) source_disks in - - if verbose () then ( - eprintf "block device map:\n"; - List.iter ( - fun (source_dev, target_dev) -> - eprintf "\t%s\t-> %s\n" source_dev target_dev - ) (List.sort (fun (a,_) (b,_) -> compare a b) map); - flush stderr - ); - - (* Possible Augeas paths to search for device names. *) - let paths = [ - (* /etc/fstab *) - "/files/etc/fstab/*/spec"; - ] in - (* Bootloader config *) - let paths = paths @ bootloader#augeas_device_patterns in - - (* Which of these paths actually exist? *) - let paths = - List.flatten (List.map Array.to_list (List.map g#aug_match paths)) in - - (* Map device names for each entry. *) - let rex_resume = PCRE.compile "^resume=(/dev/[-a-z\\d/_]+)(.*)$" - and rex_device_cciss = PCRE.compile "^/dev/(cciss/c\\d+d\\d+)(?:p(\\d+))?$" - and rex_device = PCRE.compile "^/dev/([a-z]+)(\\d*)?$" in - - let rec replace_if_device path value = - let replace device = - try List.assoc device map - with Not_found -> - if not (String.is_prefix device "md") && - not (String.is_prefix device "fd") && - not (String.is_prefix device "sr") && - not (String.is_prefix device "scd") && - device <> "cdrom" then - warning (f_"%s references unknown device \"%s\". You may have to fix this entry manually after conversion.") - path device; - device - in - - if PCRE.matches rex_device_cciss value then ( - let device = PCRE.sub 1 - and part = try PCRE.sub 2 with Not_found -> "" in - "/dev/" ^ replace device ^ part - ) - else if PCRE.matches rex_device value then ( - let device = PCRE.sub 1 - and part = try PCRE.sub 2 with Not_found -> "" in - "/dev/" ^ replace device ^ part - ) - else (* doesn't look like a known device name *) - value - in - - let changed = ref false in - List.iter ( - fun path -> - let value = g#aug_get path in - let new_value = - if String.find path "GRUB_CMDLINE" >= 0 then ( - (* Handle grub2 resume= specially. *) - let rec loop str = - let index = String.find str "resume=" in - if index >= 0 then ( - let part = String.sub str index (String.length str - index) in - if PCRE.matches rex_resume part then ( - let start = String.sub str 0 (index + 7 (* "resume=" *)) - and device = PCRE.sub 1 - and end_ = PCRE.sub 2 in - let device = replace_if_device path device in - start ^ device ^ loop end_ - ) - else str - ) - else str - in - loop value - ) - else - replace_if_device path value in - - if value <> new_value then ( - g#aug_set path new_value; - changed := true - ) - ) paths; - - if !changed then ( - g#aug_save (); - - (* Make sure the bootloader is up-to-date. *) - bootloader#update (); - - Linux.augeas_reload g - ); - - (* Delete blkid caches if they exist, since they will refer to the old - * device names. blkid will rebuild these on demand. - * - * Delete the LVM cache since it will contain references to the - * old devices (RHBZ#1164853). - *) - List.iter g#rm_f [ - "/etc/blkid/blkid.tab"; "/etc/blkid.tab"; - "/etc/lvm/cache/.cache" - ]; - in - - do_convert () - -(* Register this conversion module. *) -let () = - let matching = function - | { i_type = "linux"; - i_distro = ("fedora" - | "rhel" | "centos" | "scientificlinux" | "redhat-based" - | "oraclelinux" - | "sles" | "suse-based" | "opensuse" - | "debian" | "ubuntu" | "linuxmint" | "kalilinux") } -> true - | _ -> false - in - Modules_list.register_convert_module matching "linux" convert diff --git a/v2v/convert_linux.mli b/v2v/convert_linux.mli deleted file mode 100644 index 6f19728f1..000000000 --- a/v2v/convert_linux.mli +++ /dev/null @@ -1,27 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Convert a Linux guest to run on KVM. - - This module converts certain Enterprise Linux guests to run on - KVM. RHEL, SuSE, Fedora, CentOS, OracleLinux, Debian, Ubuntu, - Mint and Kali are supported by this module. - - No functions are exported. When the module is linked to virt-v2v - it registers itself with - {!Modules_list.register_convert_module}. *) diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml deleted file mode 100644 index 5b7a5bfe9..000000000 --- a/v2v/convert_windows.ml +++ /dev/null @@ -1,810 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Utils -open Types - -module G = Guestfs - -(* Convert Windows guests. - * - * This only does a "pre-conversion", the steps needed to get the - * Windows guest to boot on KVM. Unlike the [Convert_linux] module, - * this is not a full conversion. Instead it just installs the - * [viostor] (Windows virtio block) driver, so that the Windows guest - * will be able to boot on the target. A [RunOnce] script is also - * added to the VM which does all the rest of the conversion the first - * time the Windows VM is booted on KVM. - *) - -let convert (g : G.guestfs) inspect _ output rcaps static_ips = - (*----------------------------------------------------------------------*) - (* Inspect the Windows guest. *) - - (* If the Windows guest appears to be using group policy. - * - * Since this was written, it has been noted that it may be possible - * to remove this restriction: - * - * 12:35 < StenaviN> here is the article from MS: https://support.microsoft.com/uk-ua/help/2773300/stop-0x0000007b-error-after-you-use-a-group-policy-setting-to-prevent - * 12:35 < StenaviN> aside of that the following registry hive should be deleted as well: [-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall] - * 12:36 < StenaviN> more precisely, [-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions] - *) - let has_group_policy = - Registry.with_hive_readonly g inspect.i_windows_software_hive - (fun reg -> - try - let path = ["Microsoft"; "Windows"; "CurrentVersion"; - "Group Policy"; "History"] in - let node = - match Registry.get_node reg path with - | None -> raise Not_found - | Some node -> node in - let children = g#hivex_node_children node in - let children = Array.to_list children in - let children = - List.map (fun { G.hivex_node_h = h } -> g#hivex_node_name h) - children in - (* Just assume any children looking like "{}" mean that - * some GPOs were installed. - * - * In future we might want to look for nodes which match: - * History\{}\ where is a small integer (the order - * in which policy objects were applied. - * - * For an example registry containing GPOs, see RHBZ#1219651. - * See also: https://support.microsoft.com/en-us/kb/201453 - *) - let is_gpo_guid name = - let len = String.length name in - len > 3 && name.[0] = '{' && - Char.isxdigit name.[1] && name.[len-1] = '}' - in - List.exists is_gpo_guid children - with - Not_found -> false - ) in - - (* If the Windows guest has AV installed. *) - let has_antivirus = Windows.detect_antivirus inspect in - - (* Open the software hive (readonly) and find the Xen PV uninstaller, - * if it exists. - *) - let xenpv_uninst = - let xenpvreg = "Red Hat Paravirtualized Xen Drivers for Windows(R)" in - - Registry.with_hive_readonly g inspect.i_windows_software_hive - (fun reg -> - try - let path = ["Microsoft"; "Windows"; "CurrentVersion"; "Uninstall"; - xenpvreg] in - let node = - match Registry.get_node reg path with - | None -> raise Not_found - | Some node -> node in - let uninstkey = "UninstallString" in - let valueh = g#hivex_node_get_value node uninstkey in - if valueh = 0L then ( - warning (f_"cannot uninstall Xen PV drivers: registry key ‘HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s’ does not contain an ‘%s’ key") - xenpvreg uninstkey; - raise Not_found - ); - let data = g#hivex_value_value valueh in - let data = Registry.decode_utf16le data in - - (* The uninstall program will be uninst.exe. This is a wrapper - * around _uninst.exe which prompts the user. As we don't want - * the user to be prompted, we run _uninst.exe explicitly. - *) - let len = String.length data in - let data = - if len >= 8 && - String.lowercase_ascii (String.sub data (len-8) 8) = "uninst.exe" - then - (String.sub data 0 (len-8)) ^ "_uninst.exe" - else - data in - - Some data - with - Not_found -> None - ) in - - (* Locate and retrieve all the uninstallation commands for installed - * applications. - *) - let unistallation_commands pretty_name matchfn extra_uninstall_string = - let uninsts = ref [] in - - Registry.with_hive_readonly g inspect.i_windows_software_hive - (fun reg -> - try - let path = ["Microsoft"; "Windows"; "CurrentVersion"; "Uninstall"] in - let node = - match Registry.get_node reg path with - | None -> raise Not_found - | Some node -> node in - let uninstnodes = g#hivex_node_children node in - - Array.iter ( - fun { G.hivex_node_h = uninstnode } -> - try - let valueh = g#hivex_node_get_value uninstnode "DisplayName" in - if valueh = 0L then - raise Not_found; - - let dispname = g#hivex_value_string valueh in - if not (matchfn dispname) then - raise Not_found; - - let uninstval = "UninstallString" in - let valueh = g#hivex_node_get_value uninstnode uninstval in - if valueh = 0L then ( - let name = g#hivex_node_name uninstnode in - warning (f_"cannot uninstall %s: registry key ‘HKLM\\SOFTWARE\\%s\\%s’ with DisplayName ‘%s’ doesn't contain value ‘%s’") - pretty_name (String.concat "\\" path) name dispname uninstval; - raise Not_found - ); - - let uninst = (g#hivex_value_string valueh) ^ - " /quiet /norestart /l*v+ \"%~dpn0.log\"" ^ - " REBOOT=ReallySuppress REMOVE=ALL" in - let uninst = - match extra_uninstall_string with - | None -> uninst - | Some s -> uninst ^ " " ^ s in - - List.push_front uninst uninsts - with - Not_found -> () - ) uninstnodes - with - Not_found -> () - ); - - !uninsts - in - - (* Locate and retrieve all uninstallation commands for Parallels Tools. *) - let prltools_uninsts = - let matchfn s = - String.find s "Parallels Tools" != -1 || - String.find s "Virtuozzo Tools" != -1 - in - (* Without these custom Parallels-specific MSI properties the - * uninstaller still shows a no-way-out reboot dialog. - *) - let extra_uninstall_string = - Some "PREVENT_REBOOT=Yes LAUNCHED_BY_SETUP_EXE=Yes" in - unistallation_commands "Parallels Tools" matchfn extra_uninstall_string in - - (* Locate and retrieve all uninstallation commands for VMware Tools. *) - let vmwaretools_uninst = - let matchfn s = - String.find s "VMware Tools" != -1 - in - unistallation_commands "VMware Tools" matchfn None in - - (*----------------------------------------------------------------------*) - (* Perform the conversion of the Windows guest. *) - - let rec do_convert () = - (* Firstboot configuration. *) - configure_firstboot (); - - (* Open the system hive for writes and update it. *) - let block_driver, - net_driver, - video_driver, - virtio_rng_supported, - virtio_ballon_supported, - isa_pvpanic_supported = - Registry.with_hive_write g inspect.i_windows_system_hive - update_system_hive in - - (* Open the software hive for writes and update it. *) - Registry.with_hive_write g inspect.i_windows_software_hive - update_software_hive; - - configure_network_interfaces net_driver; - - fix_ntfs_heads (); - - fix_win_esp (); - - (* Warn if installation of virtio block drivers might conflict with - * group policy or AV software causing a boot 0x7B error (RHBZ#1260689). - *) - if block_driver = Virtio_blk then ( - if has_group_policy then - warning (f_"this guest has Windows Group Policy Objects (GPO) and a new virtio block device driver was installed. In some circumstances, Group Policy may prevent new drivers from working (resulting in a 7B boot error). If this happens, try disabling Group Policy before doing the conversion."); - if has_antivirus then - warning (f_"this guest has Anti-Virus (AV) software and a new virtio block device driver was installed. In some circumstances, AV may prevent new drivers from working (resulting in a 7B boot error). If this happens, try disabling AV before doing the conversion."); - ); - - (* XXX Look up this information in libosinfo in future. *) - let machine = - match inspect.i_arch with - | "i386"|"x86_64" -> I440FX - | _ -> Virt in - - (* Return guest capabilities from the convert () function. *) - let guestcaps = { - gcaps_block_bus = block_driver; - gcaps_net_bus = net_driver; - gcaps_video = video_driver; - gcaps_virtio_rng = virtio_rng_supported; - gcaps_virtio_balloon = virtio_ballon_supported; - gcaps_isa_pvpanic = isa_pvpanic_supported; - gcaps_machine = machine; - gcaps_arch = Utils.kvm_arch inspect.i_arch; - gcaps_acpi = true; - } in - - guestcaps - - and configure_firstboot () = - (* Note that pnp_wait.exe must be the first firstboot script as it - * suppresses PnP for all following scripts. - *) - let tool_path = virt_tools_data_dir () // "pnp_wait.exe" in - if Sys.file_exists tool_path then - configure_wait_pnp tool_path - else - warning (f_"%s is missing. Firstboot scripts may conflict with PnP.") - tool_path; - - (* Install RHEV-APT only if appropriate for the output hypervisor. *) - if output#install_rhev_apt then ( - let tool_path = virt_tools_data_dir () // "rhev-apt.exe" in - if Sys.file_exists tool_path then - configure_rhev_apt tool_path - else - warning (f_"%s is missing, but the output hypervisor is oVirt or RHV. Installing RHEV-APT in the guest would mean the guest is automatically updated with new drivers etc. You may wish to install RHEV-APT manually after conversion.") - tool_path - ); - - (* Install VMDP unconditionally, if available, but don't - * warn about it if not. - *) - let tool_path = virt_tools_data_dir () // "vmdp.exe" in - if Sys.file_exists tool_path then - configure_vmdp tool_path; - - (* Install QEMU Guest Agent unconditionally and warn if missing *) - let qemu_ga_files = Windows_virtio.copy_qemu_ga g inspect in - if qemu_ga_files <> [] then - configure_qemu_ga qemu_ga_files - else - warning (f_"QEMU Guest Agent MSI not found on tools ISO/directory. You may want to install the guest agent manually after conversion."); - - unconfigure_xenpv (); - unconfigure_prltools (); - unconfigure_vmwaretools () - - (* [set_reg_val_dword_1 path name] creates a registry key - * called [name = dword:1] in the registry [path]. - * Intermediate nodes are created along the path if required. - * - * It returns the old value, if there was one, else [None]. - *) - and set_reg_val_dword_1 ((g, root) as reg) path name = - let node = Registry.create_path reg path in - let valueh = g#hivex_node_get_value node name in - let value = - match valueh with - | 0L -> None - | _ -> Some (int_of_le32 (g#hivex_value_value valueh)) in - g#hivex_node_set_value node name 4_L (le32_of_int 1_L); - value - - and reg_restore key name value = - let strkey = String.concat "\\" key in - match value with - | Some value -> sprintf "\ -reg add \"%s\" /v %s /t REG_DWORD /d %Ld /f" strkey name value - | None -> sprintf "\ -reg delete \"%s\" /v %s /f" strkey name - - and configure_wait_pnp tool_path = - (* Prevent destructive interactions of firstboot with PnP. *) - - (* Suppress "New Hardware Wizard" until PnP settles (see - * https://support.microsoft.com/en-us/kb/938596) and restore it - * afterwards. - *) - let reg_restore_str = - match inspect.i_major_version, inspect.i_minor_version with - (* WinXP 32bit *) - | 5, 1 -> - let key_path = ["Policies"; "Microsoft"; "Windows"; "DeviceInstall"; - "Settings"] in - let name = "SuppressNewHWUI" in - let value = - Registry.with_hive_write g inspect.i_windows_software_hive ( - fun reg -> set_reg_val_dword_1 reg key_path name - ) in - reg_restore ("HKLM\\Software" :: key_path) name value - - (* WinXP 64bit / Win2k3 *) - | 5, 2 -> - let key_path = ["Services"; "PlugPlay"; "Parameters"] in - let name = "SuppressUI" in - let value = - Registry.with_hive_write g inspect.i_windows_system_hive ( - fun reg -> - let path = inspect.i_windows_current_control_set :: key_path in - set_reg_val_dword_1 reg path name - ) in - reg_restore ("HKLM\\SYSTEM\\CurrentControlSet" :: key_path) name - value - - (* any later Windows *) - | _ -> "" in - - let pnp_wait_path = "/Program Files/Guestfs/Firstboot/pnp_wait.exe" in - - let fb_script = sprintf "\ -@echo off - -echo Wait for PnP to complete -\"%s\" >\"%%~dpn0.log\" 2>&1 -%s" (String.replace_char pnp_wait_path '/' '\\') reg_restore_str in - - Firstboot.add_firstboot_script g inspect.i_root "wait pnp" fb_script; - (* add_firstboot_script has created the path already. *) - g#upload tool_path (g#case_sensitive_path pnp_wait_path) - - and configure_rhev_apt tool_path = - (* Configure RHEV-APT (the RHV guest agent). However if it doesn't - * exist just warn about it and continue. - *) - g#upload tool_path "/rhev-apt.exe"; (* XXX *) - - let fb_script = "\ -@echo off - -echo installing rhev-apt -\"\\rhev-apt.exe\" /S /v/qn /v/l*vx \"/v\\\"%cd%\\rhev-apt.log\\\"\" - -echo starting rhev-apt -net start rhev-apt -" in - Firstboot.add_firstboot_script g inspect.i_root - "configure rhev-apt" fb_script - - and configure_vmdp tool_path = - (* Configure VMDP if possible *) - g#upload tool_path "/vmdp.exe"; - - let fb_script = "\ -echo V2V first boot script started -echo Decompressing VMDP installer -\"\\vmdp.exe\" -pushd \"VMDP-*\" -echo Installing VMDP -setup.exe /eula_accepted /no_reboot -popd -" in - - let fb_recover_script = "\ -echo Finishing VMDP installation -if not exist VMDP-* ( - \"\\vmdp.exe\" -) -pushd \"VMDP-*\" -setup.exe /eula_accepted /no_reboot -popd -" in - - Firstboot.add_firstboot_script g inspect.i_root - "configure vmdp" fb_script; - - Firstboot.add_firstboot_script g inspect.i_root - "finish vmdp setup" fb_recover_script - - and configure_qemu_ga files = - List.iter ( - fun msi_path -> - let fb_script = "\ -echo Installing qemu-ga from " ^ msi_path ^ " -\"\\" ^ msi_path ^ "\" /qn /forcerestart /l+*vx \"%cd%\\qemu-ga.log\" -" in - Firstboot.add_firstboot_script g inspect.i_root - ("install " ^ msi_path) fb_script; - ) files - - - and unconfigure_xenpv () = - match xenpv_uninst with - | None -> () (* nothing to be uninstalled *) - | Some uninst -> - let fb_script = sprintf "\ -@echo off - -echo uninstalling Xen PV driver -\"%s\" -" uninst in - Firstboot.add_firstboot_script g inspect.i_root - "uninstall Xen PV" fb_script - - and unconfigure_prltools () = - List.iter ( - fun uninst -> - let fb_script = "\ -@echo off - -echo uninstalling Parallels guest tools -" ^ uninst ^ -(* ERROR_SUCCESS_REBOOT_REQUIRED == 3010 is OK too *) -" -if errorlevel 3010 exit /b 0 -" in - - Firstboot.add_firstboot_script g inspect.i_root - "uninstall Parallels tools" fb_script - ) prltools_uninsts - - and unconfigure_vmwaretools () = - List.iter ( - fun uninst -> - let fb_script = "\ -@echo off - -echo uninstalling VMware Tools -" ^ uninst ^ -(* ERROR_SUCCESS_REBOOT_REQUIRED == 3010 is OK too *) -" -if errorlevel 3010 exit /b 0 -" in - - Firstboot.add_firstboot_script g inspect.i_root - "uninstall VMware Tools" fb_script - ) vmwaretools_uninst - - and update_system_hive reg = - (* Update the SYSTEM hive. When this function is called the hive has - * already been opened as a hivex handle inside guestfs. - *) - disable_xenpv_win_drivers reg; - disable_prl_drivers reg; - disable_autoreboot reg; - Windows_virtio.install_drivers reg inspect rcaps - - and disable_xenpv_win_drivers reg = - (* Disable xenpv-win service (RHBZ#809273). *) - let services = - Registry.get_node reg - [inspect.i_windows_current_control_set; "Services"] in - - match services with - | None -> () - | Some services -> - let node = g#hivex_node_get_child services "rhelscsi" in - if node <> 0L then - g#hivex_node_set_value node "Start" 4_L (le32_of_int 4_L) - - and disable_prl_drivers reg = - (* Prevent Parallels drivers from loading at boot. *) - let services = - Registry.get_node reg - [inspect.i_windows_current_control_set; "Services"] in - let prl_svcs = [ "prl_boot"; "prl_dd"; "prl_eth5"; "prl_fs"; "prl_memdev"; - "prl_mouf"; "prl_pv32"; "prl_pv64"; "prl_scsi"; - "prl_sound"; "prl_strg"; "prl_tg"; "prl_time"; - "prl_uprof"; "prl_va" ] in - - match services with - | None -> () - | Some services -> - List.iter ( - fun svc -> - let svc_node = g#hivex_node_get_child services svc in - if svc_node <> 0L then ( - (* Disable the service rather than delete the node as it would - * confuse the uninstaller called from firstboot script. *) - g#hivex_node_set_value svc_node "Start" 4_L (le32_of_int 4_L) - ) - ) prl_svcs; - - (* perfrom the equivalent of DelReg from prl_strg.inf: - * HKLM, System\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}, LowerFilters, 0x00018002, prl_strg - *) - let strg_cls = Registry.get_node reg - [inspect.i_windows_current_control_set; - "Control"; "Class"; - "{4d36e967-e325-11ce-bfc1-08002be10318}"] in - match strg_cls with - | None -> () - | Some strg_cls -> - let lfkey = "LowerFilters" in - let valueh = g#hivex_node_get_value strg_cls lfkey in - if valueh <> 0L then ( - let data = g#hivex_value_value valueh in - let filters = String.nsplit "\000" (Registry.decode_utf16le data) in - let filters = List.filter ( - fun x -> x <> "prl_strg" && x <> "" - ) filters in - let filters = List.map ( - fun x -> Registry.encode_utf16le x ^ "\000\000" - ) (filters @ [""]) in - let data = String.concat "" filters in - g#hivex_node_set_value strg_cls lfkey 7_L data - ) - - and disable_autoreboot reg = - (* If the guest reboots after a crash, it's hard to see the original - * error (eg. the infamous 0x0000007B). Turn off autoreboot. - *) - let crash_control = - Registry.get_node reg [inspect.i_windows_current_control_set; - "Control"; "CrashControl"] in - match crash_control with - | None -> () - | Some crash_control -> - g#hivex_node_set_value crash_control "AutoReboot" 4_L (le32_of_int 0_L) - - and update_software_hive reg = - (* Update the SOFTWARE hive. When this function is called the - * hive has already been opened as a hivex handle inside - * guestfs. - *) - - (* Find the node \Microsoft\Windows\CurrentVersion. If the node - * has a key called DevicePath then append the virtio driver - * path to this key. - * - * Note that simply adding the directory to DevicePath doesn't - * seem to be a 100% reliable way of enabling the drivers. In - * particular it does not work for my self-built Windows Server Core - * 2012 + R2 releases (although that might be an artifact of - * the way I build them). In any case I had to add a firstboot - * batch file which did this single command: - * - * %systemroot%\Sysnative\PnPutil -i -a %systemroot%\Drivers\Virtio\*.inf - *) - let node = - Registry.get_node reg ["Microsoft"; "Windows"; "CurrentVersion"] in - match node with - | Some node -> - let append = Registry.encode_utf16le ";%SystemRoot%\\Drivers\\VirtIO" in - let values = Array.to_list (g#hivex_node_values node) in - let rec loop = function - | [] -> () (* DevicePath not found -- ignore this case *) - | { G.hivex_value_h = valueh } :: values -> - let key = g#hivex_value_key valueh in - if key <> "DevicePath" then - loop values - else ( - let data = g#hivex_value_value valueh in - let len = String.length data in - let t = g#hivex_value_type valueh in - - (* Only add the appended path if it doesn't exist already. *) - if String.find data append = -1 then ( - (* Remove the explicit [\0\0] at the end of the string. - * This is the UTF-16LE NUL-terminator. - *) - let data = - if len >= 2 && String.sub data (len-2) 2 = "\000\000" then - String.sub data 0 (len-2) - else - data in - - (* Append the path and the explicit NUL. *) - let data = data ^ append ^ "\000\000" in - - g#hivex_node_set_value node key t data - ) - ) - in - loop values - | None -> - warning (f_"could not find registry key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion") - - and configure_network_interfaces net_driver = - (* If we were asked to force network interfaces to have particular - * static IP addresses then it is done here by installing a - * Powershell script which runs at boot. - *) - if static_ips <> [] then ( - let psh_filename = "v2vnetcf.ps1" in - let psh = ref [] in - let add = List.push_back psh in - - add "# Uncomment this line for lots of debug output."; - add "# Set-PSDebug -Trace 1"; - add ""; - - (* If virtio-net was added to the registry, we must wait for - * it to be installed at runtime. - *) - if net_driver = Virtio_net then ( - add "# Wait for the netkvm (virtio-net) driver to become active."; - add "$adapters = @()"; - add "While (-Not $adapters) {"; - add " Start-Sleep -Seconds 5"; - add " $adapters = Get-NetAdapter -Physical | Where DriverFileName -eq \"netkvm.sys\""; - add " Write-Host \"adapters = '$adapters'\""; - add "}"; - add "" - ); - - List.iter ( - fun { if_mac_addr; if_ip_address; if_default_gateway; - if_prefix_length; if_nameservers } -> - add (sprintf "$mac_address = '%s'" - (String.replace if_mac_addr ":" "-")); - add "$ifindex = (Get-NetAdapter -Physical | Where MacAddress -eq $mac_address).ifIndex"; - add "if ($ifindex) {"; - - add " Write-Host \"setting IP address of adapter at $ifindex\""; - - (* New-NetIPAddress command *) - let args = ref [] in - List.push_back args "-InterfaceIndex"; - List.push_back args "$ifindex"; - List.push_back args "-IPAddress"; - List.push_back args (sprintf "'%s'" if_ip_address); - (match if_default_gateway with - | None -> () - | Some gw -> - List.push_back args "-DefaultGateway"; - List.push_back args (sprintf "'%s'" gw) - ); - (match if_prefix_length with - | None -> () - | Some len -> - List.push_back args "-PrefixLength"; - List.push_back args (string_of_int len) - ); - let cmd1 = "New-NetIPAddress " ^ String.concat " " !args in - add (" " ^ cmd1); - - (* Set-DnsClientServerAddress command *) - if if_nameservers <> [] then ( - add (sprintf " Set-DnsClientServerAddress -InterfaceIndex $ifindex -ServerAddresses (%s)" - (String.concat "," (List.map (sprintf "'%s'") if_nameservers))) - ); - add "}"; - add "" - ) static_ips; - - (* Install the Powershell script to run at firstboot. *) - Windows.install_firstboot_powershell g inspect psh_filename !psh - ) (* static_ips <> [] *) - - and fix_ntfs_heads () = - (* NTFS hardcodes the number of heads on the drive which created - it in the filesystem header. Modern versions of Windows - sensibly ignore it, but both Windows XP and Windows 2000 - require it to be correct in order to boot from the drive. If it - isn't you get: - - 'A disk read error occurred. Press Ctrl+Alt+Del to restart' - - QEMU has some code in block.c:guess_disk_lchs() which on the face - of it appears to infer the drive geometry from the MBR if it's - valid. However, my tests have shown that a Windows XP guest - hosted on both RHEL 5 and F14 requires the heads field in NTFS to - be the following, based solely on drive size: - - Range Heads - size < 2114445312 0x40 - 2114445312 <= size < 4228374780 0x80 - 4228374780 <= size 0xFF - - I have not tested drive sizes less than 1G, which require fewer - heads, as this limitation applies only to the boot device and it - is not possible to install XP on a drive this size. - - The following page has good information on the layout of NTFS in - Windows XP/2000: - - http://mirror.href.com/thestarman/asm/mbr/NTFSBR.htm - - Technet has this: - - http://technet.microsoft.com/en-us/library/cc781134(WS.10).aspx#w2k3tr_ntfs_how_dhao - - however, as this is specific to Windows 2003 it lists location - 0x1A as unused. - *) - let rootpart = inspect.i_root in - - (* Ignore if the rootpart is something like /dev/sda. RHBZ#1276540. *) - if not (g#is_whole_device rootpart) then ( - (* Check that the root device contains NTFS magic. *) - let magic = g#pread_device rootpart 8 3L in - if magic = "NTFS " then ( - (* Get the size of the whole disk containing the root partition. *) - let rootdev = g#part_to_dev rootpart in (* eg. /dev/sda *) - let size = g#blockdev_getsize64 rootdev in - - let heads = (* refer to the table above *) - if size < 2114445312L then 0x40 - else if size < 4228374780L then 0x80 - else 0xff in - - (* Update NTFS's idea of the number of heads. This is an - * unsigned 16 bit little-endian integer, offset 0x1a from the - * beginning of the partition. - *) - let b = Bytes.create 2 in - Bytes.unsafe_set b 0 (Char.chr heads); - Bytes.unsafe_set b 1 '\000'; - ignore (g#pwrite_device rootpart (Bytes.to_string b) 0x1a_L) - ) - ) - - and fix_win_esp () = - let fix_win_uefi_bcd esp_path = - try - let bcd_path = "/EFI/Microsoft/Boot/BCD" in - Registry.with_hive_write g (esp_path ^ bcd_path) ( - (* Remove the 'graphicsmodedisabled' key in BCD *) - fun reg -> - let path = ["Objects"; "{9dea862c-5cdd-4e70-acc1-f32b344d4795}"; - "Elements"; "23000003"] in - let boot_mgr_default_link = - match Registry.get_node reg path with - | None -> raise Not_found - | Some node -> node in - let current_boot_entry = g#hivex_value_string ( - g#hivex_node_get_value boot_mgr_default_link "Element") in - let path = ["Objects"; current_boot_entry; "Elements"; "16000046"] in - match Registry.get_node reg path with - | None -> raise Not_found - | Some graphics_mode_disabled -> - g#hivex_node_delete_child graphics_mode_disabled - ); - with - Not_found -> () - in - - match inspect.i_firmware with - | I_BIOS -> () - | I_UEFI esp_list -> - let esp_temp_path = g#mkdtemp "/Windows/Temp/ESP_XXXXXX" in - - List.iter ( - fun dev_path -> - g#mount dev_path esp_temp_path; - fix_win_uefi_bcd esp_temp_path; - g#umount esp_temp_path; - ) esp_list; - - g#rmdir esp_temp_path - in - - do_convert () - -(* Register this conversion module. *) -let () = - let matching = function - | { i_type = "windows" } -> true - | _ -> false - in - Modules_list.register_convert_module matching "windows" convert diff --git a/v2v/convert_windows.mli b/v2v/convert_windows.mli deleted file mode 100644 index f9b16b830..000000000 --- a/v2v/convert_windows.mli +++ /dev/null @@ -1,25 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Convert a Windows guest to run on KVM. - - This module converts a Windows guest to run on KVM. - - No functions are exported. When the module is linked to virt-v2v - it registers itself with {!Modules_list.register_convert_module}, - accepting any guest with inspection type ["windows"]. *) diff --git a/v2v/copy_to_local.ml b/v2v/copy_to_local.ml deleted file mode 100644 index e841b44c5..000000000 --- a/v2v/copy_to_local.ml +++ /dev/null @@ -1,319 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* The separate virt-v2v-copy-to-local tool. *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext -open Getopt.OptionName - -open Utils -open Xpath_helpers - -type source_t = Xen_ssh of string | ESXi of string | Test - -let rec main () = - let input_conn = ref None in - let password_file = ref None in - - let set_string_option_once optname optref arg = - match !optref with - | Some _ -> - error (f_"%s option used more than once on the command line") optname - | None -> - optref := Some arg - in - - (* Handle the command line. *) - let argspec = [ - [ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn), - s_"Libvirt URI"; - [ M"ip" ], Getopt.String ("file", set_string_option_once "-ip" password_file), - s_"Use password from file"; - [ L"password-file" ], Getopt.String ("file", set_string_option_once "--password-file" password_file), - s_"Use password from file"; - ] in - let args = ref [] in - let anon_fun s = List.push_front s args in - let usage_msg = - sprintf (f_"\ -%s: copy a remote guest to the local machine - -Copy the remote guest: - - virt-v2v-copy-to-local -ic xen+ssh://root@xen.example.com guest - - virt-v2v-copy-to-local -ic esx://esxi.example.com guest - -Then perform the conversion step: - - virt-v2v -i libvirtxml guest.xml -o local -os /var/tmp - -To clean up: - - rm guest.xml guest-disk* - -A short summary of the options is given below. For detailed help please -read the man page virt-v2v-copy-to-local(1). -") - prog in - let opthandle = create_standard_options argspec ~anon_fun usage_msg in - Getopt.parse opthandle.getopt; - - let args = !args in - let input_conn = !input_conn in - let password_file = !password_file in - - let input_conn = - match input_conn with - | None -> - error (f_"the -ic parameter is required") (* at the moment *) - | Some ic -> ic in - - (* Check this is a libvirt URI we can understand. *) - let parsed_uri = - try Xml.parse_uri input_conn - with Invalid_argument msg -> - error (f_"could not parse '-ic %s'. Original error message was: %s") - input_conn msg in - let source = - match parsed_uri.Xml.uri_server, parsed_uri.Xml.uri_scheme with - | Some server, Some "xen+ssh" -> (* Xen over SSH *) - Xen_ssh server - | Some server, Some "esx" -> (* esxi over https *) - ESXi server - - (* This is just for testing, and is not documented. *) - | None, Some "test" -> - Test - - (* We can probably extend this list in future. *) - | _ -> - error (f_"only copies from VMware ESXi or Xen over SSH are supported. See the virt-v2v-copy-to-local(1) manual page.") in - - (* We expect a single extra argument, which is the guest name. *) - let guest_name = - match args with - | [] -> - error (f_"missing guest name. See the virt-v2v-copy-to-local(1) manual page.") - | [arg] -> arg - | _ -> - error (f_"too many command line parameters. See the virt-v2v-copy-to-local(1) manual page.") in - - (* Print the version, easier than asking users to tell us. *) - debug "%s: %s %s (%s)" - prog Guestfs_config.package_name - Guestfs_config.package_version Guestfs_config.host_cpu; - - (* Get the remote libvirt XML. *) - message (f_"Fetching the remote libvirt XML metadata ..."); - let xml = - let auth = Libvirt_utils.auth_for_password_file ?password_file () in - let conn = Libvirt.Connect.connect_auth ~name:input_conn auth in - let dom = Libvirt_utils.get_domain conn guest_name in - (* Use XmlSecure to get passwords (RHBZ#1174123). *) - Libvirt.Domain.get_xml_desc_flags dom [Libvirt.Domain.XmlSecure] in - - debug "libvirt XML from remote server:\n%s" xml; - - (* Get the disk remote paths from the XML. *) - message (f_"Parsing the remote libvirt XML metadata ..."); - let disks, dcpath, xml = parse_libvirt_xml guest_name xml in - - debug "libvirt XML after modifying for local disks:\n%s" xml; - - (* For VMware ESXi source, we have to massage the disk path. *) - let disks = - match source with - | ESXi server -> - let dcpath = - match dcpath with - | Some dcpath -> dcpath - | None -> - error (f_"vcenter: was not found in the XML. You need to upgrade to libvirt ≥ 1.2.20.") in - List.map ( - fun (remote_disk, local_disk) -> - let { VCenter.https_url; sslverify; session_cookie } = - VCenter.map_source dcpath parsed_uri server remote_disk in - debug "esxi: source disk %s (sslverify=%b)" https_url sslverify; - (https_url, local_disk, sslverify, session_cookie) - ) disks - | Test | Xen_ssh _ -> - List.map (fun (remote_disk, local_disk) -> - (remote_disk, local_disk, false, None)) disks in - - (* Delete the disks on exit, unless we finish everything OK. *) - let delete_on_exit = ref true in - at_exit ( - fun () -> - if !delete_on_exit then ( - List.iter ( - fun (_, local_disk, _, _) -> - try Unix.unlink local_disk with _ -> () - ) disks - ) - ); - - (* Copy the disks. *) - let n = List.length disks in - List.iteri ( - fun i (remote_disk, local_disk, sslverify, cookie) -> - message (f_"Copying remote disk %d/%d to %s") - (i+1) n local_disk; - - (* How we copy it depends on the source. *) - match source with - | Xen_ssh server -> - let { Xml.uri_user = user; uri_port = port } = parsed_uri in - - let cmd = - sprintf "set -o pipefail; ssh%s %s%s dd bs=1M if=%s | dd%s conv=sparse bs=1M of=%s" - (match port with - | n when n >= 1 -> sprintf " -p %d" n - | _ -> "") - (match user with - | None -> "" - | Some u -> sprintf "%s@" (quote u)) - server - (quote remote_disk) - (if quiet () then "" - else " status=progress") - (quote local_disk) in - if shell_command cmd <> 0 then - error (f_"ssh copy command failed, see earlier errors"); - - | ESXi _ -> - let curl_args = ref [ - "url", Some remote_disk; - "output", Some local_disk; - ] in - if not sslverify then List.push_back curl_args ("insecure", None); - (match cookie with - | None -> () - | Some cookie -> List.push_back curl_args ("cookie", Some cookie) - ); - if quiet () then List.push_back curl_args ("silent", None); - - let curl_h = Curl.create !curl_args in - if verbose () then - Curl.print stderr curl_h; - ignore (Curl.run curl_h) - - | Test -> - let cmd = [ "cp"; remote_disk; local_disk ] in - if run_command cmd <> 0 then - error (f_"copy command failed, see earlier errors"); - ) disks; - - let guest_xml = guest_name ^ ".xml" in - message (f_"Writing libvirt XML metadata to %s ...") guest_xml; - with_open_out guest_xml (fun chan -> output_string chan xml); - - (* Finished, so don't delete the disks on exit. *) - message (f_"Finishing off"); - delete_on_exit := false - -(* This is a greatly simplified version of the parsing function - * in virt-v2v parse_libvirt_xml.ml:parse_libvirt_xml - * It also modifies the XML elements to point to local disks. - *) -and parse_libvirt_xml guest_name xml = - (* Parse the XML. *) - let doc = Xml.parse_memory xml in - let xpathctx = Xml.xpath_new_context doc in - Xml.xpath_register_ns xpathctx - "vmware" "http://libvirt.org/schemas/domain/vmware/1.0"; - let xpath_string = xpath_string xpathctx in - - (* Get the dcpath, present in libvirt >= 1.2.20. *) - let dcpath = xpath_string "/domain/vmware:datacenterpath" in - - (* Parse the disks. *) - let get_disks, add_disk = - let disks = ref [] and i = ref 0 in - let get_disks () = List.rev !disks in - let add_disk remote_disk = - (* Generate a unique name for each output disk. *) - incr i; - let local_disk = sprintf "%s-disk%d" guest_name !i in - - List.push_front (remote_disk, local_disk) disks; - local_disk - in - get_disks, add_disk - in - - (* node is a node, containing a element. Update the - * node to point to a local file. - *) - let update_disk_node node local_disk = - Xml.set_prop node "type" "file"; - let obj = Xml.xpath_eval_expression xpathctx "source" in - let nr_nodes = Xml.xpathobj_nr_nodes obj in - assert (nr_nodes >= 1); - for i = 0 to nr_nodes-1 do - let source_node = Xml.xpathobj_node obj i in - ignore (Xml.unset_prop source_node "dev"); - Xml.set_prop source_node "file" local_disk - done - in - - let obj = - Xml.xpath_eval_expression xpathctx - "/domain/devices/disk[@device='disk']" in - let nr_nodes = Xml.xpathobj_nr_nodes obj in - if nr_nodes < 1 then - error (f_"this guest has no non-removable disks"); - - for i = 0 to nr_nodes-1 do - let node = Xml.xpathobj_node obj i in - Xml.xpathctx_set_current_context xpathctx node; - - (* The attribute may be 'block' or 'file'. - * We ignore any other types. - *) - match xpath_string "@type" with - | None -> - warning (f_" element with no type attribute ignored") - - | Some "block" -> - (match xpath_string "source/@dev" with - | Some path -> - let local_disk = add_disk path in - update_disk_node node local_disk - | None -> () - ); - | Some "file" -> - (match xpath_string "source/@file" with - | Some path -> - let local_disk = add_disk path in - update_disk_node node local_disk - | None -> () - ); - - | Some disk_type -> - warning (f_" was ignored") disk_type - done; - - let xml = Xml.to_string doc ~format:true in - get_disks (), dcpath, xml - -let () = run_main_and_handle_errors main diff --git a/v2v/copy_to_local.mli b/v2v/copy_to_local.mli deleted file mode 100644 index 23fb5791e..000000000 --- a/v2v/copy_to_local.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Nothing is exported. *) diff --git a/v2v/create_json.ml b/v2v/create_json.ml deleted file mode 100644 index fdf7b12f5..000000000 --- a/v2v/create_json.ml +++ /dev/null @@ -1,348 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Std_utils -open C_utils -open Tools_utils - -open Types -open Utils - -module G = Guestfs - -let json_list_of_string_list = - List.map (fun x -> JSON.String x) - -let json_list_of_string_string_list = - List.map (fun (x, y) -> x, JSON.String y) - -let push_optional_string lst name = function - | None -> () - | Some v -> List.push_back lst (name, JSON.String v) - -let push_optional_int lst name = function - | None -> () - | Some v -> List.push_back lst (name, JSON.Int (Int64.of_int v)) - -let json_unknown_string = function - | "unknown" -> JSON.Null - | v -> JSON.String v - -let find_target_disk targets { s_disk_id = id } = - try List.find (fun t -> t.target_overlay.ov_source.s_disk_id = id) targets - with Not_found -> assert false - -let create_json_metadata source targets target_buses - guestcaps inspect target_firmware = - let doc = ref [ - "version", JSON.Int 1L; - "name", JSON.String source.s_name; - "memory", JSON.Int source.s_memory; - "vcpu", JSON.Int (Int64.of_int source.s_vcpu); - ] in - - (match source.s_genid with - | None -> () - | Some genid -> List.push_back doc ("genid", JSON.String genid) - ); - - if source.s_cpu_vendor <> None || source.s_cpu_model <> None || - source.s_cpu_topology <> None then ( - let cpu = ref [] in - - push_optional_string cpu "vendor" source.s_cpu_vendor; - push_optional_string cpu "model" source.s_cpu_model; - (match source.s_cpu_topology with - | None -> () - | Some { s_cpu_sockets; s_cpu_cores; s_cpu_threads } -> - let attrs = [ - "sockets", JSON.Int (Int64.of_int s_cpu_sockets); - "cores", JSON.Int (Int64.of_int s_cpu_cores); - "threads", JSON.Int (Int64.of_int s_cpu_threads); - ] in - List.push_back cpu ("topology", JSON.Dict attrs) - ); - - List.push_back doc ("cpu", JSON.Dict !cpu); - ); - - let firmware = - let firmware_type = - match target_firmware with - | TargetBIOS -> "bios" - | TargetUEFI -> "uefi" in - - let fw = ref [ - "type", JSON.String firmware_type; - ] in - - (match target_firmware with - | TargetBIOS -> () - | TargetUEFI -> - let uefi_firmware = find_uefi_firmware guestcaps.gcaps_arch in - let flags = - List.map ( - function - | Uefi.UEFI_FLAG_SECURE_BOOT_REQUIRED -> "secure_boot_required" - ) uefi_firmware.Uefi.flags in - - let uefi = ref [ - "code", JSON.String uefi_firmware.Uefi.code; - "vars", JSON.String uefi_firmware.Uefi.vars; - "flags", JSON.List (json_list_of_string_list flags); - ] in - - push_optional_string uefi "code-debug" uefi_firmware.Uefi.code_debug; - - List.push_back fw ("uefi", JSON.Dict !uefi) - ); - - !fw in - List.push_back doc ("firmware", JSON.Dict firmware); - - List.push_back doc ("features", - JSON.List (json_list_of_string_list source.s_features)); - - let machine = - match guestcaps.gcaps_machine with - | I440FX -> "pc" - | Q35 -> "q35" - | Virt -> "virt" in - List.push_back doc ("machine", JSON.String machine); - - let disks, removables = - let disks = ref [] - and removables = ref [] in - - let iter_bus bus_name drive_prefix i = function - | BusSlotEmpty -> () - | BusSlotDisk d -> - (* Find the corresponding target disk. *) - let t = find_target_disk targets d in - - let target_file = - match t.target_file with - | TargetFile s -> s - | TargetURI _ -> assert false in - - let disk = [ - "dev", JSON.String (drive_prefix ^ drive_name i); - "bus", JSON.String bus_name; - "format", JSON.String t.target_format; - "file", JSON.String (absolute_path target_file); - ] in - - List.push_back disks (JSON.Dict disk) - - | BusSlotRemovable { s_removable_type = CDROM } -> - let cdrom = [ - "type", JSON.String "cdrom"; - "dev", JSON.String (drive_prefix ^ drive_name i); - "bus", JSON.String bus_name; - ] in - - List.push_back removables (JSON.Dict cdrom) - - | BusSlotRemovable { s_removable_type = Floppy } -> - let floppy = [ - "type", JSON.String "floppy"; - "dev", JSON.String (drive_prefix ^ drive_name i); - ] in - - List.push_back removables (JSON.Dict floppy) - in - - Array.iteri (iter_bus "virtio" "vd") target_buses.target_virtio_blk_bus; - Array.iteri (iter_bus "ide" "hd") target_buses.target_ide_bus; - Array.iteri (iter_bus "scsi" "sd") target_buses.target_scsi_bus; - Array.iteri (iter_bus "floppy" "fd") target_buses.target_floppy_bus; - - !disks, !removables in - List.push_back doc ("disks", JSON.List disks); - List.push_back doc ("removables", JSON.List removables); - - let nics = - List.map ( - fun { s_mac = mac; s_vnet_type = vnet_type; s_nic_model = nic_model; - s_vnet = vnet; } -> - let vnet_type_str = - match vnet_type with - | Bridge -> "bridge" - | Network -> "network" in - - let nic = ref [ - "vnet", JSON.String vnet; - "vnet-type", JSON.String vnet_type_str; - ] in - - let nic_model_str = Option.map string_of_nic_model nic_model in - push_optional_string nic "model" nic_model_str; - - push_optional_string nic "mac" mac; - - JSON.Dict !nic - ) source.s_nics in - List.push_back doc ("nics", JSON.List nics); - - let guestcaps_dict = - let block_bus = - match guestcaps.gcaps_block_bus with - | Virtio_blk -> "virtio-blk" - | Virtio_SCSI -> "virtio-scsi" - | IDE -> "ide" in - let net_bus = - match guestcaps.gcaps_net_bus with - | Virtio_net -> "virtio-net" - | E1000 -> "e1000" - | RTL8139 -> "rtl8139" in - let video = - match guestcaps.gcaps_video with - | QXL -> "qxl" - | Cirrus -> "cirrus" in - let machine = - match guestcaps.gcaps_machine with - | I440FX -> "i440fx" - | Q35 -> "q35" - | Virt -> "virt" in - - [ - "block-bus", JSON.String block_bus; - "net-bus", JSON.String net_bus; - "video", JSON.String video; - "machine", JSON.String machine; - "arch", JSON.String guestcaps.gcaps_arch; - "virtio-rng", JSON.Bool guestcaps.gcaps_virtio_rng; - "virtio-balloon", JSON.Bool guestcaps.gcaps_virtio_balloon; - "isa-pvpanic", JSON.Bool guestcaps.gcaps_isa_pvpanic; - "acpi", JSON.Bool guestcaps.gcaps_acpi; - ] in - List.push_back doc ("guestcaps", JSON.Dict guestcaps_dict); - - (match source.s_sound with - | None -> () - | Some { s_sound_model = model } -> - let sound = [ - "model", JSON.String (string_of_source_sound_model model); - ] in - List.push_back doc ("sound", JSON.Dict sound) - ); - - (match source.s_display with - | None -> () - | Some d -> - let display_type = - match d.s_display_type with - | Window -> "window" - | VNC -> "vnc" - | Spice -> "spice" in - - let display = ref [ - "type", JSON.String display_type; - ] in - - push_optional_string display "keymap" d.s_keymap; - push_optional_string display "password" d.s_password; - - let listen = - match d.s_listen with - | LNoListen -> None - | LAddress address -> - Some [ - "type", JSON.String "address"; - "address", JSON.String address; - ] - | LNetwork network -> - Some [ - "type", JSON.String "network"; - "network", JSON.String network; - ] - | LSocket None -> - Some [ - "type", JSON.String "socket"; - "socket", JSON.Null; - ] - | LSocket (Some socket) -> - Some [ - "type", JSON.String "socket"; - "socket", JSON.String socket; - ] - | LNone -> - Some [ - "type", JSON.String "none"; - ] in - (match listen with - | None -> () - | Some l -> List.push_back display ("listen", JSON.Dict l) - ); - - push_optional_int display "port" d.s_port; - - List.push_back doc ("display", JSON.Dict !display) - ); - - let inspect_dict = - let apps = - List.map ( - fun { G.app2_name = name; app2_display_name = display_name; - app2_epoch = epoch; app2_version = version; - app2_release = release; app2_arch = arch; } -> - JSON.Dict [ - "name", JSON.String name; - "display-name", JSON.String display_name; - "epoch", JSON.Int (Int64.of_int32 epoch); - "version", JSON.String version; - "release", JSON.String release; - "arch", JSON.String arch; - ] - ) inspect.i_apps in - - let firmware_dict = - match inspect.i_firmware with - | I_BIOS -> - [ - "type", JSON.String "bios"; - ] - | I_UEFI devices -> - [ - "type", JSON.String "uefi"; - "devices", JSON.List (json_list_of_string_list devices); - ] in - - [ - "root", JSON.String inspect.i_root; - "type", JSON.String inspect.i_type; - "distro", json_unknown_string inspect.i_distro; - "osinfo", json_unknown_string inspect.i_osinfo; - "arch", JSON.String inspect.i_arch; - "major-version", JSON.Int (Int64.of_int inspect.i_major_version); - "minor-version", JSON.Int (Int64.of_int inspect.i_minor_version); - "package-format", json_unknown_string inspect.i_package_format; - "package-management", json_unknown_string inspect.i_package_management; - "product-name", json_unknown_string inspect.i_product_name; - "product-variant", json_unknown_string inspect.i_product_variant; - "mountpoints", JSON.Dict (json_list_of_string_string_list inspect.i_mountpoints); - "applications", JSON.List apps; - "windows-systemroot", JSON.String inspect.i_windows_systemroot; - "windows-software-hive", JSON.String inspect.i_windows_software_hive; - "windows-system-hive", JSON.String inspect.i_windows_system_hive; - "windows-current-control-set", JSON.String inspect.i_windows_current_control_set; - "firmware", JSON.Dict firmware_dict; - ] in - List.push_back doc ("inspect", JSON.Dict inspect_dict); - - !doc diff --git a/v2v/create_json.mli b/v2v/create_json.mli deleted file mode 100644 index 6dbb6e48b..000000000 --- a/v2v/create_json.mli +++ /dev/null @@ -1,29 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Create JSON metadata for [-o json]. *) - -val create_json_metadata : Types.source -> Types.target list -> - Types.target_buses -> - Types.guestcaps -> - Types.inspect -> - Types.target_firmware -> - JSON.doc -(** [create_json_metadata source targets target_buses guestcaps - inspect target_firmware] creates the JSON with the majority - of the data that virt-v2v used for the conversion. *) diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml deleted file mode 100644 index dbc24315f..000000000 --- a/v2v/create_libvirt_xml.ml +++ /dev/null @@ -1,527 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open C_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils -open DOM - -let string_set_of_list = - List.fold_left (fun set x -> StringSet.add x set) StringSet.empty - -let find_target_disk targets { s_disk_id = id } = - try List.find (fun t -> t.target_overlay.ov_source.s_disk_id = id) targets - with Not_found -> assert false - -let get_osinfo_id = function - | { i_type = "linux"; i_distro = "rhel"; - i_major_version = major; i_minor_version = minor } -> - Some (sprintf "http://redhat.com/rhel/%d.%d" major minor) - - | { i_type = "linux"; i_distro = "centos"; - i_major_version = major; i_minor_version = minor } when major < 7 -> - Some (sprintf "http://centos.org/centos/%d.%d" major minor) - - | { i_type = "linux"; i_distro = "centos"; i_major_version = major } -> - Some (sprintf "http://centos.org/centos/%d.0" major) - - | { i_type = "linux"; i_distro = "sles"; - i_major_version = major; i_minor_version = 0; - i_product_name = product } when String.find product "Desktop" >= 0 -> - Some (sprintf "http://suse.com/sled/%d" major) - - | { i_type = "linux"; i_distro = "sles"; - i_major_version = major; i_minor_version = minor; - i_product_name = product } when String.find product "Desktop" >= 0 -> - Some (sprintf "http://suse.com/sled/%d.%d" major minor) - - | { i_type = "linux"; i_distro = "sles"; - i_major_version = major; i_minor_version = 0 } -> - Some (sprintf "http://suse.com/sles/%d" major) - - | { i_type = "linux"; i_distro = "sles"; - i_major_version = major; i_minor_version = minor } -> - Some (sprintf "http://suse.com/sles/%d.%d" major minor) - - | { i_type = "linux"; i_distro = "opensuse"; - i_major_version = major; i_minor_version = minor } -> - Some (sprintf "http://opensuse.org/opensuse/%d.%d" major minor) - - | { i_type = "linux"; i_distro = "debian"; i_major_version = major } -> - Some (sprintf "http://debian.org/debian/%d" major) - - | { i_type = "linux"; i_distro = "ubuntu"; - i_major_version = major; i_minor_version = minor } -> - Some (sprintf "http://ubuntu.com/ubuntu/%d.%02d" major minor) - - | { i_type = "linux"; i_distro = "fedora"; i_major_version = major } -> - Some (sprintf "http://fedoraproject.org/fedora/%d" major) - - | { i_type = "windows"; i_major_version = major; i_minor_version = minor } - when major < 4 -> - Some (sprintf "http://microsoft.com/win/%d.%d" major minor) - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 1 } -> - Some "http://microsoft.com/win/xp" - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_product_name = product } when String.find product "XP" >= 0 -> - Some "http://microsoft.com/win/xp" - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_product_name = product } when String.find product "R2" >= 0 -> - Some "http://microsoft.com/win/2k3r2" - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2 } -> - Some "http://microsoft.com/win/2k3" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 0; - i_product_variant = "Server" } -> - Some "http://microsoft.com/win/2k8" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 0 } -> - Some "http://microsoft.com/win/vista" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1; - i_product_variant = "Server" } -> - Some "http://microsoft.com/win/2k8r2" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1 } -> - Some "http://microsoft.com/win/7" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2; - i_product_variant = "Server" } -> - Some "http://microsoft.com/win/2k12" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2 } -> - Some "http://microsoft.com/win/8" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3; - i_product_variant = "Server" } -> - Some "http://microsoft.com/win/2k12r2" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3 } -> - Some "http://microsoft.com/win/8.1" - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_product_variant = "Server"; i_product_name = product } - when String.find product "2019" >= 0 -> - Some "http://microsoft.com/win/2k19" - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_product_variant = "Server" } -> - Some "http://microsoft.com/win/2k16" - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0 } -> - Some "http://microsoft.com/win/10" - - | { i_type = typ; i_distro = distro; - i_major_version = major; i_minor_version = minor; i_arch = arch; - i_product_name = product } -> - warning (f_"unknown guest operating system: %s %s %d.%d %s (%s)") - typ distro major minor arch product; - None - -let create_libvirt_xml ?pool source targets target_buses guestcaps - target_features target_firmware inspect = - (* The main body of the libvirt XML document. *) - let body = ref [] in - - List.push_back_list body [ - Comment generated_by; - e "name" [] [PCData source.s_name]; - ]; - - (match source.s_genid with - | None -> () - | Some genid -> List.push_back body (e "genid" [] [PCData genid]) - ); - - - (match get_osinfo_id inspect with - | None -> () - | Some osinfo_id -> - List.push_back_list body [ - e "metadata" [] [ - e "libosinfo:libosinfo" ["xmlns:libosinfo", "http://libosinfo.org/xmlns/libvirt/domain/1.0"] [ - e "libosinfo:os" ["id", osinfo_id] []; - ]; - ]; - ]; - ); - - let memory_k = source.s_memory /^ 1024L in - List.push_back_list body [ - e "memory" ["unit", "KiB"] [PCData (Int64.to_string memory_k)]; - e "currentMemory" ["unit", "KiB"] [PCData (Int64.to_string memory_k)]; - e "vcpu" [] [PCData (string_of_int source.s_vcpu)] - ]; - - if source.s_cpu_vendor <> None || source.s_cpu_model <> None || - source.s_cpu_topology <> None then ( - let cpu = ref [] in - - (match source.s_cpu_vendor, source.s_cpu_model with - | None, None - (* Avoid libvirt error: "CPU vendor specified without CPU model" *) - | Some _, None -> () - | None, Some model -> - List.push_back cpu (e "model" ["fallback", "allow"] [PCData model]) - | Some vendor, Some model -> - List.push_back_list cpu [ - e "vendor" [] [PCData vendor]; - e "model" ["fallback", "allow"] [PCData model] - ] - ); - (match source.s_cpu_topology with - | None -> () - | Some { s_cpu_sockets; s_cpu_cores; s_cpu_threads } -> - let topology_attrs = [ - "sockets", string_of_int s_cpu_sockets; - "cores", string_of_int s_cpu_cores; - "threads", string_of_int s_cpu_threads; - ] in - List.push_back cpu (e "topology" topology_attrs []) - ); - - List.push_back_list body [ e "cpu" [ "match", "minimum" ] !cpu ] - ); - - let uefi_firmware = - match target_firmware with - | TargetBIOS -> None - | TargetUEFI -> Some (find_uefi_firmware guestcaps.gcaps_arch) in - let machine, secure_boot_required = - match guestcaps.gcaps_machine, uefi_firmware with - | _, Some { Uefi.flags = flags } - when List.mem Uefi.UEFI_FLAG_SECURE_BOOT_REQUIRED flags -> - (* Force machine type to Q35 because PC does not support - * secure boot. We must remove this when we get the - * correct machine type from libosinfo in future. XXX - *) - Q35, true - | machine, _ -> - machine, false in - let smm = secure_boot_required in - - (* We have the machine features of the guest when it was on the - * source hypervisor (source.s_features). We have the acpi flag - * which tells us whether acpi is required by this guest - * (guestcaps.gcaps_acpi). And we have the set of hypervisor - * features supported by the target (target_features). Combine all - * this into a final list of features. - *) - let features = string_set_of_list source.s_features in - let target_features = string_set_of_list target_features in - - (* If the guest supports ACPI, add it to the output XML. Conversely - * if the guest does not support ACPI, then we must drop it. - * (RHBZ#1159258) - *) - let features = - if guestcaps.gcaps_acpi then - StringSet.add "acpi" features - else - StringSet.remove "acpi" features in - - (* Make sure we don't add any features which are not supported by - * the target hypervisor. - *) - let features = StringSet.inter(*section*) features target_features in - - (* But if the target supports apic or pae then we should add them - * anyway (old virt-v2v did this). - *) - let force_features = string_set_of_list ["apic"; "pae"] in - let force_features = - StringSet.inter(*section*) force_features target_features in - let features = StringSet.union features force_features in - - (* Add feature if UEFI requires it. Note that libvirt - * capabilities doesn't list this feature even if it is supported - * by qemu, so we have to blindly add it, which might cause libvirt - * to fail. (XXX) - *) - let features = if smm then StringSet.add "smm" features else features in - - let features = List.sort compare (StringSet.elements features) in - - List.push_back_list body [ - e "features" [] (List.map (fun s -> e s [] []) features); - ]; - - (* The section subelements. *) - let os_section = - let os = ref [] in - - let machine = - match machine with - | I440FX -> "pc" - | Q35 -> "q35" - | Virt -> "virt" in - - List.push_back os - (e "type" ["arch", guestcaps.gcaps_arch; - "machine", machine] - [PCData "hvm"]); - - let loader = - match uefi_firmware with - | None -> [] - | Some { Uefi.code = code; vars = vars_template } -> - let secure = - if secure_boot_required then [ "secure", "yes" ] else [] in - [ e "loader" (["readonly", "yes"; "type", "pflash"] @ secure) - [ PCData code ]; - e "nvram" ["template", vars_template] [] ] in - - List.push_back_list os loader; - !os in - - List.push_back_list body [ - e "os" [] os_section; - - e "on_poweroff" [] [PCData "destroy"]; - e "on_reboot" [] [PCData "restart"]; - e "on_crash" [] [PCData "restart"]; - ]; - - (* The devices. *) - let devices = ref [] in - - (* Fixed and removable disks. *) - let disks = - let make_disk bus_name drive_prefix i = function - | BusSlotEmpty -> Comment (sprintf "%s slot %d is empty" bus_name i) - - | BusSlotDisk d -> - (* Find the corresponding target disk. *) - let t = find_target_disk targets d in - - let target_file = - match t.target_file with - | TargetFile s -> s - | TargetURI _ -> assert false in - - e "disk" [ - "type", if pool = None then "file" else "volume"; - "device", "disk" - ] [ - e "driver" [ - "name", "qemu"; - "type", t.target_format; - "cache", "none" - ] []; - (match pool with - | None -> - e "source" [ - "file", absolute_path target_file; - ] [] - | Some pool -> - e "source" [ - "pool", pool; - "volume", Filename.basename target_file; - ] [] - ); - e "target" [ - "dev", drive_prefix ^ drive_name i; - "bus", bus_name; - ] []; - ] - - | BusSlotRemovable { s_removable_type = CDROM } -> - e "disk" [ "device", "cdrom"; "type", "file" ] [ - e "driver" [ "name", "qemu"; "type", "raw" ] []; - e "target" [ - "dev", drive_prefix ^ drive_name i; - "bus", bus_name - ] [] - ] - - | BusSlotRemovable { s_removable_type = Floppy } -> - e "disk" [ "device", "floppy"; "type", "file" ] [ - e "driver" [ "name", "qemu"; "type", "raw" ] []; - e "target" [ - "dev", drive_prefix ^ drive_name i; - ] [] - ] - in - - List.flatten [ - Array.to_list - (Array.mapi (make_disk "virtio" "vd") - target_buses.target_virtio_blk_bus); - Array.to_list - (Array.mapi (make_disk "ide" "hd") - target_buses.target_ide_bus); - Array.to_list - (Array.mapi (make_disk "scsi" "sd") - target_buses.target_scsi_bus); - Array.to_list - (Array.mapi (make_disk "floppy" "fd") - target_buses.target_floppy_bus) - ] in - List.push_back_list devices disks; - - let nics = - let net_model = - match guestcaps.gcaps_net_bus with - | Virtio_net -> "virtio" | E1000 -> "e1000" | RTL8139 -> "rtl8139" in - List.map ( - fun { s_mac = mac; s_vnet_type = vnet_type; - s_vnet = vnet; s_mapping_explanation = explanation } -> - let vnet_type_str = - match vnet_type with - | Bridge -> "bridge" | Network -> "network" in - - let nic = - let children = [ - e "source" [ vnet_type_str, vnet ] []; - e "model" [ "type", net_model ] []; - ] in - let children = - match explanation with - | Some explanation -> Comment explanation :: children - | None -> children in - e "interface" [ "type", vnet_type_str ] children in - - (match mac with - | None -> () - | Some mac -> - append_child (e "mac" [ "address", mac ] []) nic); - - nic - ) source.s_nics in - List.push_back_list devices nics; - - (* Same as old virt-v2v, we always add a display here even if it was - * missing from the old metadata. - *) - let video = - let video_model = - match guestcaps.gcaps_video with - | QXL -> e "model" [ "type", "qxl"; "ram", "65536" ] [] - | Cirrus -> e "model" [ "type", "cirrus"; "vram", "9216" ] [] in - append_attr ("heads", "1") video_model; - e "video" [] [ video_model ] in - List.push_back devices video; - - let graphics = - match source.s_display with - | None -> e "graphics" [ "type", "vnc" ] [] - | Some { s_display_type = Window } -> - e "graphics" [ "type", "sdl" ] [] - | Some { s_display_type = VNC } -> - e "graphics" [ "type", "vnc" ] [] - | Some { s_display_type = Spice } -> - e "graphics" [ "type", "spice" ] [] in - - (match source.s_display with - | Some { s_keymap = Some km } -> append_attr ("keymap", km) graphics - | Some { s_keymap = None } | None -> ()); - (match source.s_display with - | Some { s_password = Some pw } -> append_attr ("passwd", pw) graphics - | Some { s_password = None } | None -> ()); - (match source.s_display with - | Some { s_listen = listen } -> - (match listen with - | LNoListen -> () - | LAddress a -> - let sub = e "listen" [ "type", "address"; "address", a ] [] in - append_child sub graphics - | LNetwork n -> - let sub = e "listen" [ "type", "network"; "network", n ] [] in - append_child sub graphics - | LSocket s -> - let attrs = [ "type", "socket" ] @ - match s with None -> [] | Some s -> [ "socket", s ] in - let sub = e "listen" attrs [] in - append_child sub graphics - | LNone -> - let sub = e "listen" [ "type", "none" ] [] in - append_child sub graphics - ) - | None -> ()); - (match source.s_display with - | Some { s_port = Some p } -> - append_attr ("autoport", "no") graphics; - append_attr ("port", string_of_int p) graphics - | Some { s_port = None } | None -> - append_attr ("autoport", "yes") graphics; - append_attr ("port", "-1") graphics); - List.push_back devices graphics; - - let sound = - match source.s_sound with - | None -> [] - | Some { s_sound_model = model } -> - if qemu_supports_sound_card model then - [ e "sound" [ "model", string_of_source_sound_model model ] [] ] - else - [] in - List.push_back_list devices sound; - - (* Miscellaneous KVM devices. *) - if guestcaps.gcaps_virtio_rng then - List.push_back devices ( - e "rng" ["model", "virtio"] [ - (* XXX Using /dev/urandom requires libvirt >= 1.3.4. Libvirt - * was broken before that. - *) - e "backend" ["model", "random"] [PCData "/dev/urandom"] - ] - ); - (* For the balloon device, libvirt adds an implicit device - * unless we use model='none', hence this: - *) - List.push_back devices ( - e "memballoon" - ["model", - if guestcaps.gcaps_virtio_balloon then "virtio" else "none"] - [] - ); - if guestcaps.gcaps_isa_pvpanic then - List.push_back devices ( - e "panic" ["model", "isa"] [ - e "address" ["type", "isa"; "iobase", "0x505"] [] - ] - ); - - (* Standard devices added to every guest. *) - List.push_back_list devices [ - e "input" ["type", "tablet"; "bus", "usb"] []; - e "input" ["type", "mouse"; "bus", "ps2"] []; - e "console" ["type", "pty"] []; - ]; - - List.push_back_list body [ - e "devices" [] !devices; - ]; - - let doc : doc = - doc "domain" [ - "type", "kvm"; (* Always assume target is kvm? *) - ] !body in - - doc diff --git a/v2v/create_libvirt_xml.mli b/v2v/create_libvirt_xml.mli deleted file mode 100644 index f7250c832..000000000 --- a/v2v/create_libvirt_xml.mli +++ /dev/null @@ -1,29 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Create libvirt XML for [-o libvirt] and [-o local]. *) - -val create_libvirt_xml : ?pool:string -> Types.source -> Types.target list -> - Types.target_buses -> - Types.guestcaps -> string list -> - Types.target_firmware -> - Types.inspect -> - DOM.doc -(** [create_libvirt_xml ?pool source targets target_buses guestcaps - target_features target_firmware] creates the final libvirt XML - for the output hypervisor. *) diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml deleted file mode 100644 index 9aad5dd15..000000000 --- a/v2v/create_ovf.ml +++ /dev/null @@ -1,1008 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Create OVF and related files for RHV. *) - -open Unix -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils -open DOM - -type ovf_flavour = - | OVirt - | RHVExportStorageDomain - -let ovf_flavours = ["ovirt"; "rhvexp"] - -let ovf_flavour_of_string = function - | "ovirt" -> OVirt - | "rhvexp" -> RHVExportStorageDomain - | flav -> invalid_arg flav - -let ovf_flavour_to_string = function - | OVirt -> "ovirt" - | RHVExportStorageDomain -> "rhvexp" - -(* We set the creation time to be the same for all dates in - * all metadata files. All dates in OVF are UTC. - *) -let time = time () -let iso_time = - let tm = gmtime time in - sprintf "%04d/%02d/%02d %02d:%02d:%02d" - (tm.tm_year + 1900) (tm.tm_mon + 1) tm.tm_mday - tm.tm_hour tm.tm_min tm.tm_sec - -(* Guess vmtype based on the guest inspection data. *) -let get_vmtype = function - (* Special cases for RHEL 3 & RHEL 4. *) - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = (3|4); - i_product_name = product } - when String.find product "ES" >= 0 -> - `Server - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = (3|4); - i_product_name = product } - when String.find product "AS" >= 0 -> - `Server - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = (3|4) } -> - `Desktop - - (* For Windows (and maybe Linux in future, but it is not set now), - * use the i_product_variant field. - *) - | { i_product_variant = ("Server"|"Server Core"|"Embedded") } -> `Server - | { i_product_variant = "Client" } -> `Desktop - - (* If the product name has "Server" or "Desktop" in it, use that. *) - | { i_product_name = product } when String.find product "Server" >= 0 -> - `Server - - | { i_product_name = product } when String.find product "Desktop" >= 0 -> - `Desktop - - (* Otherwise return server, a safe choice. *) - | _ -> `Server - -(* Determine the ovf:OperatingSystemSection_Type from libguestfs - * inspection. See ovirt-engine sources, file: - * packaging/conf/osinfo-defaults.properties - * and also: - * https://bugzilla.redhat.com/show_bug.cgi?id=1219857#c9 - *) -and get_ostype = function - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = v; - i_arch = "i386" } when v <= 6 -> - sprintf "RHEL%d" v - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = v; - i_arch = "x86_64" } when v <= 6 -> - sprintf "RHEL%dx64" v - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = v; - i_arch = "x86_64" } (* when v >= 7 *) -> - sprintf "rhel_%dx64" v - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 6; - i_minor_version = min; i_arch = ("ppc64"|"ppc64le") } when min >= 9 -> - "rhel_6_9_plus_ppc64" - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 6; - i_arch = ("ppc64"|"ppc64le") } -> - "rhel_6_ppc64" - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 7; - i_arch = "ppc64" | "ppc64le" } -> - "rhel_7_ppc64" - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 7; - i_arch = "s390x" } -> - "rhel_7_s390x" - - | { i_type = "linux"; i_distro = "sles"; i_major_version = maj; - i_arch = "x86_64" } when maj >= 11 -> - "sles_11" - - | { i_type = "linux"; i_distro = "sles"; i_major_version = maj; - i_arch = ("ppc64"|"ppc64le") } when maj >= 11 -> - "sles_11_ppc64" - - | { i_type = "linux"; i_distro = "sles"; i_major_version = maj; - i_arch = "s390x" } when maj >= 12 -> - "sles_12_s390x" - - (* Only Debian 7 is available, so use it for any 7+ version. *) - | { i_type = "linux"; i_distro = "debian"; i_major_version = v } - when v >= 7 -> - "debian_7" - - (* Only Ubuntu 12.04 to 14.04 are available, so use them starting - * from 12.04, and 14.04 for anything after it. - *) - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v; - i_arch = "ppc64" | "ppc64le" } when v >= 14 -> - "ubuntu_14_04_ppc64" - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = maj; - i_arch = "s390x" } when maj >= 16 -> - "ubuntu_16_04_s390x" - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v } - when v >= 14 -> - "ubuntu_14_04" - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = maj; - i_minor_version = min } when maj >= 12 -> - sprintf "ubuntu_%d_%02d" maj min - - | { i_type = "linux"; i_arch = ("ppc64"|"ppc64le") } -> - "other_linux_ppc64" - - | { i_type = "linux"; i_arch = "s390x" } -> - "other_linux_s390x" - - | { i_type = "linux" } -> "OtherLinux" - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 1 } -> - "WindowsXP" (* no architecture differentiation of XP on RHV *) - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_product_name = product } when String.find product "XP" >= 0 -> - "WindowsXP" (* no architecture differentiation of XP on RHV *) - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_arch = "i386" } -> - "Windows2003" - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_arch = "x86_64" } -> - "Windows2003x64" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 0; - i_arch = "i386" } -> - "Windows2008" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 0; - i_arch = "x86_64" } -> - "Windows2008x64" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1; - i_arch = "i386" } -> - "Windows7" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1; - i_arch = "x86_64"; i_product_variant = "Client" } -> - "Windows7x64" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1; - i_arch = "x86_64" } -> - "Windows2008R2x64" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2; - i_arch = "i386" } -> - "windows_8" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2; - i_arch = "x86_64"; i_product_variant = "Client" } -> - "windows_8x64" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2; - i_arch = "x86_64" } -> - "windows_2012x64" - - (* Treat Windows 8.1 client like Windows 8. See: - * https://bugzilla.redhat.com/show_bug.cgi?id=1309580#c4 - *) - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3; - i_arch = "i386"; i_product_variant = "Client" } -> - "windows_8" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3; - i_arch = "x86_64"; i_product_variant = "Client" } -> - "windows_8x64" - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3; - i_arch = "x86_64" } -> - "windows_2012R2x64" - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_arch = "i386" } -> - "windows_10" - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_arch = "x86_64"; i_product_variant = "Client" } -> - "windows_10x64" - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_arch = "x86_64" } -> - "windows_2016x64" - - | { i_type = typ; i_distro = distro; - i_major_version = major; i_minor_version = minor; i_arch = arch; - i_product_name = product } -> - warning (f_"unknown guest operating system: %s %s %d.%d %s (%s)") - typ distro major minor arch product; - "Unassigned" - -(* Determine the ovirt:id attribute from libguestfs inspection. - * See ovirt-engine sources, file: - * packaging/conf/osinfo-defaults.properties - * and also: - * https://bugzilla.redhat.com/show_bug.cgi?id=1219857#c9 - *) -and get_ovirt_osid = function - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 3; - i_arch = "i386" } -> - 9 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 3; - i_arch = "x86_64" } -> - 15 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 4; - i_arch = "i386" } -> - 8 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 4; - i_arch = "x86_64" } -> - 14 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 5; - i_arch = "i386" } -> - 7 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 5; - i_arch = "x86_64" } -> - 13 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 6; - i_arch = "i386" } -> - 18 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 6; - i_arch = "x86_64" } -> - 19 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 6; - i_minor_version = min; i_arch = ("ppc64"|"ppc64le") } when min >= 9 -> - 1007 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 6; - i_arch = ("ppc64"|"ppc64le") } -> - 1003 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 7; - i_arch = "x86_64" } -> - 24 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 7; - i_arch = ("ppc64"|"ppc64le") } -> - 1006 - - | { i_type = "linux"; i_distro = ("rhel"|"centos"); i_major_version = 7; - i_arch = "s390x" } -> - 2003 - - | { i_type = "linux"; i_distro = "sles"; i_major_version = maj; - i_arch = "x86_64" } when maj >= 11 -> - 1193 - - | { i_type = "linux"; i_distro = "sles"; i_major_version = maj; - i_arch = ("ppc64"|"ppc64le") } when maj >= 11 -> - 1004 - - | { i_type = "linux"; i_distro = "sles"; i_major_version = maj; - i_arch = "s390x" } when maj >= 12 -> - 2004 - - (* Only Debian 7 is available, so use it for any 7+ version. *) - | { i_type = "linux"; i_distro = "debian"; i_major_version = v } - when v >= 7 -> - 1300 - - (* Only Ubuntu 12.04 to 14.04 are available, so use them starting - * from 12.04, and 14.04 for anything after it. - *) - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v; - i_arch = ("ppc64"|"ppc64le") } when v >= 14 -> - 1005 - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v; - i_arch = "s390x" } when v >= 16 -> - 2005 - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v } - when v >= 14 -> - 1256 - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = 12; - i_minor_version = 4 } -> - 1252 - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = 12; - i_minor_version = 10 } -> - 1253 - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = 13; - i_minor_version = 4 } -> - 1254 - - | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = 13; - i_minor_version = 10 } -> - 1255 - - | { i_type = "linux"; i_arch = ("ppc64"|"ppc64le") } -> - 1002 - - | { i_type = "linux"; i_arch = "s390x" } -> - 2002 - - | { i_type = "linux" } -> - 5 - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 1 } -> - 1 (* no architecture differentiation of XP on RHV *) - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_product_name = product } when String.find product "XP" >= 0 -> - 1 (* no architecture differentiation of XP on RHV *) - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_arch = "i386" } -> - 3 - - | { i_type = "windows"; i_major_version = 5; i_minor_version = 2; - i_arch = "x86_64" } -> - 10 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 0; - i_arch = "i386" } -> - 4 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 0; - i_arch = "x86_64" } -> - 16 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1; - i_arch = "i386" } -> - 11 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1; - i_arch = "x86_64"; i_product_variant = "Client" } -> - 12 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 1; - i_arch = "x86_64" } -> - 17 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2; - i_arch = "i386" } -> - 20 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2; - i_arch = "x86_64"; i_product_variant = "Client" } -> - 21 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 2; - i_arch = "x86_64" } -> - 23 - - (* Treat Windows 8.1 client like Windows 8. See: - * https://bugzilla.redhat.com/show_bug.cgi?id=1309580#c4 - *) - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3; - i_arch = "i386"; i_product_variant = "Client" } -> - 20 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3; - i_arch = "x86_64"; i_product_variant = "Client" } -> - 21 - - | { i_type = "windows"; i_major_version = 6; i_minor_version = 3; - i_arch = "x86_64" } -> - 25 - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_arch = "i386" } -> - 26 - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_arch = "x86_64"; i_product_variant = "Client" } -> - 27 - - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; - i_arch = "x86_64" } -> - 29 - - | { i_type = typ; i_distro = distro; - i_major_version = major; i_minor_version = minor; i_arch = arch; - i_product_name = product } -> - warning (f_"unknown guest operating system: %s %s %d.%d %s (%s)") - typ distro major minor arch product; - 0 - -(* Set the element based on the source hypervisor. - * https://bugzilla.redhat.com/show_bug.cgi?id=1342398#c6 - * https://gerrit.ovirt.org/#/c/59147/ - * ovirt-engine.git: backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/OriginType.java - *) -let origin_of_source_hypervisor = function - | VMware -> Some 1 - | Xen -> Some 2 - | QEmu | KVM -> Some 7 - | Physical -> Some 8 - | HyperV -> Some 9 - - (* Anything else is mapped to None, which causes the - * element to be omitted from the OVF output, which causes oVirt - * to select 0 as the source (which happens to display as "RHEV" - * in the UI). - *) - | _ -> None - -(* Set the element. Other possible values: - * 1 q35 + SeaBIOS - * 3 q35 + UEFI + Secure Boot - *) -let get_ovirt_biostype = function - | TargetBIOS -> 0 (* i440fx + SeaBIOS *) - | TargetUEFI -> 2 (* q35 + UEFI *) - -(* Generate the .meta file associated with each volume. *) -let create_meta_files output_alloc sd_uuid image_uuids overlays = - (* Note: Upper case in the .meta, mixed case in the OVF. *) - let output_alloc_for_rhv = - match output_alloc with - | Sparse -> "SPARSE" - | Preallocated -> "PREALLOCATED" in - - List.map ( - fun ((target_format, ov), image_uuid) -> - let size_in_sectors = - if ov.ov_virtual_size &^ 511L <> 0L then - error (f_"the virtual size of the input disk %s is not an exact multiple of 512 bytes. The virtual size is: %Ld.\n\nThis probably means something unexpected is going on, so please file a bug about this issue.") - ov.ov_source.s_qemu_uri - ov.ov_virtual_size; - ov.ov_virtual_size /^ 512L in - - let format_for_rhv = - match target_format with - | "raw" -> "RAW" - | "qcow2" -> "COW" - | _ -> - error (f_"RHV does not support the output format ‘%s’, only raw or qcow2") target_format in - - let buf = Buffer.create 256 in - let bpf fs = bprintf buf fs in - bpf "DOMAIN=%s\n" sd_uuid; (* "Domain" as in Storage Domain *) - bpf "VOLTYPE=LEAF\n"; - bpf "CTIME=%.0f\n" time; - bpf "MTIME=%.0f\n" time; - bpf "IMAGE=%s\n" image_uuid; - bpf "DISKTYPE=2\n"; - bpf "PUUID=00000000-0000-0000-0000-000000000000\n"; - bpf "LEGALITY=LEGAL\n"; - bpf "POOL_UUID=\n"; - bpf "SIZE=%Ld\n" size_in_sectors; - bpf "FORMAT=%s\n" format_for_rhv; - bpf "TYPE=%s\n" output_alloc_for_rhv; - bpf "DESCRIPTION=%s\n" (String.replace generated_by "=" "_"); - bpf "EOF\n"; - Buffer.contents buf - ) (List.combine overlays image_uuids) - -(* Create the OVF file. *) -let rec create_ovf source targets guestcaps inspect target_firmware - output_alloc sd_uuid image_uuids vol_uuids vm_uuid ovf_flavour = - assert (List.length targets = List.length vol_uuids); - - let memsize_mb = source.s_memory /^ 1024L /^ 1024L in - - let vmtype = get_vmtype inspect in - let vmtype = match vmtype with `Desktop -> "0" | `Server -> "1" in - let ostype = get_ostype inspect in - let biostype = get_ovirt_biostype target_firmware in - - let ovf : doc = - doc "ovf:Envelope" [ - "xmlns:rasd", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"; - "xmlns:vssd", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"; - "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"; - "xmlns:ovf", "http://schemas.dmtf.org/ovf/envelope/1/"; - "xmlns:ovirt", "http://www.ovirt.org/ovf"; - "ovf:version", "0.9" - ] [ - Comment generated_by; - e "References" [] []; - (match ovf_flavour with - | OVirt -> - e "NetworkSection" [] [ - e "Info" [] [PCData "List of networks"] - ] - | RHVExportStorageDomain -> - e "Section" ["xsi:type", "ovf:NetworkSection_Type"] [ - e "Info" [] [PCData "List of networks"] - ] - ); - (match ovf_flavour with - | OVirt -> - e "DiskSection" [] [ - e "Info" [] [PCData "List of Virtual Disks"] - ] - | RHVExportStorageDomain -> - e "Section" ["xsi:type", "ovf:DiskSection_Type"] [ - e "Info" [] [PCData "List of Virtual Disks"] - ] - ); - - let content_subnodes = ref [ - e "Name" [] [PCData source.s_name]; - e "TemplateId" [] [PCData "00000000-0000-0000-0000-000000000000"]; - e "TemplateName" [] [PCData "Blank"]; - e "Description" [] [PCData generated_by]; - e "Domain" [] []; - e "CreationDate" [] [PCData iso_time]; - e "IsInitilized" (* sic *) [] [PCData "True"]; - e "IsAutoSuspend" [] [PCData "False"]; - e "TimeZone" [] []; - e "IsStateless" [] [PCData "False"]; - e "VmType" [] [PCData vmtype]; - (* See https://bugzilla.redhat.com/show_bug.cgi?id=1260590#c17 *) - e "DefaultDisplayType" [] [PCData "1"]; - e "BiosType" [] [PCData (string_of_int biostype)]; - ] in - - (match source.s_cpu_model with - | None -> () - | Some model -> - List.push_back content_subnodes (e "CustomCpuName" [] [PCData model]) - ); - - (* Add the element if we can. *) - (match origin_of_source_hypervisor source.s_hypervisor with - | None -> () - | Some origin -> - List.push_back content_subnodes - (e "Origin" [] [PCData (string_of_int origin)]) - ); - - List.push_back content_subnodes ( - let osinfo_subnodes = [ - e "Info" [] [PCData inspect.i_product_name]; - e "Description" [] [PCData ostype]; - ] in - (match ovf_flavour with - | OVirt -> - let ovirt_osid = get_ovirt_osid inspect in - e "OperatingSystemSection" ["ovf:id", vm_uuid; - "ovf:required", "false"; - "ovirt:id", string_of_int ovirt_osid] - osinfo_subnodes - | RHVExportStorageDomain -> - e "Section" ["ovf:id", vm_uuid; "ovf:required", "false"; - "xsi:type", "ovf:OperatingSystemSection_Type"] - osinfo_subnodes - ) - ); - - let virtual_hardware_section_items = ref [ - e "Info" [] [PCData (sprintf "%d CPU, %Ld Memory" - source.s_vcpu memsize_mb)] - ] in - - (* XXX How to set machine type for Q35? *) - - List.push_back virtual_hardware_section_items ( - e "Item" [] ([ - e "rasd:Caption" [] [PCData (sprintf "%d virtual cpu" source.s_vcpu)]; - e "rasd:Description" [] [PCData "Number of virtual CPU"]; - e "rasd:InstanceId" [] [PCData "1"]; - e "rasd:ResourceType" [] [PCData "3"] - ] @ - (match source.s_cpu_topology with - | None -> - [ e "rasd:num_of_sockets" [] [PCData "1"]; - e "rasd:cpu_per_socket"[] [PCData (string_of_int source.s_vcpu)] ] - | Some { s_cpu_sockets = sockets; s_cpu_cores = cores; - s_cpu_threads = threads } -> - [ e "rasd:num_of_sockets" [] [PCData (string_of_int sockets)]; - e "rasd:cpu_per_socket"[] [PCData (string_of_int cores)]; - e "rasd:threads_per_cpu"[] [PCData (string_of_int threads)] ] - ) - ) - ); - - List.push_back_list virtual_hardware_section_items [ - e "Item" [] [ - e "rasd:Caption" [] [PCData (sprintf "%Ld MB of memory" memsize_mb)]; - e "rasd:Description" [] [PCData "Memory Size"]; - e "rasd:InstanceId" [] [PCData "2"]; - e "rasd:ResourceType" [] [PCData "4"]; - e "rasd:AllocationUnits" [] [PCData "MegaBytes"]; - e "rasd:VirtualQuantity" [] [PCData (Int64.to_string memsize_mb)]; - ]; - - e "Item" [] [ - e "rasd:Caption" [] [PCData "USB Controller"]; - e "rasd:InstanceId" [] [PCData "3"]; - e "rasd:ResourceType" [] [PCData "23"]; - e "rasd:UsbPolicy" [] [PCData "Disabled"]; - ]; - - (* We always add a qxl device when outputting to RHV. - * See RHBZ#1213701 and RHBZ#1211231 for the reasoning - * behind that. - *) - let qxl_resourcetype = - match ovf_flavour with - | OVirt -> 32768 (* RHBZ#1598715 *) - | RHVExportStorageDomain -> 20 in - e "Item" [] [ - e "rasd:Caption" [] [PCData "Graphical Controller"]; - e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:ResourceType" [] [PCData (string_of_int qxl_resourcetype)]; - e "Type" [] [PCData "video"]; - e "rasd:VirtualQuantity" [] [PCData "1"]; - e "rasd:Device" [] [PCData "qxl"]; - ] - ]; - - (* Add the miscellaneous KVM devices. *) - if guestcaps.gcaps_virtio_rng then - List.push_back virtual_hardware_section_items ( - e "Item" [] [ - e "rasd:Caption" [] [PCData "RNG Device"]; - e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:ResourceType" [] [PCData "0"]; - e "Type" [] [PCData "rng"]; - e "Device" [] [PCData "virtio"]; - e "SpecParams" [] [ - e "source" [] [PCData "urandom"] - ] - ] - ); - if guestcaps.gcaps_virtio_balloon then - List.push_back virtual_hardware_section_items ( - e "Item" [] [ - e "rasd:Caption" [] [PCData "Memory Ballooning Device"]; - e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:ResourceType" [] [PCData "0"]; - e "Type" [] [PCData "balloon"]; - e "Device" [] [PCData "memballoon"]; - e "SpecParams" [] [ - e "model" [] [PCData "virtio"] - ] - ] - ); - - List.push_back content_subnodes ( - match ovf_flavour with - | OVirt -> - e "VirtualHardwareSection" [] !virtual_hardware_section_items - | RHVExportStorageDomain -> - e "Section" ["xsi:type", "ovf:VirtualHardwareSection_Type"] - !virtual_hardware_section_items - ); - - (match ovf_flavour with - | OVirt -> - e "VirtualSystem" ["ovf:id", vm_uuid] !content_subnodes - | RHVExportStorageDomain -> - e "Content" ["ovf:id", "out"; "xsi:type", "ovf:VirtualSystem_Type"] - !content_subnodes - ) - ] in - - (* Add disks to the OVF XML. *) - add_disks targets guestcaps output_alloc sd_uuid image_uuids vol_uuids - ovf_flavour ovf; - - (* Old virt-v2v ignored removable media. XXX *) - - (* Add networks to the OVF XML. *) - add_networks source.s_nics guestcaps ovf_flavour ovf; - - (* Add sound card to the OVF XML. *) - add_sound_card source.s_sound ovf_flavour ovf; - - (* Old virt-v2v didn't really look at the video and display - * metadata, instead just adding a single standard display (see - * above). However it did warn if there was a password on the - * display of the old guest. - *) - (match source with - | { s_display = Some { s_password = Some _ } } -> - warning (f_"This guest required a password for connection to its display, but this is not supported by RHV. Therefore the converted guest’s display will not require a separate password to connect."); - | _ -> ()); - - if verbose () then ( - eprintf "OVF:\n"; - doc_to_chan Pervasives.stderr ovf - ); - - (* Return the OVF document. *) - ovf - -(* Find appropriate section depending on the OVF flavour being generated. - * - * For example normal disk section is in node whereas in case of - * RHV export storage domain it is
. - *) -and get_flavoured_section ovf ovirt_path rhv_path rhv_path_attr = function - | OVirt -> - let nodes = path_to_nodes ovf ovirt_path in - (match nodes with - | [node] -> node - | [] | _::_::_ -> assert false) - | RHVExportStorageDomain -> - let nodes = path_to_nodes ovf rhv_path in - try find_node_by_attr nodes rhv_path_attr - with Not_found -> assert false - -(* This modifies the OVF DOM, adding a section for each disk. *) -and add_disks targets guestcaps output_alloc sd_uuid image_uuids vol_uuids - ovf_flavour ovf = - let references = - let nodes = path_to_nodes ovf ["ovf:Envelope"; "References"] in - match nodes with - | [] | _::_::_ -> assert false - | [node] -> node in - let disk_section = - get_flavoured_section ovf - ["ovf:Envelope"; "DiskSection"] - ["ovf:Envelope"; "Section"] - ("xsi:type", "ovf:DiskSection_Type") - ovf_flavour in - let virtualhardware_section = - get_flavoured_section ovf - ["ovf:Envelope"; "VirtualSystem"; - "VirtualHardwareSection"] - ["ovf:Envelope"; "Content"; "Section"] - ("xsi:type", "ovf:VirtualHardwareSection_Type") - ovf_flavour in - - (* Iterate over the disks, adding them to the OVF document. *) - List.iteri ( - fun i ({ target_overlay = ov } as t, image_uuid, vol_uuid) -> - (* This sets the boot order to boot the first disk first. This - * isn't generally correct. We should copy over the boot order - * from the source hypervisor. See long discussion in - * https://bugzilla.redhat.com/show_bug.cgi?id=1308535 for - * what we should be doing. (XXX) - *) - let is_bootable_drive = i == 0 in - let boot_order = i+1 in - - let fileref = - match ovf_flavour with - | OVirt -> - vol_uuid - | RHVExportStorageDomain -> - sprintf "%s/%s" image_uuid vol_uuid in - - (* ovf:size and ovf:actual_size fields are integer GBs. If you - * use floating point numbers then RHV will fail to parse them. - * In case the size is just below a gigabyte boundary, round up. - *) - let bytes_to_gb b = - let b = roundup64 b 1073741824L in - b /^ 1073741824L - in - let size_gb = bytes_to_gb ov.ov_virtual_size in - let actual_size_gb, is_estimate = - let ds = t.target_overlay.ov_stats in - match ds.target_actual_size, ds.target_estimated_size with - | Some actual_size, _ -> Some (bytes_to_gb actual_size), false - (* In the --no-copy case the target file does not exist. In - * that case we use the estimated size. - *) - | None, Some estimated_size -> Some (bytes_to_gb estimated_size), true - | None, None -> None, false in - - let format_for_rhv = - match t.target_format with - | "raw" -> "RAW" - | "qcow2" -> "COW" - | _ -> - error (f_"RHV does not support the output format ‘%s’, only raw or qcow2") t.target_format in - - (* Note: Upper case in the .meta, mixed case in the OVF. *) - let output_alloc_for_rhv = - match output_alloc with - | Sparse -> "Sparse" - | Preallocated -> "Preallocated" in - - (* Add disk to node. *) - let disk = - let attrs = ref [ - "ovf:href", fileref; - "ovf:id", vol_uuid; - "ovf:description", generated_by; - ] in - (match t.target_overlay.ov_stats.target_actual_size with - | None -> () - | Some actual_size -> - List.push_back attrs ("ovf:size", Int64.to_string actual_size) - ); - e "File" !attrs [] in - append_child disk references; - - (* Add disk to DiskSection. *) - let disk = - let attrs = ref [ - "ovf:diskId", - (match ovf_flavour with - | OVirt -> image_uuid - | RHVExportStorageDomain -> vol_uuid); - "ovf:size", Int64.to_string size_gb; - "ovf:capacity", Int64.to_string ov.ov_virtual_size; - "ovf:fileRef", fileref; - "ovf:parentRef", ""; - "ovf:vm_snapshot_id", uuidgen (); - "ovf:volume-format", format_for_rhv; - "ovf:volume-type", output_alloc_for_rhv; - "ovf:format", "http://en.wikipedia.org/wiki/Byte"; (* wtf? *) - "ovf:disk-interface", - (match guestcaps.gcaps_block_bus with - | Virtio_blk -> "VirtIO" - | Virtio_SCSI -> "VirtIO_SCSI" - | IDE -> "IDE"); - "ovf:disk-type", "System"; (* RHBZ#744538 *) - "ovf:boot", if is_bootable_drive then "True" else "False"; - ] in - (match actual_size_gb with - | None -> () - | Some actual_size_gb -> - List.push_back attrs ("ovf:actual_size", Int64.to_string actual_size_gb) - ); - e "Disk" !attrs [] in - if is_estimate then ( - let comment = Comment "note: actual_size field is estimated" in - append_child comment disk_section - ); - append_child disk disk_section; - - (* Add disk to VirtualHardware. *) - let item = - (* This text MUST begin with the string "Drive " or the file - * will not parse. - *) - let caption = sprintf "Drive %d" (i+1) in - let item_subnodes = ref [ - e "rasd:Caption" [] [PCData caption]; - e "rasd:InstanceId" [] [PCData vol_uuid]; - e "rasd:ResourceType" [] [PCData "17"]; - e "Type" [] [PCData "disk"]; - e "rasd:HostResource" [] [PCData fileref]; - e "rasd:Parent" [] [PCData "00000000-0000-0000-0000-000000000000"]; - e "rasd:Template" [] [PCData "00000000-0000-0000-0000-000000000000"]; - e "rasd:ApplicationList" [] []; - e "rasd:StorageId" [] [PCData sd_uuid]; - e "rasd:StoragePoolId" [] [PCData "00000000-0000-0000-0000-000000000000"]; - e "rasd:CreationDate" [] [PCData iso_time]; - e "rasd:LastModified" [] [PCData iso_time]; - e "rasd:last_modified_date" [] [PCData iso_time]; - ] in - if is_bootable_drive then - List.push_back item_subnodes - (e "BootOrder" [] [PCData (string_of_int boot_order)]); - - e "Item" [] !item_subnodes in - append_child item virtualhardware_section; - ) (List.combine3 targets image_uuids vol_uuids) - -(* This modifies the OVF DOM, adding a section for each NIC. *) -and add_networks nics guestcaps ovf_flavour ovf = - let network_section = - get_flavoured_section ovf - ["ovf:Envelope"; "NetworkSection"] - ["ovf:Envelope"; "Section"] - ("xsi:type", "ovf:NetworkSection_Type") - ovf_flavour in - let virtualhardware_section = - get_flavoured_section ovf - ["ovf:Envelope"; "VirtualSystem"; - "VirtualHardwareSection"] - ["ovf:Envelope"; "Content"; "Section"] - ("xsi:type", "ovf:VirtualHardwareSection_Type") - ovf_flavour in - - (* Iterate over the NICs, adding them to the OVF document. *) - List.iteri ( - fun i { s_mac = mac; s_vnet_type = vnet_type; - s_vnet = vnet; s_mapping_explanation = explanation } -> - let dev = sprintf "eth%d" i in - - let model = - match guestcaps.gcaps_net_bus with - | RTL8139 -> "1" - | E1000 -> "2" - | Virtio_net -> "3" - (*| bus -> - warning (f_"unknown NIC model %s for ethernet device %s. This NIC will be imported as rtl8139 instead.") - bus dev; - "1" *) in - - (match explanation with - | None -> () - | Some explanation -> - append_child (Comment explanation) network_section - ); - - let network = e "Network" ["ovf:name", vnet] [] in - append_child network network_section; - - let item = - let item_subnodes = ref [ - e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:Caption" [] [PCData (sprintf "Ethernet adapter on %s" vnet)]; - e "rasd:ResourceType" [] [PCData "10"]; - e "rasd:ResourceSubType" [] [PCData model]; - e "Type" [] [PCData "interface"]; - e "rasd:Connection" [] [PCData vnet]; - e "rasd:Name" [] [PCData dev]; - ] in - (match mac with - | None -> () - | Some mac -> - List.push_back item_subnodes - (e "rasd:MACAddress" [] [PCData mac]) - ); - e "Item" [] !item_subnodes in - append_child item virtualhardware_section; - ) nics - -(* This modifies the OVF DOM, adding a sound card, if oVirt can emulate it. *) -and add_sound_card sound ovf_flavour ovf = - let device = - match sound with - | None -> None - | Some { s_sound_model = AC97 } -> Some "ac97" - | Some { s_sound_model = ICH6 } -> Some "ich6" - | Some { s_sound_model = model } -> - warning (f_"oVirt cannot emulate ‘%s’ sound cards. This sound card will be dropped from the output.") - (string_of_source_sound_model model); - None in - - match device with - | Some device -> - let virtualhardware_section = - get_flavoured_section ovf - ["ovf:Envelope"; "VirtualSystem"; - "VirtualHardwareSection"] - ["ovf:Envelope"; "Content"; "Section"] - ("xsi:type", "ovf:VirtualHardwareSection_Type") - ovf_flavour in - - let item = - e "Item" [] [ - e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:ResourceType" [] [PCData "0"]; - e "Type" [] [PCData "sound"]; - e "Device" [] [PCData device]; - ] in - append_child item virtualhardware_section - - | None -> () diff --git a/v2v/create_ovf.mli b/v2v/create_ovf.mli deleted file mode 100644 index 80df42d98..000000000 --- a/v2v/create_ovf.mli +++ /dev/null @@ -1,63 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -type ovf_flavour = - | OVirt - | RHVExportStorageDomain - -(** The string representation of available OVF flavours. *) -val ovf_flavours : string list - -(** Convert from a string to the corresponding OVF flavour. - - Throw [Invalid_argument] if the string does not match any - valid flavour. *) -val ovf_flavour_of_string : string -> ovf_flavour - -(** Convert an OVF flavour to its string representation. *) -val ovf_flavour_to_string : ovf_flavour -> string - -(** Create OVF and related files for RHV. - - The format for RHV export storage domain is described in: - http://resources.ovirt.org/old-site-files/Ovirt_ovf_format.odt - - The format understood by oVirt has no known documentation. - - OVF isn't a real standard, so it's likely that if we ever had to - create OVF for another target management system then we would need - to heavily modify or even duplicate this code. *) - -val create_ovf : Types.source -> Types.target list -> Types.guestcaps -> Types.inspect -> Types.target_firmware -> Types.output_allocation -> string -> string list -> string list -> string -> ovf_flavour -> DOM.doc -(** Create the OVF file. - - Actually a {!DOM} document is created, not a file. It can be written - to the desired output location using {!DOM.doc_to_chan}. *) - -val create_meta_files : Types.output_allocation -> string -> string list -> (string * Types.overlay) list -> string list -(** Create the .meta file associated with each target. - - Note this does not write them, since output_rhv has to do a - permissions dance when writing files. Instead the contents of each - file is returned (one per target), and they must be written to - [target_file ^ ".meta"]. *) - -(**/**) - -(* For use by v2v_unit_tests only. *) -val get_ostype : Types.inspect -> string diff --git a/v2v/dummy.c b/v2v/dummy.c deleted file mode 100644 index ebab6198c..000000000 --- a/v2v/dummy.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Dummy source, to be used for OCaml-based tools with no C sources. */ -enum { foo = 1 }; diff --git a/v2v/embed.sh b/v2v/embed.sh deleted file mode 100755 index 363d7e2b0..000000000 --- a/v2v/embed.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Embed code or other content into an OCaml file. -# Copyright (C) 2018 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Embed code or other content into an OCaml file. -# -# It is embedded into a string. As OCaml string literals have virtually -# no restrictions on length or content we only have to escape double -# quotes for backslash characters. - -if [ $# -ne 3 ]; then - echo "embed.sh identifier input output" - exit 1 -fi - -set -e -set -u - -ident="$1" -input="$2" -output="$3" - -rm -f "$output" "$output"-t - -exec >"$output"-t - -echo "(* Generated by embed.sh from $input *)" -echo -echo let "$ident" = '"' -sed -e 's/\(["\]\)/\\\1/g' < "$input" -echo '"' - -chmod -w "$output"-t -mv "$output"-t "$output" diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml deleted file mode 100644 index e9e6eb83a..000000000 --- a/v2v/input_disk.ml +++ /dev/null @@ -1,104 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils -open Name_from_disk - -class input_disk input_format disk = object - inherit input - - method as_options = - sprintf "-i disk%s %s" - (match input_format with - | None -> "" - | Some fmt -> " -if " ^ fmt) - disk - - method source ?bandwidth () = - (* Check the input file exists and is readable. *) - Unix.access disk [Unix.R_OK]; - - (* What name should we use for the guest? We try to derive it from - * the filename passed in. Users can override this using the - * `-on name' option. - *) - let name = name_from_disk disk in - - (* Get the absolute path to the disk file. *) - let disk_absolute = absolute_path disk in - - (* The rest of virt-v2v doesn't actually work unless we detect - * the format of the input, so: - *) - let format = - match input_format with - | Some format -> format - | None -> - match (open_guestfs ())#disk_format disk with - | "unknown" -> - error (f_"cannot detect the input disk format; use the -if parameter") - | format -> format in - - let disk = { - s_disk_id = 0; - s_qemu_uri = disk_absolute; - s_format = Some format; - s_controller = None; - } in - - (* Give the guest a simple generic network interface. *) - let network = { - s_mac = None; - s_nic_model = None; - s_vnet = "default"; - s_vnet_type = Network; - s_mapping_explanation = None - } in - - let source = { - s_hypervisor = UnknownHV; - s_name = name; s_orig_name = name; - s_genid = None; - s_memory = 2048L *^ 1024L *^ 1024L; (* 2048 MB *) - s_vcpu = 1; (* 1 vCPU is a safe default *) - s_cpu_vendor = None; - s_cpu_model = None; - s_cpu_topology = None; - s_features = [ "acpi"; "apic"; "pae" ]; - s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *) - s_display = - Some { s_display_type = Window; s_keymap = None; s_password = None; - s_listen = LNoListen; s_port = None }; - s_video = None; - s_sound = None; - s_removables = []; - s_nics = [network]; - } in - - source, [disk] -end - -let input_disk = new input_disk -let () = Modules_list.register_input_module "disk" diff --git a/v2v/input_disk.mli b/v2v/input_disk.mli deleted file mode 100644 index 9a7c7d66d..000000000 --- a/v2v/input_disk.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i disk] source. *) - -val input_disk : string option -> string -> Types.input -(** [input_disk input_format disk] creates and returns a new - {!Types.input} object specialized for reading input from local - disk images. *) diff --git a/v2v/input_libvirt.ml b/v2v/input_libvirt.ml deleted file mode 100644 index c41c2f60d..000000000 --- a/v2v/input_libvirt.ml +++ /dev/null @@ -1,84 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] source. *) - -open Printf - -open Common_gettext.Gettext -open Tools_utils - -open Types -open Utils - -(* Choose the right subclass based on the URI. *) -let input_libvirt input_conn input_password input_transport guest = - (* Create a lazy object to open the connection to libvirt only when - * needed. - *) - let libvirt_conn = - lazy ( - let auth = Libvirt_utils.auth_for_password_file ?password_file:input_password () in - Libvirt.Connect.connect_auth ?name:input_conn auth - ) in - match input_conn with - | None -> - Input_libvirt_other.input_libvirt_other libvirt_conn guest - - | Some orig_uri -> - let { Xml.uri_server = server; uri_scheme = scheme } as parsed_uri = - try Xml.parse_uri orig_uri - with Invalid_argument msg -> - error (f_"could not parse '-ic %s'. Original error message was: %s") - orig_uri msg in - - match server, scheme, input_transport with - | None, _, _ - | Some "", _, _ (* Not a remote URI. *) - - | Some _, None, _ (* No scheme? *) - | Some _, Some "", _ -> - Input_libvirt_other.input_libvirt_other libvirt_conn guest - - (* vCenter over https. *) - | Some server, Some ("esx"|"gsx"|"vpx"), None -> - Input_libvirt_vcenter_https.input_libvirt_vcenter_https - libvirt_conn input_password parsed_uri server guest - - (* vCenter or ESXi using nbdkit vddk plugin *) - | Some server, Some ("esx"|"gsx"|"vpx"), Some (`VDDK vddk_options) -> - Input_libvirt_vddk.input_libvirt_vddk - libvirt_conn input_conn input_password vddk_options parsed_uri guest - - (* Xen over SSH *) - | Some server, Some "xen+ssh", _ -> - Input_libvirt_xen_ssh.input_libvirt_xen_ssh - libvirt_conn input_password parsed_uri server guest - - (* Old virt-v2v also supported qemu+ssh://. However I am - * deliberately not supporting this in new virt-v2v. Don't - * use virt-v2v if a guest already runs on KVM. - *) - - (* Unknown remote scheme. *) - | Some _, Some _, _ -> - warning (f_"no support for remote libvirt connections to '-ic %s'. The conversion may fail when it tries to read the source disks.") - orig_uri; - Input_libvirt_other.input_libvirt_other libvirt_conn guest - -let () = Modules_list.register_input_module "libvirt" diff --git a/v2v/input_libvirt.mli b/v2v/input_libvirt.mli deleted file mode 100644 index 8aa21883e..000000000 --- a/v2v/input_libvirt.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] source. *) - -val input_libvirt : string option -> string option -> [`VDDK of Input_libvirt_vddk.vddk_options] option -> string -> Types.input -(** [input_libvirt input_conn input_password input_transport guest] - creates and returns a new {!Types.input} object specialized for reading - input from libvirt sources. *) diff --git a/v2v/input_libvirt_other.ml b/v2v/input_libvirt_other.ml deleted file mode 100644 index 5e6509f14..000000000 --- a/v2v/input_libvirt_other.ml +++ /dev/null @@ -1,69 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Common_gettext.Gettext -open Tools_utils - -open Types -open Utils -open Parse_libvirt_xml - -(* Libvirt < 2.1.0 did not support the "json:" pseudo-URLs that - * we use as backingfiles, when accessing Xen over SSH or vCenter - * over HTTPS. Check this and print a workaround. - * - * We can remove this when/if we ever require libvirt >= 2.1.0 as - * a minimum version. - * - * See also RHBZ#1134878. - *) -let error_if_libvirt_does_not_support_json_backingfile () = - if backend_is_libvirt () && - Libvirt_utils.libvirt_get_version () < (2, 1, 0) then - error (f_"because of libvirt bug https://bugzilla.redhat.com/1134878 you must EITHER upgrade to libvirt >= 2.1.0 OR set this environment variable:\n\nexport LIBGUESTFS_BACKEND=direct\n\nand then rerun the virt-v2v command.") - -(* Superclass. *) -class virtual input_libvirt libvirt_conn guest = -object (self) - inherit input - - method as_options = - sprintf "-i libvirt -ic %s %s" (Libvirt.Connect.get_uri self#conn) guest - - method private conn : Libvirt.rw Libvirt.Connect.t = - Lazy.force libvirt_conn -end - -(* Subclass specialized for handling anything that's *not* VMware vCenter - * or Xen. - *) -class input_libvirt_other libvirt_conn guest = -object (self) - inherit input_libvirt libvirt_conn guest - - method source ?bandwidth () = - debug "input_libvirt_other: source ()"; - - let source, disks, _ = parse_libvirt_domain ?bandwidth self#conn guest in - let disks = List.map (fun { p_source_disk = disk } -> disk) disks in - source, disks -end - -let input_libvirt_other = new input_libvirt_other diff --git a/v2v/input_libvirt_other.mli b/v2v/input_libvirt_other.mli deleted file mode 100644 index b20fb0694..000000000 --- a/v2v/input_libvirt_other.mli +++ /dev/null @@ -1,30 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] source. *) - -val error_if_libvirt_does_not_support_json_backingfile : unit -> unit - -class virtual input_libvirt : Libvirt.rw Libvirt.Connect.t Lazy.t -> string -> object - method precheck : unit -> unit - method as_options : string - method virtual source : ?bandwidth:Types.bandwidth -> unit -> Types.source * Types.source_disk list - method private conn : Libvirt.rw Libvirt.Connect.t -end - -val input_libvirt_other : Libvirt.rw Libvirt.Connect.t Lazy.t -> string -> Types.input diff --git a/v2v/input_libvirt_vcenter_https.ml b/v2v/input_libvirt_vcenter_https.ml deleted file mode 100644 index d16d83802..000000000 --- a/v2v/input_libvirt_vcenter_https.ml +++ /dev/null @@ -1,93 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] when the source is VMware vCenter *) - -open Common_gettext.Gettext -open Tools_utils -open Unix_utils.Env - -open Types -open Utils -open Xpath_helpers -open Parse_libvirt_xml -open Input_libvirt_other - -open Printf - -(* Subclass specialized for handling VMware vCenter over https. *) -class input_libvirt_vcenter_https - libvirt_conn input_password parsed_uri server guest = -object (self) - inherit input_libvirt libvirt_conn guest - - val mutable dcPath = "" - - method precheck () = - error_if_libvirt_does_not_support_json_backingfile () - - method source ?bandwidth () = - debug "input_libvirt_vcenter_https: source: server %s" server; - - (* Remove proxy environment variables so curl doesn't try to use - * them. Using a proxy is generally a bad idea because vCenter - * is slow enough as it is without putting another device in - * the way (RHBZ#1354507). - *) - unsetenv "https_proxy"; - unsetenv "all_proxy"; - unsetenv "no_proxy"; - unsetenv "HTTPS_PROXY"; - unsetenv "ALL_PROXY"; - unsetenv "NO_PROXY"; - - let source, disks, xml = parse_libvirt_domain ?bandwidth self#conn guest in - - (* Find the element from the XML. This - * was added in libvirt >= 1.2.20. - *) - dcPath <- ( - let doc = Xml.parse_memory xml in - let xpathctx = Xml.xpath_new_context doc in - Xml.xpath_register_ns xpathctx - "vmware" "http://libvirt.org/schemas/domain/vmware/1.0"; - match xpath_string xpathctx "/domain/vmware:datacenterpath" with - | Some dcPath -> dcPath - | None -> - error (f_"vcenter: was not found in the XML. You need to upgrade to libvirt ≥ 1.2.20.") - ); - - let disks = List.map ( - function - | { p_source = P_source_dev _ } -> assert false - | { p_source_disk = disk; p_source = P_dont_rewrite } -> disk - | { p_source_disk = disk; p_source = P_source_file path } -> - let { VCenter.qemu_uri } = - VCenter.map_source ?bandwidth ?password_file:input_password - dcPath parsed_uri server path in - - (* The libvirt ESX driver doesn't normally specify a format, but - * the format of the -flat file is *always* raw, so force it here. - *) - { disk with s_qemu_uri = qemu_uri; s_format = Some "raw" } - ) disks in - - source, disks -end - -let input_libvirt_vcenter_https = new input_libvirt_vcenter_https diff --git a/v2v/input_libvirt_vcenter_https.mli b/v2v/input_libvirt_vcenter_https.mli deleted file mode 100644 index c59a34a71..000000000 --- a/v2v/input_libvirt_vcenter_https.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] when the source is VMware vCenter *) - -val input_libvirt_vcenter_https : Libvirt.rw Libvirt.Connect.t Lazy.t -> string option -> Xml.uri -> string -> string -> Types.input diff --git a/v2v/input_libvirt_vddk.ml b/v2v/input_libvirt_vddk.ml deleted file mode 100644 index 3449aa160..000000000 --- a/v2v/input_libvirt_vddk.ml +++ /dev/null @@ -1,201 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] when the source is VMware via nbdkit vddk plugin *) - -open Common_gettext.Gettext -open Tools_utils -open Std_utils -open Unix_utils - -open Types -open Utils -open Input_libvirt_other -open Parse_libvirt_xml -open Xpath_helpers - -open Printf - -type vddk_options = (string * string) list - -(* List of vddk-* input options. *) -let vddk_option_keys = - [ "config"; - "cookie"; - "libdir"; - "nfchostport"; - "port"; - "snapshot"; - "thumbprint"; - "transports" ] - -let print_input_options () = - printf (f_"Input options (-io) which can be used with -it vddk: - - -io vddk-thumbprint=xx:xx:xx:... - VDDK server thumbprint (required) - -All other settings are optional: - - -io vddk-config=FILE VDDK configuration file - -io vddk-cookie=COOKIE VDDK cookie - -io vddk-libdir=LIBDIR VDDK library parent directory - -io vddk-nfchostport=PORT VDDK nfchostport - -io vddk-port=PORT VDDK port - -io vddk-snapshot=SNAPSHOT-MOREF - VDDK snapshot moref - -io vddk-transports=MODE:MODE:.. - VDDK transports - -Refer to nbdkit-vddk-plugin(1) and the VDDK documentation for further -information on these settings. -") - -let parse_input_options options = - (* Check there are no options we don't understand. Also removes - * the "vddk-" prefix from the internal list. - *) - let options = - List.map ( - fun (key, value) -> - let error_invalid_key () = - error (f_"-it vddk: ‘-io %s’ is not a valid input option") key - in - if not (String.is_prefix key "vddk-") then error_invalid_key (); - let key = String.sub key 5 (String.length key-5) in - if not (List.mem key vddk_option_keys) then error_invalid_key (); - - (key, value) - ) options in - - (* Check no option appears more than once. *) - let keys = List.map fst options in - if List.length keys <> List.length (List.sort_uniq keys) then - error (f_"-it vddk: duplicate -io options on the command line"); - - options - -(* Subclass specialized for handling VMware via nbdkit vddk plugin. *) -class input_libvirt_vddk libvirt_conn input_conn input_password vddk_options - parsed_uri guest = - let error_unless_thumbprint () = - if not (List.mem_assoc "thumbprint" vddk_options) then - error (f_"You must pass the ‘-io vddk-thumbprint’ option with the SSL thumbprint of the VMware server. To find the thumbprint, see the nbdkit-vddk-plugin(1) manual. See also the virt-v2v-input-vmware(1) manual.") - in - -object (self) - inherit input_libvirt libvirt_conn guest as super - - method precheck () = - error_unless_thumbprint () - - method as_options = - let pt_options = - String.concat "" - (List.map (fun (k, v) -> - sprintf " -io vddk-%s=%s" k v) vddk_options) in - sprintf "%s -it vddk %s" - super#as_options (* superclass prints "-i libvirt etc" *) - pt_options - - method source ?bandwidth () = - let source, disks, xml = parse_libvirt_domain ?bandwidth self#conn guest in - - (* Find the element from the XML. This was added - * in libvirt >= 3.7 and is required. - *) - let moref = - let doc = Xml.parse_memory xml in - let xpathctx = Xml.xpath_new_context doc in - Xml.xpath_register_ns xpathctx - "vmware" "http://libvirt.org/schemas/domain/vmware/1.0"; - let xpath_string = xpath_string xpathctx in - match xpath_string "/domain/vmware:moref" with - | Some moref -> moref - | None -> - error (f_" was not found in the output of ‘virsh dumpxml \"%s\"’. The most likely reason is that libvirt is too old, try upgrading libvirt to ≥ 3.7.") guest in - - (* It probably never happens that the server name can be missing - * from the libvirt URI, but we need a server name to pass to - * nbdkit, so ... - *) - let server = - match parsed_uri.Xml.uri_server with - | Some server -> server - | None -> - match input_conn with - | Some input_conn -> - error (f_"‘-ic %s’ URL does not contain a host name field") - input_conn - | None -> - error (f_"you must use the ‘-ic’ parameter. See the virt-v2v-input-vmware(1) manual.") in - - let user = parsed_uri.Xml.uri_user in - - let config = - try Some (List.assoc "config" vddk_options) with Not_found -> None in - let cookie = - try Some (List.assoc "cookie" vddk_options) with Not_found -> None in - let libdir = - try Some (List.assoc "libdir" vddk_options) with Not_found -> None in - let nfchostport = - try Some (List.assoc "nfchostport" vddk_options) with Not_found -> None in - let port = - try Some (List.assoc "port" vddk_options) with Not_found -> None in - let snapshot = - try Some (List.assoc "snapshot" vddk_options) with Not_found -> None in - let thumbprint = - try List.assoc "thumbprint" vddk_options - with Not_found -> assert false (* checked in precheck method *) in - let transports = - try Some (List.assoc "transports" vddk_options) with Not_found -> None in - - (* Create an nbdkit instance for each disk and rewrite the source - * paths to point to the NBD socket. - *) - let disks = List.map ( - function - | { p_source_disk = disk; p_source = P_dont_rewrite } -> - disk - - | { p_source = P_source_dev _ } -> (* Should never happen. *) - error (f_"source disk has attribute in XML") - - | { p_source_disk = disk; p_source = P_source_file path } -> - (* The attribute returned by the libvirt - * VMX driver looks like "[datastore] path". We can use it - * directly as the nbdkit file= parameter, and it is passed - * directly in this form to VDDK. - *) - let nbdkit = - Nbdkit.create_vddk ?bandwidth ?config ?cookie ?libdir ~moref - ?nfchostport ?password_file:input_password ?port - ~server ?snapshot ~thumbprint ?transports ?user - path in - let qemu_uri = Nbdkit.run nbdkit in - - (* nbdkit always presents us with the raw disk blocks from - * the guest, so force the format to raw here. - *) - { disk with s_qemu_uri = qemu_uri; s_format = Some "raw" } - ) disks in - - source, disks -end - -let input_libvirt_vddk = new input_libvirt_vddk diff --git a/v2v/input_libvirt_vddk.mli b/v2v/input_libvirt_vddk.mli deleted file mode 100644 index 2fc6e9cf8..000000000 --- a/v2v/input_libvirt_vddk.mli +++ /dev/null @@ -1,31 +0,0 @@ -(* virt-v2v - * Copyright (C) 2017 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] when the source is VMware via nbdkit vddk plugin *) - -type vddk_options -(** Various options passed through to the nbdkit vddk plugin unmodified. *) - -val print_input_options : unit -> unit -val parse_input_options : (string * string) list -> vddk_options -(** Print and parse vddk -io options. *) - -val input_libvirt_vddk : Libvirt.rw Libvirt.Connect.t Lazy.t -> string option -> string option -> vddk_options -> Xml.uri -> string -> Types.input -(** [input_libvirt_vddk libvirt_conn vddk_options parsed_uri guest] - creates and returns a {!Types.input} object specialized for reading - the guest disks using the nbdkit vddk plugin. *) diff --git a/v2v/input_libvirt_xen_ssh.ml b/v2v/input_libvirt_xen_ssh.ml deleted file mode 100644 index 630aab993..000000000 --- a/v2v/input_libvirt_xen_ssh.ml +++ /dev/null @@ -1,77 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] when the source is Xen *) - -open Common_gettext.Gettext -open Tools_utils - -open Types -open Xml -open Utils -open Parse_libvirt_xml -open Input_libvirt_other - -open Printf - -(* Subclass specialized for handling Xen over SSH. *) -class input_libvirt_xen_ssh libvirt_conn input_password parsed_uri server guest = -object (self) - inherit input_libvirt libvirt_conn guest - - method precheck () = - if backend_is_libvirt () then - error (f_"because of libvirt bug https://bugzilla.redhat.com/1140166 you must set this environment variable:\n\nexport LIBGUESTFS_BACKEND=direct\n\nand then rerun the virt-v2v command."); - error_if_libvirt_does_not_support_json_backingfile (); - error_if_no_ssh_agent () - - method source ?bandwidth () = - debug "input_libvirt_xen_ssh: source: server %s" server; - - let source, disks, _ = parse_libvirt_domain ?bandwidth self#conn guest in - - let port = - match parsed_uri.uri_port with - | 0 | 22 -> None - | i -> Some (string_of_int i) in - - let user = parsed_uri.uri_user in - - (* Map the filename (which is relative to the remote - * Xen server) to an ssh URI pointing to nbdkit. - *) - let disks = List.map ( - function - | { p_source_disk = disk; p_source = P_dont_rewrite } -> - disk - | { p_source_disk = disk; p_source = P_source_dev path } - | { p_source_disk = disk; p_source = P_source_file path } -> - let password = - match input_password with - | None -> Nbdkit.NoPassword - | Some ip -> Nbdkit.PasswordFile ip in - let nbdkit = Nbdkit.create_ssh ?bandwidth ~password - ?port ~server ?user path in - let qemu_uri = Nbdkit.run nbdkit in - { disk with s_qemu_uri = qemu_uri } - ) disks in - - source, disks -end - -let input_libvirt_xen_ssh = new input_libvirt_xen_ssh diff --git a/v2v/input_libvirt_xen_ssh.mli b/v2v/input_libvirt_xen_ssh.mli deleted file mode 100644 index 037d1ffbf..000000000 --- a/v2v/input_libvirt_xen_ssh.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirt] when the source is Xen *) - -val input_libvirt_xen_ssh : Libvirt.rw Libvirt.Connect.t Lazy.t -> string option -> Xml.uri -> string -> string -> Types.input diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml deleted file mode 100644 index 5ebd430f0..000000000 --- a/v2v/input_libvirtxml.ml +++ /dev/null @@ -1,60 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Parse_libvirt_xml - -class input_libvirtxml file = -object - inherit input - - method as_options = "-i libvirtxml " ^ file - - method source ?bandwidth () = - let xml = read_whole_file file in - - let source, disks = parse_libvirt_xml xml in - - (* When reading libvirt XML from a file (-i libvirtxml) we allow - * paths to disk images in the libvirt XML to be relative (to the XML - * file). Relative paths are in fact not permitted in real libvirt - * XML, but they are very useful when dealing with test images or - * when writing the XML by hand. - *) - let dir = Filename.dirname (absolute_path file) in - let disks = List.map ( - function - | { p_source_disk = disk; p_source = P_dont_rewrite } -> disk - | { p_source_disk = disk; p_source = P_source_dev _ } -> disk - | { p_source_disk = disk; p_source = P_source_file path } -> - let path = - if not (Filename.is_relative path) then path else dir // path in - { disk with s_qemu_uri = path } - ) disks in - - source, disks -end - -let input_libvirtxml = new input_libvirtxml -let () = Modules_list.register_input_module "libvirtxml" diff --git a/v2v/input_libvirtxml.mli b/v2v/input_libvirtxml.mli deleted file mode 100644 index 2485747e3..000000000 --- a/v2v/input_libvirtxml.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i libvirtxml] source. *) - -val input_libvirtxml : string -> Types.input -(** [input_libvirtxml xml_file] creates and returns a new - {!Types.input} object specialized for reading input from local - libvirt XML files. *) diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml deleted file mode 100644 index fd0d3ed12..000000000 --- a/v2v/input_ova.ml +++ /dev/null @@ -1,211 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Parse_ova -open Parse_ovf_from_ova -open Name_from_disk - -(* RHBZ#1570407: VMware-generated OVA files found in the wild can - * contain hrefs referencing snapshots. The href will be something - * like: but the actual disk will be a - * snapshot called something like "disk1.vmdk.000000000". - *) -let re_snapshot = PCRE.compile "\\.(\\d+)$" - -let rec find_file_or_snapshot ova_t href manifest = - match resolve_href ova_t href with - | Some f -> f - | None -> - (* Find all files in the OVA called [.\d+] *) - let files = get_file_list ova_t in - let snapshots = - List.filter_map ( - function - | LocalFile filename -> get_snapshot_if_matches href filename - | TarFile (_, filename) -> get_snapshot_if_matches href filename - ) files in - (* Pick highest. *) - let snapshots = List.sort (fun a b -> compare b a) snapshots in - match snapshots with - | [] -> error_missing_href href - | snapshot::_ -> - let href = sprintf "%s.%s" href snapshot in - match resolve_href ova_t href with - | None -> error_missing_href href - | Some f -> f - -(* If [filename] matches [.\d+] then return [Some snapshot]. *) -and get_snapshot_if_matches href filename = - if PCRE.matches re_snapshot filename then ( - let snapshot = PCRE.sub 1 in - if String.is_suffix filename (sprintf "%s.%s" href snapshot) then - Some snapshot - else - None - ) - else None - -and error_missing_href href = - error (f_"-i ova: OVF references file ‘%s’ which was not found in the OVA archive") href - -class input_ova ova = object - inherit input - - method as_options = "-i ova " ^ ova - - method source ?bandwidth () = - (* Extract ova file. *) - let ova_t = parse_ova ova in - - (* Extract ovf file from ova. *) - let ovf = get_ovf_file ova_t in - - (* Extract the manifest from *.mf files in the ova. *) - let manifest = get_manifest ova_t in - - (* Verify checksums of files listed in the manifest. *) - List.iter ( - fun (file_ref, csum) -> - let filename, r = - match file_ref with - | LocalFile filename -> - filename, Checksums.verify_checksum csum filename - | TarFile (tar, filename) -> - filename, Checksums.verify_checksum csum ~tar filename in - match r with - | Checksums.Good_checksum -> () - | Checksums.Mismatched_checksum (_, actual) -> - error (f_"-i ova: corrupt OVA: checksum of disk %s does not match manifest (actual = %s, expected = %s)") - filename actual (Checksums.string_of_csum_t csum) - | Checksums.Missing_file -> - (* RHBZ#1570407: Some OVA files generated by VMware - * reference non-existent components in the *.mf file. - * Generate a warning and ignore it. - *) - warning (f_"manifest has a checksum for non-existent file %s (ignored)") - filename - ) manifest; - - (* Parse the ovf file. *) - let name, memory, vcpu, cpu_topology, firmware, disks, removables, nics = - parse_ovf_from_ova ovf in - - let name = - match name with - | None -> - warning (f_"could not parse ovf:Name from OVF document"); - name_from_disk ova - | Some name -> name in - - (* Convert the disk hrefs into qemu URIs. *) - let qemu_uris = List.map ( - fun { href; compressed } -> - let file_ref = find_file_or_snapshot ova_t href manifest in - - match compressed, file_ref with - | false, LocalFile filename -> - filename - - | true, LocalFile filename -> - (* The spec allows the file to be gzip-compressed, in - * which case we must uncompress it into a temporary. - *) - let temp_dir = (open_guestfs ())#get_cachedir () in - let new_filename = Filename.temp_file ~temp_dir "ova" ".vmdk" in - unlink_on_exit new_filename; - let cmd = - sprintf "zcat %s > %s" (quote filename) (quote new_filename) in - if shell_command cmd <> 0 then - error (f_"error uncompressing %s, see earlier error messages") - filename; - new_filename - - | false, TarFile (tar, filename) -> - (* This is the tar optimization. *) - let offset, size = - try Parse_ova.get_tar_offet_and_size tar filename - with - | Not_found -> - error (f_"file ‘%s’ not found in the ova") filename - | Failure msg -> error (f_"%s") msg in - (* QEMU requires size aligned to 512 bytes. This is safe because - * tar also works with 512 byte blocks. - *) - let size = roundup64 size 512L in - - (* Workaround for libvirt bug RHBZ#1431652. *) - let tar_path = absolute_path tar in - - let doc = [ - "file", JSON.Dict [ - "driver", JSON.String "raw"; - "offset", JSON.Int offset; - "size", JSON.Int size; - "file", JSON.Dict [ - "driver", JSON.String "file"; - "filename", JSON.String tar_path] - ] - ] in - let uri = - sprintf "json:%s" (JSON.string_of_doc ~fmt:JSON.Compact doc) in - uri - - | true, TarFile _ -> - (* This should not happen since {!Parse_ova} knows that - * qemu cannot handle compressed files here. - *) - assert false - ) disks in - - (* Get a final list of source disks. *) - let disks = - List.map (fun ({ source_disk }, qemu_uri) -> - { source_disk with s_qemu_uri = qemu_uri }) - (List.combine disks qemu_uris) in - - let source = { - s_hypervisor = VMware; - s_name = name; - s_orig_name = name; - s_genid = None; (* XXX *) - s_memory = memory; - s_vcpu = vcpu; - s_cpu_vendor = None; - s_cpu_model = None; - s_cpu_topology = cpu_topology; - s_features = []; (* XXX *) - s_firmware = firmware; - s_display = None; (* XXX *) - s_video = None; - s_sound = None; - s_removables = removables; - s_nics = nics; - } in - - source, disks -end - -let input_ova = new input_ova -let () = Modules_list.register_input_module "ova" diff --git a/v2v/input_ova.mli b/v2v/input_ova.mli deleted file mode 100644 index 45cf3124b..000000000 --- a/v2v/input_ova.mli +++ /dev/null @@ -1,22 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i ova] source. *) - -val input_ova : string -> Types.input -(** [input_ova filename] sets up an input from vmware ova file. *) diff --git a/v2v/input_vmx.ml b/v2v/input_vmx.ml deleted file mode 100644 index 7b6996f04..000000000 --- a/v2v/input_vmx.ml +++ /dev/null @@ -1,522 +0,0 @@ -(* virt-v2v - * Copyright (C) 2017 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf -open Scanf - -open Std_utils -open Tools_utils -open Unix_utils -open Common_gettext.Gettext - -open Types -open Utils -open Name_from_disk - -type vmx_source = - | File of string (* local file or NFS *) - | SSH of Xml.uri (* SSH URI *) - -(* The single filename on the command line is intepreted either as - * a local file or a remote SSH URI (only if ‘-it ssh’). - *) -let vmx_source_of_arg input_transport arg = - match input_transport, arg with - | None, arg -> File arg - | Some `SSH, arg -> - let uri = - try Xml.parse_uri arg - with Invalid_argument _ -> - error (f_"remote vmx ‘%s’ could not be parsed as a URI") arg in - if uri.Xml.uri_scheme <> None && uri.Xml.uri_scheme <> Some "ssh" then - error (f_"vmx URI start with ‘ssh://...’"); - if uri.Xml.uri_server = None then - error (f_"vmx URI remote server name omitted"); - if uri.Xml.uri_path = None || uri.Xml.uri_path = Some "/" then - error (f_"vmx URI path component looks incorrect"); - SSH uri - -(* Return various fields from the URI. The checks in vmx_source_of_arg - * should ensure that none of these assertions fail. - *) -let port_of_uri { Xml.uri_port } = - match uri_port with i when i <= 0 -> None | i -> Some i -let server_of_uri { Xml.uri_server } = - match uri_server with None -> assert false | Some s -> s -let path_of_uri { Xml.uri_path } = - match uri_path with None -> assert false | Some p -> p - -let scp_supports_T_option = lazy ( - let cmd = "LANG=C scp -T |& grep \"unknown option\"" in - shell_command cmd <> 0 -) - -(* 'scp' a remote file into a temporary local file, returning the path - * of the temporary local file. - *) -let scp_from_remote_to_temporary uri tmpdir filename = - let localfile = tmpdir // filename in - - let cmd = - sprintf "scp%s%s%s %s%s:%s %s" - (if verbose () then "" else " -q") - (if Lazy.force scp_supports_T_option then " -T" else "") - (match port_of_uri uri with - | None -> "" - | Some port -> sprintf " -P %d" port) - (match uri.Xml.uri_user with - | None -> "" - | Some user -> quote user ^ "@") - (quote (server_of_uri uri)) - (* The double quoting of the path is counter-intuitive - * but correct, see: - * https://stackoverflow.com/questions/19858176/how-to-escape-spaces-in-path-during-scp-copy-in-linux - *) - (quote (quote (path_of_uri uri))) - (quote localfile) in - if verbose () then - eprintf "%s\n%!" cmd; - if Sys.command cmd <> 0 then - error (f_"could not copy the VMX file from the remote server, see earlier error messages"); - localfile - -(* Test if [path] exists on the remote server. *) -let remote_file_exists uri path = - let cmd = - sprintf "ssh%s %s%s test -f %s" - (match port_of_uri uri with - | None -> "" - | Some port -> sprintf " -p %d" port) - (match uri.Xml.uri_user with - | None -> "" - | Some user -> quote user ^ "@") - (quote (server_of_uri uri)) - (* Double quoting is necessary here, see above. *) - (quote (quote path)) in - if verbose () then - eprintf "%s\n%!" cmd; - Sys.command cmd = 0 - -let rec find_disks ?bandwidth input_password vmx vmx_source = - find_scsi_disks ?bandwidth input_password vmx vmx_source - @ find_ide_disks ?bandwidth input_password vmx vmx_source - -(* Find all SCSI hard disks. - * - * In the VMX file: - * scsi0.virtualDev = "pvscsi" # or may be "lsilogic" etc. - * scsi0:0.deviceType = "disk" | "plainDisk" | "rawDisk" | "scsi-hardDisk" - * | omitted - * scsi0:0.fileName = "guest.vmdk" - *) -and find_scsi_disks ?bandwidth input_password vmx vmx_source = - let get_scsi_controller_target ns = - sscanf ns "scsi%d:%d" (fun c t -> c, t) - in - let is_scsi_controller_target ns = - try ignore (get_scsi_controller_target ns); true - with Scanf.Scan_failure _ | End_of_file | Failure _ -> false - in - let scsi_device_types = [ Some "disk"; Some "plaindisk"; Some "rawdisk"; - Some "scsi-harddisk"; None ] in - let scsi_controller = Source_SCSI in - - find_hdds ?bandwidth input_password vmx vmx_source - get_scsi_controller_target is_scsi_controller_target - scsi_device_types scsi_controller - -(* Find all IDE hard disks. - * - * In the VMX file: - * ide0:0.deviceType = "ata-hardDisk" - * ide0:0.fileName = "guest.vmdk" - *) -and find_ide_disks ?bandwidth input_password vmx vmx_source = - let get_ide_controller_target ns = - sscanf ns "ide%d:%d" (fun c t -> c, t) - in - let is_ide_controller_target ns = - try ignore (get_ide_controller_target ns); true - with Scanf.Scan_failure _ | End_of_file | Failure _ -> false - in - let ide_device_types = [ Some "ata-harddisk" ] in - let ide_controller = Source_IDE in - - find_hdds ?bandwidth input_password vmx vmx_source - get_ide_controller_target is_ide_controller_target - ide_device_types ide_controller - -and find_hdds ?bandwidth input_password vmx vmx_source - get_controller_target is_controller_target - device_types controller = - (* Find namespaces matching '(ide|scsi)X:Y' with suitable deviceType. *) - let hdds = - Parse_vmx.select_namespaces ( - function - | [ns] -> - (* Check the namespace is '(ide|scsi)X:Y' *) - if not (is_controller_target ns) then false - else ( - (* Check the deviceType is one we are looking for. *) - let dt = Parse_vmx.get_string vmx [ns; "deviceType"] in - let dt = Option.map String.lowercase_ascii dt in - List.mem dt device_types - ) - | _ -> false - ) vmx in - - (* Map the subset to a list of disks. *) - let hdds = - Parse_vmx.map ( - fun path v -> - match path, v with - | [ns; "filename"], Some filename -> - let c, t = get_controller_target ns in - let uri, format = qemu_uri_of_filename ?bandwidth input_password - vmx_source filename in - let s = { s_disk_id = (-1); - s_qemu_uri = uri; s_format = Some format; - s_controller = Some controller } in - Some (c, t, s) - | _ -> None - ) hdds in - let hdds = List.filter_map identity hdds in - - (* We don't have a way to return the controllers and targets, so - * just make sure the disks are sorted into order, since Parse_vmx - * won't return them in any particular order. - *) - let hdds = List.sort compare hdds in - let hdds = List.map (fun (_, _, source) -> source) hdds in - - (* Set the s_disk_id field to an incrementing number. *) - let hdds = List.mapi (fun i source -> { source with s_disk_id = i }) hdds in - - hdds - -(* The filename can be an absolute path, but is more often a - * path relative to the location of the vmx file. - * - * This constructs a QEMU URI of the filename relative to the - * vmx file (which might be remote over SSH). - *) -and qemu_uri_of_filename ?bandwidth input_password vmx_source filename = - match vmx_source with - | File vmx_filename -> - (* Always ensure this returns an absolute path to avoid - * any confusion with filenames containing colons. - *) - absolute_path_from_other_file vmx_filename filename, "vmdk" - - | SSH uri -> - let vmx_path = path_of_uri uri in - let abs_path = absolute_path_from_other_file vmx_path filename in - let format = "vmdk" in - - (* XXX This is a hack to work around qemu / VMDK limitation - * "Cannot use relative extent paths with VMDK descriptor file" - * We can remove this if the above is fixed. - *) - let abs_path, format = - let flat_vmdk = - PCRE.replace (PCRE.compile "\\.vmdk$") "-flat.vmdk" abs_path in - if remote_file_exists uri flat_vmdk then (flat_vmdk, "raw") - else (abs_path, format) in - - let server = server_of_uri uri in - let port = Option.map string_of_int (port_of_uri uri) in - let user = uri.Xml.uri_user in - let password = - match input_password with - | None -> Nbdkit.NoPassword - | Some ip -> Nbdkit.PasswordFile ip in - - let nbdkit = Nbdkit.create_ssh ?bandwidth ~password ~server - ?port ?user abs_path in - let qemu_uri = Nbdkit.run nbdkit in - qemu_uri, format - -and absolute_path_from_other_file other_filename filename = - if not (Filename.is_relative filename) then filename - else (Filename.dirname (absolute_path other_filename)) // filename - -(* Find all removable disks. - * - * In the VMX file: - * ide1:0.deviceType = "cdrom-image" - * ide1:0.fileName = "boot.iso" - * - * XXX This only supports IDE CD-ROMs, but we could support SCSI - * CD-ROMs and floppies in future. - *) -and find_removables vmx = - let get_ide_controller_target ns = - sscanf ns "ide%d:%d" (fun c t -> c, t) - in - let is_ide_controller_target ns = - try ignore (get_ide_controller_target ns); true - with Scanf.Scan_failure _ | End_of_file | Failure _ -> false - in - let device_types = [ "atapi-cdrom"; - "cdrom-image"; "cdrom-raw" ] in - - (* Find namespaces matching 'ideX:Y' with suitable deviceType. *) - let devs = - Parse_vmx.select_namespaces ( - function - | [ns] -> - (* Check the namespace is 'ideX:Y' *) - if not (is_ide_controller_target ns) then false - else ( - (* Check the deviceType is one we are looking for. *) - match Parse_vmx.get_string vmx [ns; "deviceType"] with - | Some str -> - let str = String.lowercase_ascii str in - List.mem str device_types - | None -> false - ) - | _ -> false - ) vmx in - - (* Map the subset to a list of CD-ROMs. *) - let devs = - Parse_vmx.map ( - fun path v -> - match path, v with - | [ns], None -> - let c, t = get_ide_controller_target ns in - let s = { s_removable_type = CDROM; - s_removable_controller = Some Source_IDE; - s_removable_slot = Some (ide_slot c t) } in - Some s - | _ -> None - ) devs in - let devs = List.filter_map identity devs in - - (* Sort by slot. *) - let devs = - List.sort - (fun { s_removable_slot = s1 } { s_removable_slot = s2 } -> - compare s1 s2) - devs in - - devs - -and ide_slot c t = - (* Assuming the old master/slave arrangement. *) - c * 2 + t - -(* Find all ethernet cards. - * - * In the VMX file: - * ethernet0.virtualDev = "vmxnet3" - * ethernet0.networkName = "VM Network" - * ethernet0.generatedAddress = "00:01:02:03:04:05" - * ethernet0.connectionType = "bridged" # also: "custom", "nat" or not present - *) -and find_nics vmx = - let get_ethernet_port ns = - sscanf ns "ethernet%d" (fun p -> p) - in - let is_ethernet_port ns = - try ignore (get_ethernet_port ns); true - with Scanf.Scan_failure _ | End_of_file | Failure _ -> false - in - - (* Find namespaces matching 'ethernetX'. *) - let nics = - Parse_vmx.select_namespaces ( - function - | [ns] -> is_ethernet_port ns - | _ -> false - ) vmx in - - (* Map the subset to a list of NICs. *) - let nics = - Parse_vmx.map ( - fun path v -> - match path, v with - | [ns], None -> - let port = get_ethernet_port ns in - let mac = Parse_vmx.get_string vmx [ns; "generatedAddress"] in - let model = Parse_vmx.get_string vmx [ns; "virtualDev"] in - let model = - match model with - | Some m when String.lowercase_ascii m = "e1000" -> - Some Source_e1000 - | Some model -> - Some (Source_other_nic (String.lowercase_ascii model)) - | None -> None in - let vnet = Parse_vmx.get_string vmx [ns; "networkName"] in - let vnet = - match vnet with - | Some vnet -> vnet - | None -> ns (* "ethernetX" *) in - let vnet_type = - match Parse_vmx.get_string vmx [ns; "connectionType"] with - | Some b when String.lowercase_ascii b = "bridged" -> - Bridge - | Some _ | None -> Network in - Some (port, - { s_mac = mac; s_nic_model = model; - s_vnet = vnet; - s_vnet_type = vnet_type; - s_mapping_explanation = None }) - | _ -> None - ) nics in - let nics = List.filter_map identity nics in - - (* Sort by port. *) - let nics = List.sort compare nics in - - let nics = List.map (fun (_, source) -> source) nics in - nics - -class input_vmx input_password input_transport arg = - let tmpdir = - let base_dir = (open_guestfs ())#get_cachedir () in - let t = Mkdtemp.temp_dir ~base_dir "vmx." in - rmdir_on_exit t; - t in -object - inherit input - - method as_options = "-i vmx " ^ arg - - method source ?bandwidth () = - let vmx_source = vmx_source_of_arg input_transport arg in - - (* If the transport is SSH, fetch the file from remote, else - * parse it from local. - *) - let vmx = - match vmx_source with - | File filename -> Parse_vmx.parse_file filename - | SSH uri -> - let filename = scp_from_remote_to_temporary uri tmpdir "source.vmx" in - Parse_vmx.parse_file filename in - - let name = - match Parse_vmx.get_string vmx ["displayName"] with - | Some s -> s - | None -> - warning (f_"no displayName key found in VMX file"); - match vmx_source with - | File filename -> name_from_disk filename - | SSH uri -> name_from_disk (path_of_uri uri) in - - let genid = - (* See: https://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg02019.html *) - let genid_lo = Parse_vmx.get_int64 vmx ["vm"; "genid"] - and genid_hi = Parse_vmx.get_int64 vmx ["vm"; "genidX"] in - match genid_lo, genid_hi with - | None, None | Some _, None | None, Some _ -> - None - | Some lo, Some hi -> - (* The actual mapping from the two integers to the UUID - * (as defined by qemu and used by libvirt) is very complex. - * This code was determined empirically. See also: - * https://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg01505.html - *) - let sub = String.sub (sprintf "%016Lx%016Lx" lo hi) in - let uuid = - sub 8 8 ^ "-" ^ - sub 4 4 ^ "-" ^ - sub 0 4 ^ "-" ^ - sub 30 2 ^ sub 28 2 ^ "-" ^ - sub 26 2 ^ sub 24 2 ^ sub 22 2 ^ sub 20 2 ^ sub 18 2 ^ sub 16 2 in - Some uuid in - - let memory_mb = - match Parse_vmx.get_int64 vmx ["memSize"] with - | None -> 32_L (* default is really 32 MB! *) - | Some i -> i in - let memory = memory_mb *^ 1024L *^ 1024L in - - let vcpu = - match Parse_vmx.get_int vmx ["numvcpus"] with - | None -> 1 - | Some i -> i in - - let cpu_topology = - match Parse_vmx.get_int vmx ["cpuid"; "coresPerSocket"] with - | None -> None - | Some cores_per_socket -> - let sockets = vcpu / cores_per_socket in - if sockets <= 0 then ( - warning (f_"invalid cpuid.coresPerSocket < number of vCPUs"); - None - ) - else - Some { s_cpu_sockets = sockets; s_cpu_cores = cores_per_socket; - s_cpu_threads = 1 } in - - let firmware = - match Parse_vmx.get_string vmx ["firmware"] with - | None -> BIOS - | Some "efi" -> UEFI - (* Other values are not documented for this field ... *) - | Some fw -> - warning (f_"unknown firmware value '%s', assuming BIOS") fw; - BIOS in - - let video = - if Parse_vmx.namespace_present vmx ["svga"] then - (* We could also parse svga.vramSize. *) - Some (Source_other_video "vmvga") - else - None in - - let sound = - match Parse_vmx.get_string vmx ["sound"; "virtualDev"] with - | Some "sb16" -> Some { s_sound_model = SB16 } - | Some "es1371" -> Some { s_sound_model = ES1370 (* hmmm ... *) } - | Some "hdaudio" -> Some { s_sound_model = ICH6 (* intel-hda *) } - | Some model -> - warning (f_"unknown sound device '%s' ignored") model; - None - | None -> None in - - let disks = find_disks ?bandwidth input_password vmx vmx_source in - let removables = find_removables vmx in - let nics = find_nics vmx in - - let source = { - s_hypervisor = VMware; - s_name = name; - s_genid = genid; - s_orig_name = name; - s_memory = memory; - s_vcpu = vcpu; - s_cpu_vendor = None; - s_cpu_model = None; - s_cpu_topology = cpu_topology; - s_features = []; - s_firmware = firmware; - s_display = None; - s_video = video; - s_sound = sound; - s_removables = removables; - s_nics = nics; - } in - - source, disks -end - -let input_vmx = new input_vmx -let () = Modules_list.register_input_module "vmx" diff --git a/v2v/input_vmx.mli b/v2v/input_vmx.mli deleted file mode 100644 index 1570a2a93..000000000 --- a/v2v/input_vmx.mli +++ /dev/null @@ -1,23 +0,0 @@ -(* virt-v2v - * Copyright (C) 2017 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-i vmx] source. *) - -val input_vmx : string option -> [`SSH] option -> string -> Types.input -(** [input_vmx input_password input_transport arg] sets up an input - from vmware vmx file. *) diff --git a/v2v/inspect_source.ml b/v2v/inspect_source.ml deleted file mode 100644 index f0ac00832..000000000 --- a/v2v/inspect_source.ml +++ /dev/null @@ -1,235 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -module G = Guestfs - -open Types - -let rec inspect_source root_choice g = - let roots = g#inspect_os () in - let roots = Array.to_list roots in - let root = choose_root root_choice g roots in - - reject_if_not_installed_image g root; - - let typ = g#inspect_get_type root in - - (* Mount up the filesystems. *) - let mps = g#inspect_get_mountpoints root in - let cmp (a,_) (b,_) = compare (String.length a) (String.length b) in - let mps = List.sort cmp mps in - List.iter ( - fun (mp, dev) -> - (try g#mount dev mp - with G.Error msg -> - if mp = "/" then ( (* RHBZ#1145995 *) - if String.find msg "Windows" >= 0 && String.find msg "NTFS partition is in an unsafe state" >= 0 then - error (f_"unable to mount the disk image for writing. This has probably happened because Windows Hibernation or Fast Restart is being used in this guest. You have to disable this (in the guest) in order to use virt-v2v.\n\nOriginal error message: %s") msg - else - error "%s" msg - ) - else - warning (f_"%s (ignored)") msg - ); - - (* Some filesystems (hello, ntfs-3g) can silently fall back to - * a read-only mount. Check the root filesystem is really writable. - * RHBZ#1567763 - *) - if mp = "/" then ( - let file = sprintf "/%s" (String.random8 ()) in - (try g#touch file - with G.Error msg -> - if g#last_errno () = G.Errno.errno_EROFS then - error (f_"filesystem was mounted read-only, even though we asked for it to be mounted read-write. This usually means that the filesystem was not cleanly unmounted. Possible causes include trying to convert a guest which is running, or using Windows Hibernation or Fast Restart.\n\nOriginal error message: %s") msg - else - error (f_"could not write to the guest filesystem: %s") msg - ); - g#rm file - ) - ) mps; - - (* Get list of applications/packages installed. *) - let apps = g#inspect_list_applications2 root in - let apps = Array.to_list apps in - - (* A map of app2_name -> application2, for easier lookups. Note - * that app names are not unique! (eg. 'kernel' can appear multiple - * times) - *) - let apps_map = List.fold_left ( - fun map app -> - let name = app.G.app2_name in - let vs = try StringMap.find name map with Not_found -> [] in - StringMap.add name (app :: vs) map - ) StringMap.empty apps in - - (* If the guest is Windows, get some Windows-specific inspection - * data, else (for simplicity when accessing) use empty strings. - *) - let systemroot, software_hive, system_hive, current_cs = - match typ with - | "windows" -> - g#inspect_get_windows_systemroot root, - g#inspect_get_windows_software_hive root, - g#inspect_get_windows_system_hive root, - g#inspect_get_windows_current_control_set root - | _ -> - "", "", "", "" in - - let inspect = { - i_root = root; - i_type = typ; - i_distro = g#inspect_get_distro root; - i_osinfo = g#inspect_get_osinfo root; - i_arch = g#inspect_get_arch root; - i_major_version = g#inspect_get_major_version root; - i_minor_version = g#inspect_get_minor_version root; - i_package_format = g#inspect_get_package_format root; - i_package_management = g#inspect_get_package_management root; - i_product_name = g#inspect_get_product_name root; - i_product_variant = g#inspect_get_product_variant root; - i_mountpoints = mps; - i_apps = apps; - i_apps_map = apps_map; - i_firmware = get_firmware_bootable_device g; - i_windows_systemroot = systemroot; - i_windows_software_hive = software_hive; - i_windows_system_hive = system_hive; - i_windows_current_control_set = current_cs; - } in - debug "%s" (string_of_inspect inspect); - - sanity_check_inspection inspect; - - inspect - -and choose_root root_choice g = function - | [] -> - error (f_"inspection could not detect the source guest (or physical machine).\n\nAssuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.\n\nNo root device found in this operating system image."); - | [root] -> root (* only one root, so return it *) - | roots -> - (* If there are multiple roots, use the [--root] option supplied - * by the user to help us choose what we should do next. - *) - match root_choice with - | AskRoot -> - (* List out the roots and ask the user to choose. *) - printf "\n***\n"; - printf (f_"Dual- or multi-boot operating system detected. Choose the root filesystem\nthat contains the main operating system from the list below:\n"); - printf "\n"; - List.iteri ( - fun i root -> - let prod = g#inspect_get_product_name root in - match prod with - | "unknown" -> printf " [%d] %s\n" (i+1) root - | prod -> printf " [%d] %s (%s)\n" (i+1) root prod - ) roots; - printf "\n"; - let i = ref 0 in - let n = List.length roots in - while !i < 1 || !i > n do - printf (f_"Enter a number between 1 and %d, or ‘exit’: ") n; - let input = read_line () in - if input = "exit" || input = "q" || input = "quit" then - exit 0 - else ( - try i := int_of_string input - with - | End_of_file -> error (f_"connection closed") - | Failure _ -> () - ) - done; - List.nth roots (!i - 1) - - | SingleRoot -> - error (f_"multi-boot operating systems are not supported by virt-v2v. Use the --root option to change how virt-v2v handles this.") - - | FirstRoot -> - let root = List.hd roots in - info (f_"Picked %s because '--root first' was used.") root; - root - - | RootDev dev -> - let root = - if List.mem dev roots then dev - else - error (f_"root device %s not found. Roots found were: %s") - dev (String.concat " " roots) in - info (f_"Picked %s because '--root %s' was used.") root dev; - root - -(* Reject this OS if it doesn't look like an installed image. *) -and reject_if_not_installed_image g root = - let fmt = g#inspect_get_format root in - if fmt <> "installed" then - error (f_"libguestfs thinks this is not an installed operating system (it might be, for example, an installer disk or live CD). If this is wrong, it is probably a bug in libguestfs. root=%s fmt=%s") root fmt - -(* See if this guest could use UEFI to boot. It should use GPT and - * it should have an EFI System Partition (ESP). - * - * If it has ESP(s), then [UEFI devs] is returned where [devs] is the - * list of at least one ESP. - * - * Otherwise, [BIOS] is returned. - *) -and get_firmware_bootable_device g = - let rec uefi_ESP_guid = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - and is_uefi_ESP dev part = - let partnum = g#part_to_partnum part in - g#part_get_gpt_type dev partnum = uefi_ESP_guid - and parttype_is_gpt dev = - try g#part_get_parttype dev = "gpt" - with G.Error msg as exn -> - (* If it's _not_ "unrecognised disk label" then re-raise it. *) - if g#last_errno () <> G.Errno.errno_EINVAL then raise exn; - debug "%s (ignored)" msg; - false - and is_uefi_bootable_part part = - let dev = g#part_to_dev part in - parttype_is_gpt dev && is_uefi_ESP dev part - in - - let partitions = Array.to_list (g#list_partitions ()) in - let partitions = List.filter is_uefi_bootable_part partitions in - - match partitions with - | [] -> I_BIOS - | partitions -> I_UEFI partitions - -(* If some inspection fields are "unknown", then that indicates a - * failure in inspection, and we shouldn't continue. For an example - * of this, see RHBZ#1278371. However don't "assert" here, since - * the user might have pointed virt-v2v at a blank disk. Give an - * error message instead. - *) -and sanity_check_inspection inspect = - error_if_unknown "i_type" inspect.i_type; - error_if_unknown "i_distro" inspect.i_distro; - error_if_unknown "i_arch" inspect.i_arch - -and error_if_unknown fieldname value = - if value = "unknown" then - error (f_"inspection could not detect the source guest (or physical machine).\n\nAssuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.\n\nInspection field ‘%s’ was ‘unknown’.") - fieldname diff --git a/v2v/inspect_source.mli b/v2v/inspect_source.mli deleted file mode 100644 index 0b37bd6fb..000000000 --- a/v2v/inspect_source.mli +++ /dev/null @@ -1,32 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Inspect the source disk. - - This handles the [--root] command line option. *) - -val inspect_source : Types.root_choice -> Guestfs.guestfs -> Types.inspect -(** Inspect the source disk, returning inspection data. - - Before calling this, the disks must be added to the handle - and the handle must be launched. - - After calling this, the filesystems are mounted up. - - Depending on the contents of [root_choice] (the [--root] command - line option) this function may even be interactive. *) diff --git a/v2v/libvirt_utils.ml b/v2v/libvirt_utils.ml deleted file mode 100644 index e6d315403..000000000 --- a/v2v/libvirt_utils.ml +++ /dev/null @@ -1,108 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -(* This module provides helper methods on top of the Libvirt - module. *) - -let auth_for_password_file ?password_file () = - let auth_fn creds = - let password = Option.map read_first_line_from_file password_file in - List.map ( - function - | { Libvirt.Connect.typ = Libvirt.Connect.CredentialPassphrase } -> password - | _ -> None - ) creds - in - - { - Libvirt.Connect.credtype = [ Libvirt.Connect.CredentialPassphrase ]; - cb = auth_fn; - } - -let get_domain conn name = - let dom = - try - Libvirt.Domain.lookup_by_uuid_string conn name - with - (* No such domain. *) - | Libvirt.Virterror { code = VIR_ERR_NO_DOMAIN } - (* Invalid UUID string. *) - | Libvirt.Virterror { code = VIR_ERR_INVALID_ARG; domain = VIR_FROM_DOMAIN } -> - (try - Libvirt.Domain.lookup_by_name conn name - with - Libvirt.Virterror { code = VIR_ERR_NO_DOMAIN; message } -> - error (f_"cannot find libvirt domain ‘%s’: %s") - name (Option.default "" message) - ) in - let uri = Libvirt.Connect.get_uri conn in - (* As a side-effect we check that the domain is shut down. Of course - * this is only appropriate for virt-v2v. (RHBZ#1138586) - *) - if not (String.is_prefix uri "test:") then ( - (match (Libvirt.Domain.get_info dom).Libvirt.Domain.state with - | InfoRunning | InfoBlocked | InfoPaused -> - error (f_"libvirt domain ‘%s’ is running or paused. It must be shut down in order to perform virt-v2v conversion") - (Libvirt.Domain.get_name dom) - | InfoNoState | InfoShutdown | InfoShutoff | InfoCrashed | InfoPMSuspended -> - () - ) - ); - dom - -let get_pool conn name = - try - Libvirt.Pool.lookup_by_uuid_string conn name - with - (* No such pool. *) - | Libvirt.Virterror { code = VIR_ERR_NO_STORAGE_POOL } - (* Invalid UUID string. *) - | Libvirt.Virterror { code = VIR_ERR_INVALID_ARG; domain = VIR_FROM_STORAGE } -> - (try - Libvirt.Pool.lookup_by_name conn name - with Libvirt.Virterror { code = VIR_ERR_NO_STORAGE_POOL; message } -> - error (f_"cannot find libvirt pool ‘%s’: %s\n\nUse ‘virsh pool-list --all’ to list all available pools, and ‘virsh pool-dumpxml ’ to display details about a particular pool.\n\nTo set the pool which virt-v2v uses, add the ‘-os ’ option.") - name (Option.default "" message) - ) - -let get_volume pool name = - try - Libvirt.Volume.lookup_by_name pool name - with - (* No such volume. *) - | Libvirt.Virterror { code = VIR_ERR_NO_STORAGE_VOL; message } -> - error (f_"cannot find libvirt volume ‘%s’: %s") - name (Option.default "" message) - -let domain_exists conn dom = - try - ignore (Libvirt.Domain.lookup_by_name conn dom); - true - with - Libvirt.Virterror { code = VIR_ERR_NO_DOMAIN } -> false - -let libvirt_get_version () = - let v, _ = Libvirt.get_version () in - let v_major = v / 1000000 in - let v_minor = (v / 1000) mod 1000 in - let v_micro = v mod 1000 in - (v_major, v_minor, v_micro) diff --git a/v2v/libvirt_utils.mli b/v2v/libvirt_utils.mli deleted file mode 100644 index 91b2997ee..000000000 --- a/v2v/libvirt_utils.mli +++ /dev/null @@ -1,52 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** This module provides helper methods on top of the [Libvirt] - module. *) - -val auth_for_password_file : ?password_file:string -> unit -> Libvirt.Connect.auth -(** [auth_for_password_file ?password_file ()] returns a - {!Libvirt.Connect.auth} record to use when opening a new libvirt - connection with {!Libvirt.Connect.connect_auth} or - {!Libvirt.Connect.connect_auth_readonly}. The record will - authenticate using the password specified in the first line of - [?password_file], if specified. *) - -val get_domain : Libvirt.rw Libvirt.Connect.t -> string -> Libvirt.rw Libvirt.Domain.t -(** [get_domain conn dom] returns the libvirt domain with the - specified [dom] name or UUID. [conn] is the libvirt - connection. *) - -val get_pool : Libvirt.rw Libvirt.Connect.t -> string -> Libvirt.rw Libvirt.Pool.t -(** [get_pool conn pool] returns the libvirt pool with the - specified [pool] name or UUID. [conn] is the libvirt - connection. *) - -val get_volume : Libvirt.rw Libvirt.Pool.t -> string -> Libvirt.rw Libvirt.Volume.t -(** [get_volume pool vol] returns the libvirt volume with the - specified [vol] name or UUID, as part of the pool [pool]. *) - -val domain_exists : Libvirt.rw Libvirt.Connect.t -> string -> bool -(** [domain_exists conn dom] returns a boolean indicating if the - the libvirt XML domain [dom] exists. [conn] is the libvirt - connection. - [dom] may be a guest name, but not a UUID. *) - -val libvirt_get_version : unit -> int * int * int -(** [libvirt_get_version] returns the triple [(major, minor, release)] - version number of the libvirt library that we are linked against. *) diff --git a/v2v/linux.ml b/v2v/linux.ml deleted file mode 100644 index 4949c8e16..000000000 --- a/v2v/linux.ml +++ /dev/null @@ -1,202 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils - -module G = Guestfs - -let re_version = PCRE.compile "(\\d+)\\.(\\d+)" - -let augeas_reload g = - g#aug_load (); - debug_augeas_errors g - -let rec install_local g { i_package_format = package_format } packages = - if packages <> [] then ( - match package_format with - | "rpm" -> - let cmd = [ "rpm"; "--upgrade"; "-v" ] @ packages in - let cmd = Array.of_list cmd in - ignore (g#command cmd) - | format -> - error (f_"don’t know how to install packages using %s: packages: %s") - format (String.concat " " packages) - (* Reload Augeas in case anything changed. *) - augeas_reload g - ) - -let rec remove g inspect packages = - if packages <> [] then ( - do_remove g inspect packages; - (* Reload Augeas in case anything changed. *) - augeas_reload g - ) - -and do_remove g { i_package_format = package_format } packages = - assert (List.length packages > 0); - match package_format with - | "deb" -> - let cmd = [ "dpkg"; "--purge" ] @ packages in - let cmd = Array.of_list cmd in - ignore (g#command cmd); - - | "rpm" -> - let cmd = [ "rpm"; "-e" ] @ packages in - let cmd = Array.of_list cmd in - ignore (g#command cmd) - - | format -> - error (f_"don’t know how to remove packages using %s: packages: %s") - format (String.concat " " packages) - -let file_list_of_package (g : Guestfs.guestfs) inspect app = - match inspect.i_package_format with - | "deb" -> - let cmd = [| "dpkg"; "-L"; app.G.app2_name |] in - debug "%s" (String.concat " " (Array.to_list cmd)); - let files = g#command_lines cmd in - let files = Array.to_list files in - List.sort compare files - - | "rpm" -> - (* Since RPM allows multiple packages installed with the same - * name, always check the full NEVR here (RHBZ#1161250). - * - * In RPM < 4.11 query commands that use the epoch number in the - * package name did not work. - * - * For example: - * RHEL 6 (rpm 4.8.0): - * $ rpm -q tar-2:1.23-11.el6.x86_64 - * package tar-2:1.23-11.el6.x86_64 is not installed - * Fedora 20 (rpm 4.11.2): - * $ rpm -q tar-2:1.26-30.fc20.x86_64 - * tar-1.26-30.fc20.x86_64 - *) - let is_rpm_lt_4_11 () = - let ver = - try - let ver = List.find_map ( - function - | { G.app2_name = name; G.app2_version = version } - when name = "rpm" -> Some version - | _ -> None - ) inspect.i_apps in - if PCRE.matches re_version ver then - (int_of_string (PCRE.sub 1), int_of_string (PCRE.sub 2)) - else - (0, 0) - with Not_found -> - (* 'rpm' not installed? Hmm... *) - (0, 0) in - ver < (4, 11) - in - let pkg_name = - if app.G.app2_epoch = Int32.zero || is_rpm_lt_4_11 () then - sprintf "%s-%s-%s" app.G.app2_name app.G.app2_version - app.G.app2_release - else - sprintf "%s-%ld:%s-%s" app.G.app2_name app.G.app2_epoch - app.G.app2_version app.G.app2_release in - let cmd = [| "rpm"; "-ql"; pkg_name |] in - debug "%s" (String.concat " " (Array.to_list cmd)); - let files = g#command_lines cmd in - let files = Array.to_list files in - List.sort compare files - - | format -> - error (f_"don’t know how to get list of files from package using %s") - format - -let is_file_owned (g : G.guestfs) { i_package_format = package_format } path = - match package_format with - | "deb" -> - (* With dpkg usually the directories are owned by all the packages - * that install anything in them. Also with multiarch the same - * package is allowed (although with different architectures). - * This function returns only one package in all the cases. - *) - let cmd = [| "dpkg"; "-S"; path |] in - debug "%s" (String.concat " " (Array.to_list cmd)); - (try - let lines = g#command_lines cmd in - if Array.length lines = 0 then - error (f_"internal error: is_file_owned: dpkg command returned no output"); - (* Just check the output looks something like "pkg: filename". *) - if String.find lines.(0) ": " >= 0 then - true - else - error (f_"internal error: is_file_owned: unexpected output from dpkg command: %s") - lines.(0) - with Guestfs.Error msg as exn -> - if String.find msg "no path found matching pattern" >= 0 then - false - else - raise exn - ) - - | "rpm" -> - (* Run rpm -qf and print a magic string if the file is owned. - * If not owned, rpm will print "... is not owned by any package" - * and exit with an error. Unfortunately the string is sent to - * stdout, so here we ignore the exit status of rpm and just - * look for one of the two strings. - *) - let magic = "FILE_OWNED_TEST" in - let cmd = sprintf "rpm -qf --qf %s %s 2>&1 ||:" - (quote (magic ^ "\n")) (quote path) in - let r = g#sh cmd in - if String.find r magic >= 0 then true - else if String.find r "is not owned" >= 0 then false - else failwithf "RPM file owned test failed: %s" r - - | format -> - error (f_"don’t know how to find file owner using %s") format - -let is_package_manager_save_file filename = - (* Recognized suffixes of package managers. *) - let suffixes = [ ".dpkg-old"; ".dpkg-new"; ".rpmsave"; ".rpmnew"; ] in - List.exists (Filename.check_suffix filename) suffixes - -let binary_package_extension { i_package_format = package_format } = - match package_format with - | "deb" -> "deb" - | "rpm" -> "rpm" - | format -> - error (f_"don’t know what is the extension of binary packages using %s") - format - -let architecture_string { i_package_format = package_format; i_arch = arch; - i_distro = distro } = - match package_format, distro, arch with - | "deb", _, "x86_64" -> "amd64" - | "deb", _, a -> a - | "rpm", ("sles"|"suse-based"|"opensuse"), "i386" -> "i586" - | "rpm", ("sles"|"suse-based"|"opensuse"), a -> a - | "rpm", _, "i386" -> "i686" - | "rpm", _, a -> a - | format, distro, arch -> - error (f_"don’t know what is the architecture string of %s using %s on %s") - arch format distro diff --git a/v2v/linux.mli b/v2v/linux.mli deleted file mode 100644 index 30099745c..000000000 --- a/v2v/linux.mli +++ /dev/null @@ -1,48 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Common Linux functions. *) - -val augeas_reload : Guestfs.guestfs -> unit -(** Wrapper around [g#aug_load], which (if verbose) provides - additional debugging information about parsing problems - that augeas found. *) - -val install_local: Guestfs.guestfs -> Types.inspect -> string list -> unit -(** Install package(s). *) - -val remove : Guestfs.guestfs -> Types.inspect -> string list -> unit -(** Uninstall package(s). *) - -val file_list_of_package : Guestfs.guestfs -> Types.inspect -> Guestfs.application2 -> string list -(** Return list of files owned by package. *) - -val is_file_owned : Guestfs.guestfs -> Types.inspect -> string -> bool -(** Returns true if the file is owned by an installed package. *) - -val is_package_manager_save_file : string -> bool -(** Return true if the filename is something like [*.rpmsave], ie. - a package manager save-file. *) - -val binary_package_extension : Types.inspect -> string -(** Return the extension typically used for binary packages in the - specified package format. *) - -val architecture_string : Types.inspect -> string -(** Return the architecture string typically used for binary packages - in the specified package format, and for the specified distro. *) diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml deleted file mode 100644 index de3d107e9..000000000 --- a/v2v/linux_bootloaders.ml +++ /dev/null @@ -1,395 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils - -module G = Guestfs - -class virtual bootloader = object - method virtual name : string - method virtual augeas_device_patterns : string list - method virtual list_kernels : string list - method virtual set_default_kernel : string -> unit - method set_augeas_configuration () = false - method virtual configure_console : unit -> unit - method virtual remove_console : unit -> unit - method update () = () -end - -(* Helper function for SUSE: remove (hdX,X) prefix from a path. *) -let remove_hd_prefix = - let rex = PCRE.compile "^\\(hd.*\\)" in - PCRE.replace rex "" - -(* Grub1 (AKA grub-legacy) representation. *) -class bootloader_grub1 (g : G.guestfs) inspect grub_config = - let () = - (* Apply the "grub" lens if it is not handling the file - * already -- Augeas < 1.7.0 will error out otherwise. - *) - if g#aug_ls ("/files" ^ grub_config) = [||] then - g#aug_transform "grub" grub_config in - - (* Grub prefix? Usually "/boot". *) - let grub_prefix = - let mounts = g#inspect_get_mountpoints inspect.i_root in - try - List.find ( - fun path -> List.mem_assoc path mounts - ) [ "/boot/grub"; "/boot" ] - with Not_found -> "" in -object - inherit bootloader - - method name = "grub1" - - method augeas_device_patterns = [ - "/files" ^ grub_config ^ "/*/kernel/root"; - "/files" ^ grub_config ^ "/*/kernel/resume"; - "/files/boot/grub/device.map/*[label() != \"#comment\"]"; - "/files/etc/sysconfig/grub/boot"; - ] - - method list_kernels = - let paths = - let expr = sprintf "/files%s/title/kernel" grub_config in - let paths = g#aug_match expr in - let paths = Array.to_list paths in - - (* Remove duplicates. *) - let paths = List.remove_duplicates paths in - - (* Get the default kernel from grub if it's set. *) - let default = - let expr = sprintf "/files%s/default" grub_config in - try - let idx = g#aug_get expr in - let idx = int_of_string idx in - (* Grub indices are zero-based, augeas is 1-based. *) - let expr = - sprintf "/files%s/title[%d]/kernel" grub_config (idx+1) in - Some expr - with G.Error msg - when String.find msg "aug_get: no matching node" >= 0 -> - None in - - (* If a default kernel was set, put it at the beginning of the paths - * list. If not set, assume the first kernel always boots (?) - *) - match default with - | None -> paths - | Some p -> p :: List.filter ((<>) p) paths in - - (* Resolve the Augeas paths to kernel filenames. *) - let vmlinuzes = List.map g#aug_get paths in - - (* Make sure kernel does not begin with (hdX,X). *) - let vmlinuzes = List.map remove_hd_prefix vmlinuzes in - - (* Prepend grub filesystem. *) - List.map ((^) grub_prefix) vmlinuzes - - method set_default_kernel vmlinuz = - if not (String.is_prefix vmlinuz grub_prefix) then - error (f_"kernel %s is not under grub tree %s") - vmlinuz grub_prefix; - let kernel_under_grub_prefix = - let prefix_len = String.length grub_prefix in - let kernel_len = String.length vmlinuz in - String.sub vmlinuz prefix_len (kernel_len - prefix_len) in - - (* Find the grub entry for the given kernel. *) - let paths = g#aug_match (sprintf "/files%s/title/kernel[. = '%s']" - grub_config kernel_under_grub_prefix) in - let paths = Array.to_list paths in - if paths = [] then - error (f_"didn't find grub entry for kernel %s") vmlinuz; - let path = List.hd paths in - let rex = PCRE.compile "/title(?:\\[(\\d+)\\])?/kernel" in - if not (PCRE.matches rex path) then - error (f_"internal error: regular expression did not match ‘%s’") - path; - let index = try int_of_string (PCRE.sub 1) - 1 with Not_found -> 0 in - g#aug_set (sprintf "/files%s/default" grub_config) (string_of_int index); - g#aug_save () - - method set_augeas_configuration () = - let incls = g#aug_match "/augeas/load/Grub/incl" in - let incls = Array.to_list incls in - let incls_contains_conf = - List.exists (fun incl -> g#aug_get incl = grub_config) incls in - if not incls_contains_conf then ( - g#aug_set "/augeas/load/Grub/incl[last()+1]" grub_config; - true - ) else - false - - method configure_console () = - let rex = PCRE.compile "\\b([xh]vc0)\\b" in - let expr = sprintf "/files%s/title/kernel/console" grub_config in - - let paths = g#aug_match expr in - let paths = Array.to_list paths in - List.iter ( - fun path -> - let console = g#aug_get path in - let console' = PCRE.replace ~global:true rex "ttyS0" console in - if console <> console' then g#aug_set path console' - ) paths; - - g#aug_save () - - method remove_console () = - let rex = PCRE.compile "\\b([xh]vc0)\\b" in - let expr = sprintf "/files%s/title/kernel/console" grub_config in - - let rec loop = function - | [] -> () - | path :: paths -> - let console = g#aug_get path in - if PCRE.matches rex console then ( - ignore (g#aug_rm path); - (* All the paths are invalid, restart the loop. *) - let paths = g#aug_match expr in - let paths = Array.to_list paths in - loop paths - ) - else - loop paths - in - let paths = g#aug_match expr in - let paths = Array.to_list paths in - loop paths; - - g#aug_save () -end - -(** The method used to get and set the default kernel in Grub2. *) -type default_kernel_method = - | MethodGrubby (** Use the 'grubby' tool. *) - | MethodPerlBootloader (** Use the 'Bootloader::Tools' Perl module. *) - | MethodNone (** No known way. *) - -(* Grub2 representation. *) -class bootloader_grub2 (g : G.guestfs) grub_config = - - let grub2_mkconfig_cmd = - let elems = [ - "/sbin/grub2-mkconfig"; - "/usr/sbin/grub2-mkconfig"; - "/sbin/grub-mkconfig"; - "/usr/sbin/grub-mkconfig" - ] in - try List.find (g#is_file ~followsymlinks:true) elems - with Not_found -> - error (f_"failed to find grub2-mkconfig binary (but Grub2 was detected on guest)") - in - - let get_default_method = - let has_perl_bootloader () = - try - ignore (g#command [| "/usr/bin/perl"; "-MBootloader::Tools"; "-e1" |]); - true - with G.Error _ -> false - in - if g#exists "/sbin/grubby" then MethodGrubby - else if has_perl_bootloader () then MethodPerlBootloader - else ( - warning (f_"could not determine a way to update the configuration of Grub2"); - MethodNone - ) in - -object (self) - inherit bootloader - - method name = "grub2" - - method augeas_device_patterns = [ - "/files/etc/sysconfig/grub/GRUB_CMDLINE_LINUX"; - "/files/etc/default/grub/GRUB_CMDLINE_LINUX"; - "/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT"; - "/files/boot/grub2/device.map/*[label() != \"#comment\"]"; - "/files/boot/grub/device.map/*[label() != \"#comment\"]"; - ] - - method list_kernels = - let get_default_image () = - let res = - match get_default_method with - | MethodGrubby -> - let res = g#command [| "grubby"; "--default-kernel" |] in - (match res with - | "" -> None - | _ -> Some res) - | MethodPerlBootloader -> - let cmd = - [| "/usr/bin/perl"; "-MBootloader::Tools"; "-e"; " - InitLibrary(); - my $default = Bootloader::Tools::GetDefaultSection (); - if (!defined $default) { - print 'NODEFAULTSECTION' - } - elsif (exists $default->{image}) { - print $default->{image} - } - else { - die 'no $default->{image}' # should never happen - } - " |] in - let res = g#command cmd in - (match res with - | "NODEFAULTSECTION" -> None - | _ -> Some res) - | MethodNone -> - None in - match res with - | None -> None - | Some k -> - let k = String.chomp k in - Some (remove_hd_prefix k) - in - - let vmlinuzes = - (match get_default_image () with - | None -> [] - | Some k -> [k]) @ - (* This is how the grub2 config generator enumerates kernels. *) - Array.to_list (g#glob_expand "/boot/kernel-*") @ - Array.to_list (g#glob_expand "/boot/vmlinuz-*") @ - Array.to_list (g#glob_expand "/vmlinuz-*") in - let vmlinuzes = List.filter ( - fun filename -> not (Linux.is_package_manager_save_file filename) - ) vmlinuzes in - vmlinuzes - - method set_default_kernel vmlinuz = - match get_default_method with - | MethodGrubby -> - ignore (g#command [| "grubby"; "--set-default"; vmlinuz |]) - | MethodPerlBootloader -> - let cmd = - [| "/usr/bin/perl"; "-MBootloader::Tools"; "-e"; sprintf " - InitLibrary(); - my @sections = GetSectionList(type=>image, image=>\"%s\"); - my $section = GetSection(@sections); - my $newdefault = $section->{name}; - SetGlobals(default, \"$newdefault\"); - " vmlinuz |] in - ignore (g#command cmd) - | MethodNone -> () - - method private grub2_update_console ~remove () = - let rex = PCRE.compile "\\bconsole=[xh]vc0\\b" in - - let paths = [ - "/files/etc/sysconfig/grub/GRUB_CMDLINE_LINUX"; - "/files/etc/default/grub/GRUB_CMDLINE_LINUX"; - "/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT" - ] in - let paths = List.map g#aug_match paths in - let paths = List.map Array.to_list paths in - let paths = List.flatten paths in - match paths with - | [] -> - if not remove then - warning (f_"could not add grub2 serial console (ignored)") - else - warning (f_"could not remove grub2 serial console (ignored)") - | path :: _ -> - let grub_cmdline = g#aug_get path in - if PCRE.matches rex grub_cmdline then ( - let new_grub_cmdline = - if not remove then - PCRE.replace ~global:true rex "console=ttyS0" grub_cmdline - else - PCRE.replace ~global:true rex "" grub_cmdline in - g#aug_set path new_grub_cmdline; - g#aug_save (); - - try - ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |]) - with - G.Error msg -> - warning (f_"could not rebuild grub2 configuration file (%s). This may mean that grub output will not be sent to the serial port, but otherwise should be harmless. Original error message: %s") - grub_config msg - ) - - method configure_console = self#grub2_update_console ~remove:false - - method remove_console = self#grub2_update_console ~remove:true - - method update () = - ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |]) -end - -(* Helper type used in detect_bootloader. *) -type bootloader_type = - | Grub1 - | Grub2 - -let detect_bootloader (g : G.guestfs) inspect = - (* Where to start searching for bootloaders. *) - let mp = - match inspect.i_firmware with - | I_BIOS -> "/boot" - | I_UEFI _ -> "/boot/efi/EFI" in - - (* Find all paths below the mountpoint, then filter them to find - * the grub config file. - *) - let paths = - try List.map ((^) mp) (Array.to_list (g#find mp)) - with G.Error msg -> - error (f_"could not find bootloader mount point (%s): %s") mp msg in - - (* We can determine if the bootloader config file is grub 1 or - * grub 2 just by looking at the filename. - *) - let bootloader_type_of_filename path = - match last_part_of path '/' with - | Some "grub.cfg" -> Some Grub2 - | Some ("grub.conf" | "menu.lst") -> Some Grub1 - | Some _ - | None -> None - in - - let grub_config, typ = - let rec loop = function - | [] -> error (f_"no bootloader detected") - | path :: paths -> - match bootloader_type_of_filename path with - | None -> loop paths - | Some typ -> - if not (g#is_file ~followsymlinks:true path) then loop paths - else path, typ - in - loop paths in - - let bl = - match typ with - | Grub1 -> new bootloader_grub1 g inspect grub_config - | Grub2 -> new bootloader_grub2 g grub_config in - debug "detected bootloader %s at %s" bl#name grub_config; - bl diff --git a/v2v/linux_bootloaders.mli b/v2v/linux_bootloaders.mli deleted file mode 100644 index 30cdfe3c7..000000000 --- a/v2v/linux_bootloaders.mli +++ /dev/null @@ -1,52 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -class virtual bootloader : object - method virtual name : string - (** The name of the bootloader, for debugging messages. *) - - method virtual augeas_device_patterns : string list - (** A list of Augeas patterns to search for device names when we - need to rewrite device names (eg. [/dev/hda] to [/dev/vda]). *) - - method virtual list_kernels : string list - (** Lists all the kernels configured in the bootloader. *) - - method virtual set_default_kernel : string -> unit - (** Sets the specified vmlinuz path as default bootloader entry. *) - - method set_augeas_configuration : unit -> bool - (** Checks whether the bootloader configuration file is included - in Augeas load list, and if it is not, then include it. - - Returns true if Augeas needs to be reloaded. *) - - method virtual configure_console : unit -> unit - method virtual remove_console : unit -> unit - (** Adds or removes a serial console to all the available kernels. *) - - method update : unit -> unit - (** Update the bootloader: For grub2 only this runs the - [grub2-mkconfig] command to rebuild the configuration. This - is not necessary for grub-legacy. *) -end -(** Encapsulates a Linux boot loader as object. *) - -val detect_bootloader : Guestfs.guestfs -> Types.inspect -> bootloader -(** Detects the bootloader on the guest, and creates the object - representing it. *) diff --git a/v2v/linux_kernels.ml b/v2v/linux_kernels.ml deleted file mode 100644 index 30160f0da..000000000 --- a/v2v/linux_kernels.ml +++ /dev/null @@ -1,331 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Detect which kernels are installed and offered by the bootloader. *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types - -module G = Guestfs - -(* Kernel information. *) -type kernel_info = { - ki_app : G.application2; - ki_name : string; - ki_version : string; - ki_arch : string; - ki_vmlinuz : string; - ki_vmlinuz_stat : G.statns; - ki_initrd : string option; - ki_modpath : string; - ki_modules : string list; - ki_supports_virtio_blk : bool; - ki_supports_virtio_net : bool; - ki_supports_virtio_rng : bool; - ki_supports_virtio_balloon : bool; - ki_supports_isa_pvpanic : bool; - ki_is_xen_pv_only_kernel : bool; - ki_is_debug : bool; - ki_config_file : string option; -} - -let print_kernel_info chan prefix ki = - let fpf fs = output_string chan prefix; fprintf chan fs in - fprintf chan "* %s %s (%s)\n" ki.ki_name ki.ki_version ki.ki_arch; - fpf "%s\n" ki.ki_vmlinuz; - fpf "%s\n" (match ki.ki_initrd with None -> "no initrd" | Some s -> s); - fpf "%s\n" (match ki.ki_config_file with None -> "no config" | Some s -> s); - fpf "%s\n" ki.ki_modpath; - fpf "%d modules found\n" (List.length ki.ki_modules); - fpf "virtio: blk=%b net=%b rng=%b balloon=%b\n" - ki.ki_supports_virtio_blk ki.ki_supports_virtio_net - ki.ki_supports_virtio_rng ki.ki_supports_virtio_balloon; - fpf "pvpanic=%b xen=%b debug=%b\n" - ki.ki_supports_isa_pvpanic ki.ki_is_xen_pv_only_kernel ki.ki_is_debug - -let rex_ko = PCRE.compile "\\.k?o(?:\\.xz)?$" -let rex_ko_extract = PCRE.compile "/([^/]+)\\.k?o(?:\\.xz)?$" - -let detect_kernels (g : G.guestfs) inspect family bootloader = - (* What kernel/kernel-like packages are installed on the current guest? *) - let installed_kernels : kernel_info list = - let check_config feature = function - | None -> false - | Some config -> - let prefix = "^CONFIG_" ^ String.uppercase_ascii feature ^ "=" in - let lines = g#grep ~extended:true prefix config in - let lines = Array.to_list lines in - match lines with - | [] -> false - | line :: _ -> - let kind = snd (String.split "=" line) in - (match kind with - | "m" | "y" -> true - | _ -> false - ) - in - let rex_initrd = - if family = `Debian_family then - PCRE.compile "^initrd.img-.*$" - else - PCRE.compile "^initr(?:d|amfs)-.*(?:\\.img)?$" in - List.filter_map ( - function - | { G.app2_name = name } as app - when name = "kernel" || String.is_prefix name "kernel-" - || String.is_prefix name "linux-image-" -> - (try - (* For each kernel, list the files directly owned by the kernel. *) - let files = Linux.file_list_of_package g inspect app in - - if files = [] then ( - warning (f_"package ‘%s’ contains no files") name; - None - ) - else ( - (* Which of these is the kernel itself? Also, make sure to check - * it exists by stat'ing it. - *) - let vmlinuz = List.find ( - fun filename -> String.is_prefix filename "/boot/vmlinuz-" - ) files in - let vmlinuz_stat = - try g#statns vmlinuz with G.Error _ -> raise Not_found in - - (* Determine the modpath from the package, falling back to the - * version in the vmlinuz file name. - *) - let modpath, version = - let prefix = "/lib/modules/" in - try - let prefix_len = String.length prefix in - List.find_map ( - fun filename -> - let filename_len = String.length filename in - if filename_len > prefix_len && - String.is_prefix filename prefix then ( - let version = String.sub filename prefix_len - (filename_len - prefix_len) in - Some (filename, version) - ) else - None - ) files - with Not_found -> - let version = - String.sub vmlinuz 14 (String.length vmlinuz - 14) in - let modpath = prefix ^ version in - modpath, version in - - (* Check that the modpath exists. *) - if not (g#is_dir ~followsymlinks:true modpath) then - raise Not_found; - - (* Find the initramfs which corresponds to the kernel. - * Since the initramfs is built at runtime, and doesn't have - * to be covered by the RPM file list, this is basically - * guesswork. - *) - let initrd = - let files = g#ls "/boot" in - let files = Array.to_list files in - let files = - List.filter (fun n -> PCRE.matches rex_initrd n) files in - let files = - List.filter ( - fun n -> - String.find n version >= 0 - ) files in - (* Don't consider kdump initramfs images (RHBZ#1138184). *) - let files = - List.filter (fun n -> String.find n "kdump" == -1) files in - (* If several files match, take the shortest match. This - * handles the case where we have a mix of same-version non-Xen - * and Xen kernels: - * initrd-2.6.18-308.el5.img - * initrd-2.6.18-308.el5xen.img - * and kernel 2.6.18-308.el5 (non-Xen) will match both - * (RHBZ#1141145). - *) - let cmp a b = compare (String.length a) (String.length b) in - let files = List.sort cmp files in - match files with - | [] -> - warning (f_"no initrd was found in /boot matching %s %s.") - name version; - None - | x :: _ -> Some ("/boot/" ^ x) in - - (* Get all modules, which might include custom-installed - * modules that don't appear in 'files' list above. - *) - let modules = g#find modpath in - let modules = Array.to_list modules in - let modules = - List.filter (fun m -> PCRE.matches rex_ko m) modules in - assert (List.length modules > 0); - - (* Determine the kernel architecture by looking at the - * architecture of a kernel module. - * - * To avoid architecture detection issues with 3rd party - * modules (RHBZ#1690574), try to pick one of the well - * known modules, if available. Otherwise, an arbitrary - * module is used. - *) - let arch = - (* Well known kernel modules. *) - let candidates = [ "virtio"; "kvm" ] in - let all_candidates = List.flatten ( - List.map ( - fun f -> - [ "/" ^ f ^ ".o"; "/" ^ f ^ ".ko"; "/" ^ f ^ ".ko.xz" ] - ) candidates - ) in - let candidate = - try - List.find ( - fun m -> - List.exists (String.is_suffix m) all_candidates - ) modules - with Not_found -> - (* No known module found, pick an arbitrary one - * (the first). - *) - List.hd modules in - let candidate = modpath ^ candidate in - g#file_architecture (g#realpath candidate) in - - (* Just return the module names, without path or extension. *) - let modules = List.filter_map ( - fun m -> - if PCRE.matches rex_ko_extract m then - Some (PCRE.sub 1) - else - None - ) modules in - assert (List.length modules > 0); - - let config_file = - let cfg = "/boot/config-" ^ version in - if g#is_file ~followsymlinks:true cfg then Some cfg - else None in - - let kernel_supports what kconf = - List.mem what modules || check_config kconf config_file in - - let supports_virtio_blk = - kernel_supports "virtio_blk" "VIRTIO_BLK" in - let supports_virtio_net = - kernel_supports "virtio_net" "VIRTIO_NET" in - let supports_virtio_rng = - kernel_supports "virtio-rng" "HW_RANDOM_VIRTIO" in - let supports_virtio_balloon = - kernel_supports "virtio_balloon" "VIRTIO_BALLOON" in - let supports_isa_pvpanic = - kernel_supports "pvpanic" "PVPANIC" in - let is_xen_pv_only_kernel = - check_config "X86_XEN" config_file || - check_config "X86_64_XEN" config_file in - - (* If the package name is like "kernel-debug", then it's - * a debug kernel. - *) - let is_debug = - String.is_suffix app.G.app2_name "-debug" || - String.is_suffix app.G.app2_name "-dbg" in - - Some { - ki_app = app; - ki_name = name; - ki_version = version; - ki_arch = arch; - ki_vmlinuz = vmlinuz; - ki_vmlinuz_stat = vmlinuz_stat; - ki_initrd = initrd; - ki_modpath = modpath; - ki_modules = modules; - ki_supports_virtio_blk = supports_virtio_blk; - ki_supports_virtio_net = supports_virtio_net; - ki_supports_virtio_rng = supports_virtio_rng; - ki_supports_virtio_balloon = supports_virtio_balloon; - ki_supports_isa_pvpanic = supports_isa_pvpanic; - ki_is_xen_pv_only_kernel = is_xen_pv_only_kernel; - ki_is_debug = is_debug; - ki_config_file = config_file; - } - ) - - with Not_found -> None - ) - - | _ -> None - ) inspect.i_apps in - - if verbose () then ( - eprintf "installed kernel packages in this guest:\n"; - List.iter (print_kernel_info stderr "\t") installed_kernels; - flush stderr - ); - - if installed_kernels = [] then - error (f_"no installed kernel packages were found.\n\nThis probably indicates that %s was unable to inspect this guest properly.") - prog; - - (* Now the difficult bit. Get the bootloader kernels. The first in this - * list is the default booting kernel. - *) - let bootloader_kernels : kernel_info list = - let vmlinuzes = bootloader#list_kernels in - - (* Map these to installed kernels. *) - List.filter_map ( - fun vmlinuz -> - try - let statbuf = g#statns vmlinuz in - let kernel = - List.find ( - fun { ki_vmlinuz_stat = s } -> - statbuf.G.st_dev = s.G.st_dev && statbuf.G.st_ino = s.G.st_ino - ) installed_kernels in - Some kernel - with - | Not_found -> None - | G.Error msg as exn -> - (* If it isn't "no such file or directory", then re-raise it. *) - if g#last_errno () <> G.Errno.errno_ENOENT then raise exn; - warning (f_"ignoring kernel %s in bootloader, as it does not exist.") - vmlinuz; - None - ) vmlinuzes in - - if verbose () then ( - eprintf "kernels offered by the bootloader in this guest (first in list is default):\n"; - List.iter (print_kernel_info stderr "\t") bootloader_kernels; - flush stderr - ); - - if bootloader_kernels = [] then - error (f_"no kernels were found in the bootloader configuration.\n\nThis probably indicates that %s was unable to parse the bootloader configuration of this guest.") - prog; - - bootloader_kernels diff --git a/v2v/linux_kernels.mli b/v2v/linux_kernels.mli deleted file mode 100644 index 2cbe16b24..000000000 --- a/v2v/linux_kernels.mli +++ /dev/null @@ -1,55 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Detect which kernels are installed and offered by the bootloader. *) - -type kernel_info = { - ki_app : Guestfs.application2; (** The RPM package data. *) - ki_name : string; (** eg. "kernel-PAE" *) - ki_version : string; (** version-release *) - ki_arch : string; (** Kernel architecture. *) - ki_vmlinuz : string; (** The path of the vmlinuz file. *) - ki_vmlinuz_stat : Guestfs.statns;(** stat(2) of vmlinuz *) - ki_initrd : string option; (** Path of initramfs, if found. *) - ki_modpath : string; (** The module path. *) - ki_modules : string list; (** The list of module names. *) - ki_supports_virtio_blk : bool; (** Kernel supports virtio-blk? *) - ki_supports_virtio_net : bool; (** Kernel supports virtio-net? *) - ki_supports_virtio_rng : bool; (** Kernel supports virtio-rng? *) - ki_supports_virtio_balloon : bool; (** Kernel supports memory balloon? *) - ki_supports_isa_pvpanic : bool; (** Kernel supports ISA pvpanic device? *) - ki_is_xen_pv_only_kernel : bool; (** Is a Xen paravirt-only kernel? *) - ki_is_debug : bool; (** Is debug kernel? *) - ki_config_file : string option; (** Path of config file, if found. *) -} -(** Kernel information. *) - -val detect_kernels : Guestfs.guestfs -> Types.inspect -> - [> `Debian_family ] -> Linux_bootloaders.bootloader -> - kernel_info list -(** This function detects the kernels offered by the Linux - bootloader (eg. grub). - - It will only return the intersection of kernels that are - installed and kernels that the bootloader knows about. The - first kernel in the returned list is the default boot option, - ie. what the guest would boot without interaction or overrides. *) - -val print_kernel_info : out_channel -> string -> kernel_info -> unit -(** Print a kernel_info struct to the given output channel. The - second parameter is a prefix for indentation etc. *) diff --git a/v2v/measure_disk.ml b/v2v/measure_disk.ml deleted file mode 100644 index 5c01eaacf..000000000 --- a/v2v/measure_disk.ml +++ /dev/null @@ -1,56 +0,0 @@ -(* virt-v2v - * Copyright (C) 2018 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Std_utils -open Tools_utils -open JSON_parser -open Common_gettext.Gettext - -(* Run qemu-img measure on a disk. *) - -let measure ?format filename = - let cmd = ref [] in - List.push_back_list cmd ["qemu-img"; "measure"]; - (match format with - | None -> () - | Some format -> - List.push_back_list cmd ["-f"; format] - ); - (* For use of -O qcow2 here, see this thread: - * https://www.redhat.com/archives/libguestfs/2018-August/thread.html#00142 - *) - List.push_back_list cmd ["-O"; "qcow2"]; - List.push_back cmd "--output=json"; - List.push_back cmd filename; - - let json, chan = Filename.open_temp_file "v2vmeasure" ".json" in - unlink_on_exit json; - let fd = Unix.descr_of_out_channel chan in - if run_command ~stdout_fd:fd !cmd <> 0 then - error (f_"qemu-img measure failed, see earlier errors"); - (* Note that run_command closes fd. *) - - let json = json_parser_tree_parse_file json in - debug "qemu-img measure output parsed as: %s" - (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); - - (* We're expecting the tree to contain nodes: - * Dict [ "required", Int number; "fully-allocated", Int number ] - * Of course the array could appear in any order. - *) - object_get_number "required" json diff --git a/v2v/measure_disk.mli b/v2v/measure_disk.mli deleted file mode 100644 index efaa76105..000000000 --- a/v2v/measure_disk.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v - * Copyright (C) 2018 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Run qemu-img measure on a disk. *) - -val measure : ?format:string -> string -> int64 diff --git a/v2v/modules_list.ml b/v2v/modules_list.ml deleted file mode 100644 index 69a6fd7d7..000000000 --- a/v2v/modules_list.ml +++ /dev/null @@ -1,58 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Std_utils - -let input_modules = ref [] -and output_modules = ref [] - -(* Must match the regular expressions in p2v/ssh.c *) -let module_name_re = PCRE.compile ~anchored:true "[-\\w]+" - -let register_input_module name = - assert (PCRE.matches module_name_re name); - List.push_front name input_modules -and register_output_module name = - assert (PCRE.matches module_name_re name); - List.push_front name output_modules - -let input_modules () = List.sort compare !input_modules -and output_modules () = List.sort compare !output_modules - -type inspection_fn = Types.inspect -> bool - -type conversion_fn = - Guestfs.guestfs -> Types.inspect -> Types.source_disk list -> - Types.output_settings -> Types.requested_guestcaps -> - Types.static_ip list -> Types.guestcaps - -let convert_modules = ref [] - -let register_convert_module inspect_fn name conversion_fn = - List.push_front (inspect_fn, (name, conversion_fn)) convert_modules - -let find_convert_module inspect = - let rec loop = function - | [] -> raise Not_found - | (inspect_fn, ret) :: _ when inspect_fn inspect -> ret - | _ :: rest -> loop rest - in - loop !convert_modules - -let convert_modules () = - List.sort compare (List.map (fun (_, (name, _)) -> name) !convert_modules) diff --git a/v2v/modules_list.mli b/v2v/modules_list.mli deleted file mode 100644 index 1f5a30244..000000000 --- a/v2v/modules_list.mli +++ /dev/null @@ -1,51 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** List of input, output and conversion modules. *) - -val register_input_module : string -> unit -(** Register an input module by name. *) - -val register_output_module : string -> unit -(** Register an output module by name. *) - -val input_modules : unit -> string list -(** Return the list of input modules. *) - -val output_modules : unit -> string list -(** Return the list of output modules. *) - -type inspection_fn = Types.inspect -> bool - -type conversion_fn = - Guestfs.guestfs -> Types.inspect -> Types.source_disk list -> - Types.output_settings -> Types.requested_guestcaps -> - Types.static_ip list -> Types.guestcaps - -val register_convert_module : inspection_fn -> string -> conversion_fn -> unit -(** [register_convert_module inspect_fn name fn] registers a - conversion function [fn] that can accept any guest that matches - the [inspect_fn] function. *) - -val find_convert_module : Types.inspect -> string * conversion_fn -(** [find_convert_module inspect] returns the name and conversion - function for the guest with inspection data in [inspect], else - throws [Not_found]. *) - -val convert_modules : unit -> string list -(** Return the list of conversion modules. *) diff --git a/v2v/name_from_disk.ml b/v2v/name_from_disk.ml deleted file mode 100644 index bfab24c9c..000000000 --- a/v2v/name_from_disk.ml +++ /dev/null @@ -1,41 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Common_gettext.Gettext -open Tools_utils - -let name_from_disk disk = - let name = Filename.basename disk in - (* Remove the extension (or suffix), only if it's one usually - * used for disk images. *) - let suffixes = [ - ".img"; ".ova"; ".qcow2"; ".raw"; ".vmdk"; ".vmx"; - "-sda"; - ] in - let rec loop = function - | suff :: xs -> - if Filename.check_suffix name suff then - Filename.chop_suffix name suff - else - loop xs - | [] -> name - in - let name = loop suffixes in - if name = "" then - error (f_"invalid input filename (%s)") disk; - name diff --git a/v2v/name_from_disk.mli b/v2v/name_from_disk.mli deleted file mode 100644 index a4111dbbc..000000000 --- a/v2v/name_from_disk.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Derive the source name from a disk name. *) - -val name_from_disk : string -> string -(** Take a disk name and derive from it a suitable source name. - - Used in particular by [-i disk] mode. *) diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml deleted file mode 100644 index 89fca337c..000000000 --- a/v2v/nbdkit.ml +++ /dev/null @@ -1,404 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Unix -open Printf - -open Common_gettext.Gettext -open Std_utils -open Tools_utils -open Unix_utils - -open Types -open Utils - -let nbdkit_min_version = (1, 12) -let nbdkit_min_version_string = "1.12" - -type password = -| NoPassword (* no password option at all *) -| AskForPassword (* password=- *) -| PasswordFile of string (* password=+file *) - -type t = { - (* The nbdkit plugin name. *) - plugin_name : string; - - (* Parameters (includes the plugin name). *) - args : string list; - - (* Environment variables that may be needed for nbdkit to work. *) - env : (string * string) list; - - (* nbdkit --dump-config output. *) - dump_config : (string * string) list; - - (* nbdkit plugin_name --dump-plugin output. *) - dump_plugin : (string * string) list; -} - -(* Check that nbdkit is available and new enough. *) -let error_unless_nbdkit_working () = - if 0 <> Sys.command "nbdkit --version >/dev/null" then - error (f_"nbdkit is not installed or not working") - -(* Check that nbdkit is at or above the minimum version. *) -let re_major_minor = PCRE.compile "(\\d+)\\.(\\d+)" - -let error_unless_nbdkit_min_version dump_config = - let version = - let version = - try List.assoc "version" dump_config - with Not_found -> - error (f_"nbdkit --dump-config did not print version. This might be a very old or broken nbdkit binary.") in - debug "nbdkit version: %s" version; - if PCRE.matches re_major_minor version then - (int_of_string (PCRE.sub 1), int_of_string (PCRE.sub 2)) - else - error (f_"nbdkit --dump-config: could not parse version: %s") version in - - if version < nbdkit_min_version then - error (f_"nbdkit is too old. nbdkit >= %s is required.") - nbdkit_min_version_string - -(* Check that nbdkit was compiled with SELinux support (for the - * --selinux-label option). - *) -let error_unless_nbdkit_compiled_with_selinux dump_config = - if have_selinux then ( - let selinux = try List.assoc "selinux" dump_config with Not_found -> "no" in - if selinux = "no" then - error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") - ) - -let common_create ?bandwidth plugin_name plugin_args plugin_env = - error_unless_nbdkit_working (); - - (* Environment. We always add LANG=C. *) - let env = ("LANG", "C") :: plugin_env in - let env_as_string = - String.concat " " (List.map (fun (k, v) -> sprintf "%s=%s" k (quote v)) - env) in - - (* Get the nbdkit --dump-config output and check minimum - * required version of nbdkit. - *) - let dump_config = - let lines = - external_command (sprintf "%s nbdkit --dump-config" env_as_string) in - List.map (String.split "=") lines in - - error_unless_nbdkit_min_version dump_config; - error_unless_nbdkit_compiled_with_selinux dump_config; - - (* Get the nbdkit plugin_name --dump-plugin output, which also - * checks that the plugin is available and loadable. - *) - let dump_plugin = - let lines = - external_command (sprintf "%s nbdkit %s --dump-plugin" - env_as_string plugin_name) in - List.map (String.split "=") lines in - - (* Start constructing the parts of the incredibly long nbdkit - * command line which don't change between disks. - *) - let add_arg, get_args = - let args = ref [] in - let add_arg a = List.push_front a args in - let get_args () = List.rev !args in - add_arg, get_args in - - add_arg "nbdkit"; - if verbose () then add_arg "--verbose"; - add_arg "--readonly"; (* important! readonly mode *) - add_arg "--foreground"; (* run in foreground *) - add_arg "--exit-with-parent"; (* exit when virt-v2v exits *) - add_arg "--newstyle"; (* use newstyle NBD protocol *) - add_arg "--exportname"; add_arg "/"; - if have_selinux then ( (* label the socket so qemu can open it *) - add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_socket_t:s0" - ); - - (* Probe to see if a filter is installed. See nbdkit-probing(1) - * for recommended method. - *) - let probe_filter filter_name = - let cmd = - sprintf "%s nbdkit --dump-plugin --filter=%s null >/dev/null" - env_as_string filter_name in - Sys.command cmd <> 0 - in - - (* Adding the readahead filter is always a win for our access - * patterns. However if it doesn't exist don't worry. - *) - if probe_filter "readahead" then ( - add_arg "--filter"; add_arg "readahead" - ); - - (* Add the rate filter. *) - let rate_args = - if probe_filter "rate" then ( - match bandwidth with - | None -> [] - | Some bandwidth -> - add_arg "--filter"; add_arg "rate"; - match bandwidth with - | StaticBandwidth rate -> - [ "rate=" ^ rate ] - | DynamicBandwidth (None, filename) -> - [ "rate-file=" ^ filename ] - | DynamicBandwidth (Some rate, filename) -> - [ "rate=" ^ rate; "rate-file=" ^ filename ] - ) - else [] in - - (* Retry filter (if it exists) can be used to get around brief - * interruptions in service. It must be closest to the plugin. - *) - if probe_filter "retry" then ( - add_arg "--filter"; add_arg "retry" - ); - - let args = get_args () @ [ plugin_name ] @ plugin_args @ rate_args in - - { plugin_name; args; env; dump_config; dump_plugin } - -(* VDDK libraries are located under lib32/ or lib64/ relative to the - * libdir. Note this is unrelated to Linux multilib or multiarch. - *) -let libNN = sprintf "lib%d" Sys.word_size - -(* Create an nbdkit module specialized for reading from VDDK sources. *) -let create_vddk ?bandwidth ?config ?cookie ?libdir ~moref - ?nfchostport ?password_file ?port - ~server ?snapshot ~thumbprint ?transports ?user path = - (* Compute the LD_LIBRARY_PATH that we may have to pass to nbdkit. *) - let ld_library_path = Option.map (fun libdir -> libdir // libNN) libdir in - let env = - match ld_library_path with - | None -> [] - | Some ld_library_path -> ["LD_LIBRARY_PATH", ld_library_path] in - - (* Check that the VDDK path looks reasonable. *) - let error_unless_vddk_libdir () = - (match libdir with - | None -> () - | Some libdir -> - if not (is_directory libdir) then - error (f_"‘-io vddk-libdir=%s’ does not point to a directory. See the virt-v2v-input-vmware(1) manual.") libdir - ); - - (match ld_library_path with - | None -> () - | Some ld_library_path -> - if not (is_directory ld_library_path) then - error (f_"VDDK library path %s not found or not a directory. See the virt-v2v-input-vmware(1) manual.") ld_library_path - ) - in - - (* Check that the VDDK plugin is installed and working. We also - * check this later when calling common_create, but this version - * has better troubleshooting output. - *) - let error_unless_nbdkit_vddk_working () = - let env_as_string = - String.concat " " (List.map (fun (k, v) -> sprintf "%s=%s" k (quote v)) - env) in - let cmd = - sprintf "%s nbdkit vddk --dump-plugin >/dev/null" env_as_string in - if Sys.command cmd <> 0 then ( - (* See if we can diagnose why ... *) - let cmd = - sprintf "LANG=C %s nbdkit vddk --dump-plugin 2>&1 | - grep -sq \"cannot open shared object file\"" - env_as_string in - let needs_library = Sys.command cmd = 0 in - if not needs_library then - error (f_"nbdkit VDDK plugin is not installed or not working. It is required if you want to use VDDK. - -The VDDK plugin is not enabled by default when you compile nbdkit. You have to read the instructions in the nbdkit sources under ‘plugins/vddk/README.VDDK’ to find out how to enable the VDDK plugin. - -See also the virt-v2v-input-vmware(1) manual.") - else - error (f_"nbdkit VDDK plugin is not installed or not working. It is required if you want to use VDDK. - -It looks like you did not set the right path in the ‘-io vddk-libdir’ option, or your copy of the VDDK directory is incomplete. There should be a library called ’/%s/libvixDiskLib.so.?’. - -See also the virt-v2v-input-vmware(1) manual.") libNN - ) - in - - error_unless_vddk_libdir (); - error_unless_nbdkit_vddk_working (); - - (* For VDDK we require some user. If it's not supplied, assume root. *) - let user = Option.default "root" user in - - let add_arg, get_args = - let args = ref [] in - let add_arg a = List.push_front a args in - let get_args () = List.rev !args in - add_arg, get_args in - - let password_param = - match password_file with - | None -> - (* nbdkit asks for the password interactively *) - "password=-" - | Some password_file -> - (* nbdkit reads the password from the file *) - "password=+" ^ password_file in - add_arg (sprintf "server=%s" server); - add_arg (sprintf "user=%s" user); - add_arg password_param; - add_arg (sprintf "vm=moref=%s" moref); - add_arg (sprintf "file=%s" path); - - (* The passthrough parameters. *) - Option.may (fun s -> add_arg (sprintf "config=%s" s)) config; - Option.may (fun s -> add_arg (sprintf "cookie=%s" s)) cookie; - Option.may (fun s -> add_arg (sprintf "libdir=%s" s)) libdir; - Option.may (fun s -> add_arg (sprintf "nfchostport=%s" s)) nfchostport; - Option.may (fun s -> add_arg (sprintf "port=%s" s)) port; - Option.may (fun s -> add_arg (sprintf "snapshot=%s" s)) snapshot; - add_arg (sprintf "thumbprint=%s" thumbprint); - Option.may (fun s -> add_arg (sprintf "transports=%s" s)) transports; - - common_create ?bandwidth "vddk" (get_args ()) env - -(* Create an nbdkit module specialized for reading from SSH sources. *) -let create_ssh ?bandwidth ~password ?port ~server ?user path = - let add_arg, get_args = - let args = ref [] in - let add_arg a = List.push_front a args in - let get_args () = List.rev !args in - add_arg, get_args in - - add_arg (sprintf "host=%s" server); - Option.may (fun s -> add_arg (sprintf "port=%s" s)) port; - Option.may (fun s -> add_arg (sprintf "user=%s" s)) user; - (match password with - | NoPassword -> () - | AskForPassword -> add_arg "password=-" - | PasswordFile password_file -> - add_arg (sprintf "password=+%s" password_file) - ); - add_arg (sprintf "path=%s" path); - - common_create ?bandwidth "ssh" (get_args ()) [] - -(* Create an nbdkit module specialized for reading from Curl sources. *) -let create_curl ?bandwidth ?cookie ~password ?(sslverify=true) ?user url = - let add_arg, get_args = - let args = ref [] in - let add_arg a = List.push_front a args in - let get_args () = List.rev !args in - add_arg, get_args in - - Option.may (fun s -> add_arg (sprintf "user=%s" s)) user; - (match password with - | NoPassword -> () - | AskForPassword -> add_arg "password=-" - | PasswordFile password_file -> - add_arg (sprintf "password=+%s" password_file) - ); - (* https://bugzilla.redhat.com/show_bug.cgi?id=1146007#c10 *) - add_arg "timeout=2000"; - Option.may (fun s -> add_arg (sprintf "cookie=%s" s)) cookie; - if not sslverify then add_arg "sslverify=false"; - add_arg (sprintf "url=%s" url); - - common_create ?bandwidth "curl" (get_args ()) [] - -let run { args; env } = - (* Create a temporary directory where we place the sockets. *) - let tmpdir = - let base_dir = (open_guestfs ())#get_cachedir () in - let t = Mkdtemp.temp_dir ~base_dir "v2vnbdkit." in - (* tmpdir must be readable (but not writable) by "other" so that - * qemu can open the sockets. - *) - chmod t 0o755; - rmdir_on_exit t; - t in - - let id = unique () in - let sock = tmpdir // sprintf "nbdkit%d.sock" id in - let qemu_uri = sprintf "nbd:unix:%s:exportname=/" sock in - let pidfile = tmpdir // sprintf "nbdkit%d.pid" id in - - (* Construct the final command line with the "static" args - * above plus the pidfile and socket which vary for each run. - *) - let args = args @ [ "--pidfile"; pidfile; "--unix"; sock ] in - - (* Print the full command we are about to run when debugging. *) - if verbose () then ( - eprintf "running nbdkit:\n"; - List.iter (fun (k, v) -> eprintf " %s=%s" k v) env; - List.iter (fun arg -> eprintf " %s" (quote arg)) args; - prerr_newline () - ); - - (* Start an nbdkit instance in the background. By using - * --exit-with-parent we don't have to worry about cleaning - * it up, hopefully. - *) - let args = Array.of_list args in - let pid = fork () in - if pid = 0 then ( - (* Child process (nbdkit). *) - List.iter (fun (k, v) -> putenv k v) env; - execvp "nbdkit" args - ); - - (* Wait for the pidfile to appear so we know that nbdkit - * is listening for requests. - *) - if not (wait_for_file pidfile 30) then ( - if verbose () then - error (f_"nbdkit did not start up. See previous debugging messages for problems.") - else - error (f_"nbdkit did not start up. There may be errors printed by nbdkit above. - -If the messages above are not sufficient to diagnose the problem then add the ‘virt-v2v -v -x’ options and examine the debugging output carefully.") - ); - - if have_selinux then ( - (* Note that Unix domain sockets have both a file label and - * a socket/process label. Using --selinux-label above - * only set the socket label, but we must also set the file - * label. - *) - ignore ( - run_command ["chcon"; "system_u:object_r:svirt_image_t:s0"; sock] - ); - ); - (* ... and the regular Unix permissions, in case qemu is - * running as another user. - *) - chmod sock 0o777; - - if verbose () then ( - eprintf "nbdkit: tmpdir %s:\n%!" tmpdir; - ignore (Sys.command (sprintf "ls -laZ %s" (quote tmpdir))) - ); - - qemu_uri diff --git a/v2v/nbdkit.mli b/v2v/nbdkit.mli deleted file mode 100644 index 627c78c11..000000000 --- a/v2v/nbdkit.mli +++ /dev/null @@ -1,81 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** nbdkit when used as a source. *) - -type t - -val create_vddk : ?bandwidth:Types.bandwidth -> - ?config:string -> - ?cookie:string -> - ?libdir:string -> - moref:string -> - ?nfchostport:string -> - ?password_file:string -> - ?port:string -> - server:string -> - ?snapshot:string -> - thumbprint:string -> - ?transports:string -> - ?user:string -> - string -> t -(** Create a nbdkit object using the VDDK plugin. The required - string parameter is the disk remote path. - - This can fail (calling [error]) for a variety of reasons, such - as nbdkit not being available, wrong version, missing plugin, etc. - - Note this doesn't run nbdkit yet, it just creates the object. *) - -type password = -| NoPassword -| AskForPassword -| PasswordFile of string - -val create_ssh : ?bandwidth:Types.bandwidth -> - password:password -> - ?port:string -> - server:string -> - ?user:string -> - string -> t -(** Create a nbdkit object using the SSH plugin. The required - string parameter is the remote path. - - This can fail (calling [error]) for a variety of reasons, such - as nbdkit not being available, wrong version, missing plugin, etc. - - Note this doesn't run nbdkit yet, it just creates the object. *) - -val create_curl : ?bandwidth:Types.bandwidth -> - ?cookie:string -> - password:password -> - ?sslverify:bool -> - ?user:string -> - string -> t -(** Create a nbdkit object using the Curl plugin. The required - string parameter is the URL. - - This can fail (calling [error]) for a variety of reasons, such - as nbdkit not being available, wrong version, missing plugin, etc. - - Note this doesn't run nbdkit yet, it just creates the object. *) - -val run : t -> string -(** Start running nbdkit. - - Returns the QEMU URI that you can use to connect to this instance. *) diff --git a/v2v/networks.ml b/v2v/networks.ml deleted file mode 100644 index 03925b46f..000000000 --- a/v2v/networks.ml +++ /dev/null @@ -1,131 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Network, bridge and MAC address mapping. *) - -open Printf - -open Tools_utils -open Common_gettext.Gettext - -open Types - -type t = { - (* Map specific NIC with MAC address to a network or bridge. *) - mutable macs : (vnet_type * string) StringMap.t; - - (* If specific NIC mapping fails, for networks we use this to map - * a named network, or use the default network if no named - * network exists. - *) - mutable network_map : string StringMap.t; - mutable default_network : string option; - - (* If that fails, same as above but for bridges. *) - mutable bridge_map : string StringMap.t; - mutable default_bridge : string option; -} - -let map t nic = - try - let mac = match nic.s_mac with None -> raise Not_found | Some mac -> mac in - let mac = String.lowercase_ascii mac in - let vnet_type, vnet = StringMap.find mac t.macs in - { nic with - s_vnet_type = vnet_type; - s_vnet = vnet; - s_mapping_explanation = - Some (sprintf "NIC mapped by MAC address to %s:%s" - (string_of_vnet_type vnet_type) vnet) - } - with Not_found -> - match nic.s_vnet_type with - | Network -> - (try - let vnet = StringMap.find nic.s_vnet t.network_map in - { nic with - s_vnet = vnet; - s_mapping_explanation = - Some (sprintf "network mapped from %S to %S" - nic.s_vnet vnet) - } - with Not_found -> - match t.default_network with - | None -> nic (* no mapping done *) - | Some default_network -> - { nic with - s_vnet = default_network; - s_mapping_explanation = - Some (sprintf "network mapped from %S to default %S" - nic.s_vnet default_network) - } - ) - | Bridge -> - (try - let vnet = StringMap.find nic.s_vnet t.bridge_map in - { nic with - s_vnet = vnet; - s_mapping_explanation = - Some (sprintf "bridge mapped from %S to %S" - nic.s_vnet vnet) - } - with Not_found -> - match t.default_bridge with - | None -> nic (* no mapping done *) - | Some default_bridge -> - { nic with - s_vnet = default_bridge; - s_mapping_explanation = - Some (sprintf "bridge mapped from %S to default %S" - nic.s_vnet default_bridge) - } - ) - -let create () = { - macs = StringMap.empty; - network_map = StringMap.empty; - default_network = None; - bridge_map = StringMap.empty; - default_bridge = None -} - -let add_mac t mac vnet_type vnet = - let mac = String.lowercase_ascii mac in - if StringMap.mem mac t.macs then - error (f_"duplicate --mac parameter. Duplicate mappings specified for MAC address %s.") mac; - t.macs <- StringMap.add mac (vnet_type, vnet) t.macs - -let add_network t i o = - if StringMap.mem i t.network_map then - error (f_"duplicate -n/--network parameter. Duplicate mappings specified for network %s.") i; - t.network_map <- StringMap.add i o t.network_map - -let add_default_network t o = - if t.default_network <> None then - error (f_"duplicate -n/--network parameter. Only one default mapping is allowed."); - t.default_network <- Some o - -let add_bridge t i o = - if StringMap.mem i t.bridge_map then - error (f_"duplicate -b/--bridge parameter. Duplicate mappings specified for bridge %s.") i; - t.bridge_map <- StringMap.add i o t.bridge_map - -let add_default_bridge t o = - if t.default_bridge <> None then - error (f_"duplicate -b/--bridge parameter. Only one default mapping is allowed."); - t.default_bridge <- Some o diff --git a/v2v/networks.mli b/v2v/networks.mli deleted file mode 100644 index 5fc7e67c8..000000000 --- a/v2v/networks.mli +++ /dev/null @@ -1,60 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Network, bridge and MAC address mapping. *) - -type t (** The map. *) - -val create : unit -> t -(** Create an empty mapping. *) - -val add_network : t -> string -> string -> unit -(** Add a network mapping from C to C. - - Equivalent to the [--network in:out] option. *) - -val add_default_network : t -> string -> unit -(** Add a default network mapping. - - Equivalent to the [--network out] option. *) - -val add_bridge : t -> string -> string -> unit -(** Add a bridge mapping from C to C. - - Equivalent to the [--bridge in:out] option. *) - -val add_default_bridge : t -> string -> unit -(** Add a default bridge mapping. - - Equivalent to the [--bridge out] option. *) - -val add_mac : t -> string -> Types.vnet_type -> string -> unit -(** Add a MAC address mapping. - - Equivalent to the [-mac MAC::out] option. *) - -val map : t -> Types.source_nic -> Types.source_nic -(** Apply the mapping to the source NIC, returning the updated - NIC with possibly modified [s_vnet] and [s_vnet_type] fields. - - MAC address mappings take precedence, followed by network - and bridge mappings if no MAC address mapping for the NIC can - be found. - - [s_mapping_explanation] is set in the output with an - informational message about what was done. *) diff --git a/v2v/openstack_image_properties.ml b/v2v/openstack_image_properties.ml deleted file mode 100644 index ae245e7cd..000000000 --- a/v2v/openstack_image_properties.ml +++ /dev/null @@ -1,100 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(* Convert metadata to a list of OpenStack image properties. *) - -open Printf - -open Std_utils - -open Types - -let create source target_buses guestcaps inspect target_firmware = - let properties = ref [] in - - List.push_back_list properties [ - "architecture", guestcaps.gcaps_arch; - "hypervisor_type", "kvm"; - "vm_mode", "hvm"; - - "hw_disk_bus", - (match guestcaps.gcaps_block_bus with - | Virtio_blk -> "virtio" - | Virtio_SCSI -> "scsi" - | IDE -> "ide"); - "hw_vif_model", - (match guestcaps.gcaps_net_bus with - | Virtio_net -> "virtio" - | E1000 -> "e1000" - | RTL8139 -> "rtl8139"); - "hw_video_model", - (match guestcaps.gcaps_video with - | QXL -> "qxl" - | Cirrus -> "cirrus"); - "hw_machine_type", - (match guestcaps.gcaps_machine with - | I440FX -> "pc" - | Q35 -> "q35" - | Virt -> "virt"); - - "os_type", inspect.i_type; - "os_distro", - (match inspect.i_distro with - (* https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html *) - | "archlinux" -> "arch" - | "sles" -> "sled" - | x -> x (* everything else is the same in libguestfs and OpenStack*) - ) - ]; - - (match source.s_cpu_topology with - | None -> - List.push_back properties ("hw_cpu_sockets", "1"); - List.push_back properties ("hw_cpu_cores", string_of_int source.s_vcpu); - | Some { s_cpu_sockets = sockets; s_cpu_cores = cores; - s_cpu_threads = threads } -> - List.push_back properties ("hw_cpu_sockets", string_of_int sockets); - List.push_back properties ("hw_cpu_cores", string_of_int cores); - List.push_back properties ("hw_cpu_threads", string_of_int threads); - ); - - (match guestcaps.gcaps_block_bus with - | Virtio_SCSI -> - List.push_back properties ("hw_scsi_model", "virtio-scsi") - | Virtio_blk | IDE -> () - ); - - (match inspect.i_major_version, inspect.i_minor_version with - | 0, 0 -> () - | x, 0 -> List.push_back properties ("os_version", string_of_int x) - | x, y -> List.push_back properties ("os_version", sprintf "%d.%d" x y) - ); - - if guestcaps.gcaps_virtio_rng then - List.push_back properties ("hw_rng_model", "virtio"); - (* XXX Neither memory balloon nor pvpanic are supported by - * Glance at this time. - *) - - (match target_firmware with - | TargetBIOS -> () - | TargetUEFI -> - List.push_back properties ("hw_firmware_type", "uefi") - ); - - !properties diff --git a/v2v/openstack_image_properties.mli b/v2v/openstack_image_properties.mli deleted file mode 100644 index 6b3078a88..000000000 --- a/v2v/openstack_image_properties.mli +++ /dev/null @@ -1,34 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** Convert metadata to a list of OpenStack image properties. - - These properties are suitable for use by Glance or Cinder. - Note for Cinder there is a difference between properties and - image properties (this module implements the latter). *) - -val create : Types.source -> Types.target_buses -> Types.guestcaps -> Types.inspect -> Types.target_firmware -> (string * string) list -(** [create source target_buses guestcaps inspect target_firmware] - translates the metadata into a list of image properties suitable - for OpenStack. - - The returned list is a set of key=value pairs which can be passed - to Glance (using [--property key=value]) or to Cinder. For - Cinder note that you must not use [--property] since that sets - volume properties which are different from image properties. - Instead use [openstack volume set --image-property key=value ...]. *) diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml deleted file mode 100644 index 0eb8b5e6c..000000000 --- a/v2v/output_glance.ml +++ /dev/null @@ -1,108 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Unix_utils -open Common_gettext.Gettext - -open Types -open Utils - -class output_glance () = - (* Although glance can slurp in a stream from stdin, unfortunately - * 'qemu-img convert' cannot write to a stream (although I guess - * it could be implemented at least for raw). Therefore we have - * to write to a temporary file. XXX - *) - let tmpdir = - let base_dir = (open_guestfs ())#get_cachedir () in - let t = Mkdtemp.temp_dir ~base_dir "glance." in - rmdir_on_exit t; - t in -object - inherit output - - method precheck () = - (* This does nothing useful except to check that the user has - * supplied all the correct auth environment variables to make - * 'glance' commands work as the current user. If not then the - * program exits early. - *) - if shell_command "glance image-list > /dev/null" <> 0 then - error (f_"glance: glance client is not installed or set up correctly. You may need to set environment variables or source a script to enable authentication. See preceding messages for details."); - - (* When debugging, query the glance client for its version. *) - if verbose () then ( - eprintf "version of the glance client:\n%!"; - ignore (shell_command "glance --version"); - ) - - method as_options = "-o glance" - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - method prepare_targets _ overlays = - (* Write targets to a temporary local file - see above for reason. *) - List.map (fun (_, ov) -> TargetFile (tmpdir // ov.ov_sd)) overlays - - method create_metadata source targets - target_buses guestcaps inspect target_firmware = - let min_ram = source.s_memory /^ 1024L /^ 1024L in - - (* Get the image properties. *) - let properties = - Openstack_image_properties.create source target_buses guestcaps - inspect target_firmware in - let properties = - List.flatten ( - List.map ( - fun (k, v) -> [ "--property"; sprintf "%s=%s" k v ] - ) properties - ) in - - (* The first disk, assumed to be the system disk, will be called - * "guestname". Subsequent disks, assumed to be data disks, - * will be called "guestname-disk2" etc. The manual strongly - * hints you should import the data disks to Cinder. - *) - List.iteri ( - fun i { target_file; target_format } -> - let name = - if i == 0 then source.s_name - else sprintf "%s-disk%d" source.s_name (i+1) in - - let target_file = - match target_file with - | TargetFile s -> s - | TargetURI _ -> assert false in - - let cmd = [ "glance"; "image-create"; "--name"; name; - "--disk-format=" ^ target_format; - "--container-format=bare"; "--file"; target_file; - "--min-ram"; Int64.to_string min_ram ] @ - properties in - if run_command cmd <> 0 then - error (f_"glance: image upload to glance failed, see earlier errors"); - ) targets -end - -let output_glance = new output_glance -let () = Modules_list.register_output_module "glance" diff --git a/v2v/output_glance.mli b/v2v/output_glance.mli deleted file mode 100644 index fad817e3f..000000000 --- a/v2v/output_glance.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o glance] target. *) - -val output_glance : unit -> Types.output -(** [output_glance ()] creates and returns a new - {!Types.output} object specialized for writing output to OpenStack - glance. *) diff --git a/v2v/output_json.ml b/v2v/output_json.ml deleted file mode 100644 index 29c4a1d0c..000000000 --- a/v2v/output_json.ml +++ /dev/null @@ -1,116 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils - -type json_options = { - json_disks_pattern : string; -} - -let print_output_options () = - printf (f_"Output options (-oo) which can be used with -o json: - - -oo json-disks-pattern=PATTERN Pattern for the disks. -") - -let known_pattern_variables = ["DiskNo"; "DiskDeviceName"; "GuestName"] - -let parse_output_options options = - let json_disks_pattern = ref None in - - List.iter ( - function - | "json-disks-pattern", v -> - if !json_disks_pattern <> None then - error (f_"-o json: -oo json-disks-pattern set more than once"); - let vars = - try Var_expander.scan_variables v - with Var_expander.Invalid_variable var -> - error (f_"-o json: -oo json-disks-pattern: invalid variable %%{%s}") - var in - List.iter ( - fun var -> - if not (List.mem var known_pattern_variables) then - error (f_"-o json: -oo json-disks-pattern: unhandled variable %%{%s}") - var - ) vars; - json_disks_pattern := Some v - | k, _ -> - error (f_"-o json: unknown output option ‘-oo %s’") k - ) options; - - let json_disks_pattern = - Option.default "%{GuestName}-%{DiskDeviceName}" !json_disks_pattern in - - { json_disks_pattern } - -class output_json dir json_options = object - inherit output - - method as_options = sprintf "-o json -os %s" dir - - method prepare_targets source_name overlays = - List.mapi ( - fun i (_, ov) -> - let outname = - let vars_fn = function - | "DiskNo" -> Some (string_of_int (i+1)) - | "DiskDeviceName" -> Some ov.ov_sd - | "GuestName" -> Some source_name - | _ -> assert false - in - Var_expander.replace_fn json_options.json_disks_pattern vars_fn in - let destname = dir // outname in - mkdir_p (Filename.dirname destname) 0o755; - TargetFile destname - ) overlays - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - method create_metadata source targets - target_buses guestcaps inspect target_firmware = - let doc = - Create_json.create_json_metadata source targets target_buses - guestcaps inspect target_firmware in - let doc_string = JSON.string_of_doc ~fmt:JSON.Indented doc in - - if verbose () then ( - eprintf "resulting JSON:\n"; - output_string stderr doc_string; - eprintf "\n\n%!"; - ); - - let name = source.s_name in - let file = dir // name ^ ".json" in - - with_open_out file ( - fun chan -> - output_string chan doc_string; - output_char chan '\n' - ) -end - -let output_json = new output_json -let () = Modules_list.register_output_module "json" diff --git a/v2v/output_json.mli b/v2v/output_json.mli deleted file mode 100644 index 52f58f2d1..000000000 --- a/v2v/output_json.mli +++ /dev/null @@ -1,31 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o json] target. *) - -type json_options -(** Miscellaneous extra command line parameters used by json. *) - -val print_output_options : unit -> unit -val parse_output_options : (string * string) list -> json_options -(** Print and parse json -oo options. *) - -val output_json : string -> json_options -> Types.output -(** [output_json directory json_options] creates and returns a new - {!Types.output} object specialized for writing output to local - files with JSON metadata. *) diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml deleted file mode 100644 index 0247e5ad9..000000000 --- a/v2v/output_libvirt.ml +++ /dev/null @@ -1,208 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils -open Xpath_helpers -open Create_libvirt_xml - -let arch_is_sane_or_die = - let rex = PCRE.compile ~caseless:true "^[-_a-z0-9]+$" in - fun arch -> assert (PCRE.matches rex arch) - -let target_features_of_capabilities_doc doc arch = - let xpathctx = Xml.xpath_new_context doc in - let expr = - (* Check the arch is sane. It comes from untrusted input. This - * avoids XPath injection below. - *) - arch_is_sane_or_die arch; - (* NB: Pay attention to the square brackets. This returns the - * nodes! - *) - sprintf "/capabilities/guest[arch[@name='%s']/domain/@type='kvm']" arch in - let obj = Xml.xpath_eval_expression xpathctx expr in - - if Xml.xpathobj_nr_nodes obj < 1 then ( - (* Old virt-v2v used to die here, but that seems unfair since the - * user has gone through conversion before we reach here. - *) - warning (f_"the target hypervisor does not support a %s KVM guest") arch; - [] - ) else ( - let node (* first matching *) = Xml.xpathobj_node obj 0 in - Xml.xpathctx_set_current_context xpathctx node; - - (* Get guest/features/* nodes. *) - let features = xpath_get_nodes xpathctx "features/*" in - List.map Xml.node_name features - ) - -class output_libvirt oc output_pool = -object (self) - inherit output - - val mutable capabilities_doc = None - val mutable pool_name = None - val libvirt_conn = lazy (Libvirt.Connect.connect ?name:oc ()) - - method private conn : Libvirt.rw Libvirt.Connect.t = - Lazy.force libvirt_conn - - method as_options = - match oc with - | None -> sprintf "-o libvirt -os %s" output_pool - | Some uri -> sprintf "-o libvirt -oc %s -os %s" uri output_pool - - method prepare_targets source_name overlays = - (* Get the capabilities from libvirt. *) - let xml = - try - Libvirt.Connect.get_capabilities self#conn - with - Libvirt.Virterror { message } -> - error (f_"cannot get libvirt hypervisor capabilities: %s") - (Option.default "" message) in - debug "libvirt capabilities XML:\n%s" xml; - - (* This just checks that the capabilities XML is well-formed, - * early so that we catch parsing errors before conversion. - *) - let doc = Xml.parse_memory xml in - - (* Stash the capabilities XML, since we cannot get the bits we - * need from it until we know the guest architecture, which happens - * after conversion. - *) - capabilities_doc <- Some doc; - - (* Does the domain already exist on the target? (RHBZ#889082) *) - if Libvirt_utils.domain_exists self#conn source_name then - error (f_"a libvirt domain called ‘%s’ already exists on the target.\n\nIf using virt-v2v directly, use the ‘-on’ option to select a different name. Or delete the existing domain on the target using the ‘virsh undefine’ command.\n\nIf using virt-p2v, select a different ‘Name’ in the ‘Target properties’. Or delete the existing domain on the target using the ‘virsh undefine’ command.") - source_name; - - (* Connect to output libvirt instance and check that the pool exists - * and dump out its XML. - *) - let xml = - let pool = Libvirt_utils.get_pool self#conn output_pool in - Libvirt.Pool.get_xml_desc (Libvirt.Pool.const pool) in - let doc = Xml.parse_memory xml in - let xpathctx = Xml.xpath_new_context doc in - let xpath_string = xpath_string xpathctx in - - (* We can only output to a pool of type 'dir' (directory). *) - if xpath_string "/pool/@type" <> Some "dir" then - error (f_"-o libvirt: output pool ‘%s’ is not a directory (type='dir'). See virt-v2v-output-local(1)") output_pool; - let target_path = - match xpath_string "/pool/target/path/text()" with - | None -> - error (f_"-o libvirt: output pool ‘%s’ does not have /pool/target/path element. See virt-v2v-output-local(1)") output_pool - | Some dir when not (is_directory dir) -> - error (f_"-o libvirt: output pool ‘%s’ has type='dir' but the /pool/target/path element is not a local directory. See virt-v2v-output-local(1)") output_pool - | Some dir -> dir in - (* Get the name of the pool, since we have to use that - * (and not the UUID) in the XML of the guest. - *) - let name = - match xpath_string "/pool/name/text()" with - | None -> - error (f_"-o libvirt: output pool ‘%s’ does not have /pool/name element. See virt-v2v-output-local(1)") output_pool - | Some name -> name in - pool_name <- Some name; - - (* Set up the targets. *) - List.map ( - fun (_, ov) -> - TargetFile (target_path // source_name ^ "-" ^ ov.ov_sd) - ) overlays - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - method check_target_firmware guestcaps target_firmware = - match target_firmware with - | TargetBIOS -> () - | TargetUEFI -> - (* XXX Can remove this method when libvirt supports - * since then it will be up to - * libvirt to check this. - *) - error_unless_uefi_firmware guestcaps.gcaps_arch - - method create_metadata source targets - target_buses guestcaps inspect target_firmware = - (* We copied directly into the final pool directory. However we - * have to tell libvirt. - *) - (try - let pool = Libvirt_utils.get_pool self#conn output_pool in - Libvirt.Pool.refresh (Libvirt.Pool.const pool) - with - Libvirt.Virterror { message } -> - warning (f_"could not refresh libvirt pool ‘%s’: %s") - output_pool (Option.default "" message) - ); - - let pool_name = - match pool_name with - | None -> output_pool - | Some n -> n in - - (* Parse the capabilities XML in order to get the supported features. *) - let doc = - match capabilities_doc with - | None -> assert false - | Some doc -> doc in - let target_features = - target_features_of_capabilities_doc doc guestcaps.gcaps_arch in - - (* Create the metadata. *) - let doc = - create_libvirt_xml ~pool:pool_name source targets target_buses - guestcaps target_features target_firmware inspect in - - let tmpfile, chan = Filename.open_temp_file "v2vlibvirt" ".xml" in - DOM.doc_to_chan chan doc; - close_out chan; - - if verbose () then ( - eprintf "resulting XML for libvirt:\n%!"; - DOM.doc_to_chan stderr doc; - eprintf "\n%!"; - ); - - (* Define the domain in libvirt. *) - (try - ignore (Libvirt.Domain.define_xml self#conn (DOM.doc_to_string doc)); - (try Unix.unlink tmpfile with _ -> ()) - with - Libvirt.Virterror { message } -> - warning (f_"could not define libvirt domain: %s.\nThe libvirt XML is still available in ‘%s’. Try running ‘virsh -c %s define %s’ yourself instead.") - (Option.default "" message) tmpfile - (Libvirt.Connect.get_uri self#conn) tmpfile - ); -end - -let output_libvirt = new output_libvirt -let () = Modules_list.register_output_module "libvirt" diff --git a/v2v/output_libvirt.mli b/v2v/output_libvirt.mli deleted file mode 100644 index 33ffedd0b..000000000 --- a/v2v/output_libvirt.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o libvirt] target. *) - -val output_libvirt : string option -> string -> Types.output -(** [output_libvirt oc output_pool] creates and returns a new - {!Types.output} object specialized for writing output to - libvirt. *) diff --git a/v2v/output_local.ml b/v2v/output_local.ml deleted file mode 100644 index 5eb743a46..000000000 --- a/v2v/output_local.ml +++ /dev/null @@ -1,79 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils -open Create_libvirt_xml - -class output_local dir = object - inherit output - - method as_options = sprintf "-o local -os %s" dir - - method prepare_targets source_name overlays = - List.map ( - fun (_, ov) -> TargetFile (dir // source_name ^ "-" ^ ov.ov_sd) - ) overlays - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - method check_target_firmware guestcaps target_firmware = - match target_firmware with - | TargetBIOS -> () - | TargetUEFI -> - (* XXX Can remove this method when libvirt supports - * since then it will be up to - * libvirt to check this. - *) - error_unless_uefi_firmware guestcaps.gcaps_arch - - method create_metadata source targets - target_buses guestcaps inspect target_firmware = - (* We don't know what target features the hypervisor supports, but - * assume a common set that libvirt supports. - *) - let target_features = - match guestcaps.gcaps_arch with - | "i686" -> [ "acpi"; "apic"; "pae" ] - | "x86_64" -> [ "acpi"; "apic" ] - | _ -> [] in - - let doc = - create_libvirt_xml source targets target_buses - guestcaps target_features target_firmware inspect in - - let name = source.s_name in - let file = dir // name ^ ".xml" in - - with_open_out file (fun chan -> DOM.doc_to_chan chan doc); - - if verbose () then ( - eprintf "resulting local libvirt XML:\n"; - DOM.doc_to_chan stderr doc; - eprintf "\n%!"; - ) -end - -let output_local = new output_local -let () = Modules_list.register_output_module "local" diff --git a/v2v/output_local.mli b/v2v/output_local.mli deleted file mode 100644 index 5b4ecaeb9..000000000 --- a/v2v/output_local.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o local] target. *) - -val output_local : string -> Types.output -(** [output_local filename] creates and returns a new - {!Types.output} object specialized for writing output to local - files. *) diff --git a/v2v/output_null.ml b/v2v/output_null.ml deleted file mode 100644 index df451f9f7..000000000 --- a/v2v/output_null.ml +++ /dev/null @@ -1,109 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Unix_utils -open Common_gettext.Gettext - -open Types -open Utils - -(* Notes: - * - * This only happens to work because we run qemu-img convert - * with the -n [no create output] option, since null-co doesn't - * support creation. If -n is removed in the main program then - * the tests will break very obviously. - * - * The null-co device is not zero-sized. It actually has a fixed - * size (defaults to 2^30 I believe). - * - * qemu-img convert checks the output size and will fail if it's - * too small, so we have to set the size. We could set it to - * match the input size but it's easier to set it to some huge - * size instead. - * - * In case neither the null-co driver nor the JSON syntax for URLs - * is supported, fall back by writing the disks to a temporary - * directory removed at exit. - *) - -let can_use_qemu_null_co_device () = - (* We actually attempt to convert a raw file to the null-co device - * using a JSON URL. - *) - let tmp = Filename.temp_file "v2vqemunullcotst" ".img" in - Unix.truncate tmp 1024; - - let json = [ - "file.driver", JSON.String "null-co"; - "file.size", JSON.String "1E"; - ] in - - let cmd = - sprintf "qemu-img convert -n -f raw -O raw %s json:%s >/dev/null%s" - (quote tmp) - (quote (JSON.string_of_doc ~fmt:JSON.Compact json)) - (if verbose () then "" else " 2>&1") in - debug "%s" cmd; - let r = 0 = Sys.command cmd in - Unix.unlink tmp; - debug "qemu-img supports the null-co device: %b" r; - r - -class output_null = - (* Create a temporary directory which is always deleted at exit, - * so we can put the drives there in case qemu does not support - * the null-co device w/ a JSON URL. - *) - let tmpdir = - let base_dir = (open_guestfs ())#get_cachedir () in - let t = Mkdtemp.temp_dir ~base_dir "null." in - rmdir_on_exit t; - t in -object - inherit output - - method as_options = "-o null" - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - (* Force raw output, ignoring -of command line option. *) - method override_output_format _ = Some "raw" - - method prepare_targets _ overlays = - if can_use_qemu_null_co_device () then ( - let json_params = [ - "file.driver", JSON.String "null-co"; - "file.size", JSON.String "1E"; - ] in - let target_file = TargetURI ("json:" ^ JSON.string_of_doc json_params) in - - List.map (fun _ -> target_file) overlays - ) else ( - List.map (fun (_, ov) -> TargetFile (tmpdir // ov.ov_sd)) overlays - ) - - method create_metadata _ _ _ _ _ _ = () -end - -let output_null () = new output_null -let () = Modules_list.register_output_module "null" diff --git a/v2v/output_null.mli b/v2v/output_null.mli deleted file mode 100644 index d547f1e4b..000000000 --- a/v2v/output_null.mli +++ /dev/null @@ -1,23 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o null] target. *) - -val output_null : unit -> Types.output -(** [output_null ()] creates and returns a new {!Types.output} - object specialized discarding output. *) diff --git a/v2v/output_openstack.ml b/v2v/output_openstack.ml deleted file mode 100644 index fbf74a724..000000000 --- a/v2v/output_openstack.ml +++ /dev/null @@ -1,508 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf -open Unix - -open Std_utils -open Tools_utils -open Unix_utils -open JSON_parser -open Common_gettext.Gettext - -open Types -open Utils - -(* Name of the openstack CLI program (on $PATH). *) -let openstack_binary = "openstack" - -(* Timeout waiting for new Cinder volumes to move to "available" state. - * We assume this could be quite a long time on backends which want - * to preallocate the storage. - *) -let available_timeout = 300 (* seconds *) - -(* Timeout waiting for Cinder volumes to attach to the appliance. *) -let attach_timeout = 60 (* seconds *) - -(* The -oo options supported by this output method. *) -type os_options = { - (* The server name or UUID of the conversion appliance where - * virt-v2v is currently running. In future we may be able - * to make this optional and derive it from the OpenStack - * metadata service instead. - *) - server_id : string; - - (* All other OpenStack parameters, passed through unmodified - * on the openstack command line. - *) - authentication : string list; - - (* If false, use the [openstack --insecure] switch (turns off SSL - * cert validation). - *) - verify_server_certificate : bool; - - (* Optional guest_id which, if present, is saved as - * Cinder volume property virt_v2v_guest_id on every disk - * associated with this guest. - *) - guest_id : string option; - - (* This setting is used by the test suite. *) - dev_disk_by_id : string option; -} - -let print_output_options () = - printf (f_"virt-v2v -oo server-id= [os-*=...] - -Specify the name or UUID of the conversion appliance using - - virt-v2v ... -o openstack -oo server-id= - -When virt-v2v runs it will attach the Cinder volumes to the -conversion appliance, so this name or UUID must be the name -of the virtual machine on OpenStack where virt-v2v is running. - -In addition, all usual OpenStack “os-*” parameters or “OS_*” -environment variables can be used. - -Openstack “--os-*” parameters must be written as “virt-v2v -oo os-*”. - -For example: - - virt-v2v -oo os-username= - - equivalent to openstack: --os-username= - or the environment variable: OS_USERNAME= - - virt-v2v -oo os-project-name= - - equivalent to openstack: --os-project-name= - or the environment variable: OS_PROJECT_NAME= - -The os-* parameters and environment variables are optional. -") - -let parse_output_options options = - let server_id = ref None in - let dev_disk_by_id = ref None in - let verify_server_certificate = ref true in - let guest_id = ref None in - let authentication = ref [] in - List.iter ( - function - | "server-id", v -> - server_id := Some v - | "dev-disk-by-id", v -> - dev_disk_by_id := Some v - | "verify-server-certificate", "" -> - verify_server_certificate := true - | "verify-server-certificate", v -> - verify_server_certificate := bool_of_string v - | "guest-id", v -> - guest_id := Some v - | k, v when String.is_prefix k "os-" -> - (* Accumulate any remaining/unknown -oo os-* parameters - * into the authentication list, where they will be - * pass unmodified through to the openstack command. - *) - let opt = sprintf "--%s=%s" k v in - authentication := opt :: !authentication - | k, _ -> - error (f_"-o openstack: unknown output option ‘-oo %s’") k - ) options; - let server_id = - match !server_id with - | None -> - error (f_"openstack: -oo server-id= not present"); - | Some server_id -> server_id in - let authentication = List.rev !authentication in - let verify_server_certificate = !verify_server_certificate in - let guest_id = !guest_id in - let dev_disk_by_id = !dev_disk_by_id in - { server_id; authentication; verify_server_certificate; - guest_id; dev_disk_by_id } - -(* UTC conversion time. *) -let iso_time = - let time = time () in - let tm = gmtime time in - sprintf "%04d/%02d/%02d %02d:%02d:%02d" - (tm.tm_year + 1900) (tm.tm_mon + 1) tm.tm_mday - tm.tm_hour tm.tm_min tm.tm_sec - -class output_openstack output_conn output_password output_storage - (os_options : os_options) = - - (* The extra command line parameters derived from -oo etc. *) - let extra_args = - let args = ref os_options.authentication in - Option.may (fun oc -> List.push_back args (sprintf "--os-auth-url=%s" oc)) - output_conn; - if not os_options.verify_server_certificate then - List.push_back args "--insecure"; - !args in - - let error_unless_openstack_command_exists () = - try ignore (which openstack_binary) - with Executable_not_found _ -> - error (f_"the ‘%s’ program is not available. It is needed to communicate with OpenStack.") - openstack_binary - in - - (* We use this convenient wrapper around [Tools_utils.run_command] - * for two reasons: (1) Because we want to run openstack with - * extra_args. (2) OpenStack commands are noisy so we want to - * direct stdout to /dev/null unless we're in verbose mode. - *) - let run_openstack_command args = - let cmd = [ openstack_binary ] @ extra_args @ args in - let stdout_fd = - if verbose () then None - else Some (openfile "/dev/null" [O_WRONLY] 0) in - (* Note that run_command will close stdout_fd if defined. - * Don't echo the whole command because it can contain passwords. - *) - debug "openstack [...] %s" (String.concat " " args); - Tools_utils.run_command ~echo_cmd:false ?stdout_fd cmd - in - - (* Similar to above, run the openstack command and capture the - * JSON document printed by the command. Note you must add - * '-f json' to the args yourself. - *) - let run_openstack_command_capture_json args = - let cmd = [ openstack_binary ] @ extra_args @ args in - - let json, chan = Filename.open_temp_file "v2vopenstack" ".json" in - unlink_on_exit json; - let fd = descr_of_out_channel chan in - - (* Note that Tools_utils.run_command closes fd. - * Don't echo the whole command because it can contain passwords. - *) - debug "openstack [...] %s" (String.concat " " args); - if Tools_utils.run_command ~echo_cmd:false ~stdout_fd:fd cmd <> 0 then - None - else ( - let json = json_parser_tree_parse_file json in - debug "openstack: JSON parsed as: %s" - (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); - Some json - ) - in - - (* Create a new Cinder volume and wait for its status to change to - * "available". Returns the volume id. - *) - let create_cinder_volume name description size = - (* Cinder volumes are allocated in increments of 1 GB. Weird. *) - let size_gb = - let s = roundup64 size 1073741824L in - let s = s /^ 1073741824L in - Int64.to_string s in - - let args = ref [] in - List.push_back_list args [ "volume"; "create"; - "-f"; "json"; - "--size"; size_gb; - "--description"; description; - "--non-bootable"; - "--read-write" ]; - Option.may ( - fun os -> - List.push_back_list args [ "--type"; os ] - ) output_storage; - List.push_back args name; - - let json = - match run_openstack_command_capture_json !args with - | None -> - error (f_"openstack: failed to create a cinder volume, see earlier error messages") - | Some json -> json in - let id = object_get_string "id" json in - - (* Wait for the volume state to change to "available". *) - let args = [ "volume"; "show"; "-f"; "json"; id ] in - with_timeout - (s_"wait for cinder volume status to change to \"available\"") - available_timeout - (fun () -> - match run_openstack_command_capture_json args with - | None -> - error (f_"openstack: failed to query cinder volume status, see earlier error messages") - | Some json -> - match object_get_string "status" json with - | "creating" -> None - | "available" -> Some () (* done *) - | status -> - error (f_"openstack: unknown volume status \"%s\": expected \"creating\" or \"available\"") status - ); - - id - in - - (* Delete a cinder volume. - * - * This ignores errors since the only time we are doing this is on - * the failure path. - *) - let delete_cinder_volume id = - let args = [ "volume"; "delete"; id ] in - ignore (run_openstack_command args) - in - - (* Update metadata on a cinder volume. *) - let update_cinder_volume_metadata ?bootable ?description - ?(image_properties = []) - ?(volume_properties = []) - id = - let args = ref [ "volume"; "set" ] in - - Option.may ( - fun bootable -> - List.push_back args - (if bootable then "--bootable" else "--non-bootable") - ) bootable; - - Option.may ( - fun description -> - List.push_back_list args ["--description"; description] - ) description; - - let image_properties = - List.flatten ( - List.map ( - fun (k, v) -> [ "--image-property"; sprintf "%s=%s" k v ] - ) image_properties - ) in - List.push_back_list args image_properties; - - let volume_properties = - List.flatten ( - List.map ( - fun (k, v) -> [ "--property"; sprintf "%s=%s" k v ] - ) volume_properties - ) in - List.push_back_list args volume_properties; - - List.push_back args id; - - if run_openstack_command !args <> 0 then - error (f_"openstack: failed to set image properties on cinder volume, see earlier error messages") - in - - (* Attach volume to current VM and wait for it to appear. - * Returns the block device name. - *) - let attach_volume id = - let args = [ "server"; "add"; "volume"; - os_options.server_id; id ] in - if run_openstack_command args <> 0 then - error (f_"openstack: failed to attach cinder volume to VM, see earlier error messages"); - - (* We expect the disk to appear under /dev/disk/by-id. - * - * In theory the serial number of the disk should be the - * volume ID. However the practical reality is: - * - * (1) Only the first 20 characters are included by OpenStack. - * (2) udev(?) adds extra stuff - * - * So look for any file under /dev/disk/by-id which contains - * the prefix of the volume ID as a substring. - *) - let dev_disk_by_id = - Option.default "/dev/disk/by-id" os_options.dev_disk_by_id in - let prefix_len = 16 (* maybe 20, but be safe *) in - let prefix_id = - if String.length id > prefix_len then String.sub id 0 prefix_len - else id in - - with_timeout - (sprintf (f_"waiting for cinder volume %s to attach to the conversion appliance") id) - attach_timeout - (fun () -> - let entries = - try Sys.readdir dev_disk_by_id - (* It's possible for /dev/disk/by-id to not exist, since it's - * only created by udev on demand, so ignore this error. - *) - with Sys_error _ -> [||] in - let entries = Array.to_list entries in - let entries = - List.filter (fun e -> String.find e prefix_id >= 0) entries in - match entries with - | d :: _ -> Some (dev_disk_by_id // d) - | [] -> None - ); - in - - (* Detach volume from current VM. This does not wait and doesn't - * check for errors, since either we're on the failure path and/or - * there's nothing we could do with the error anyway. - *) - let detach_volume id = - let args = [ "server"; "remove"; "volume"; - os_options.server_id; id ] in - ignore (run_openstack_command args) - in - -object - inherit output - - method precheck () = - (* Check the openstack command exists. *) - error_unless_openstack_command_exists (); - - (* Run the openstack command simply to check we can connect - * with the provided authentication parameters/environment - * variables. Issuing a token should have only a tiny - * overhead. - *) - let args = [ "token"; "issue" ] in - if run_openstack_command args <> 0 then - error (f_"openstack: precheck failed, there may be a problem with authentication, see earlier error messages") - - method as_options = - "-o openstack" ^ - (match output_conn with - | None -> "" - | Some oc -> " -oc " ^ oc) ^ - (match output_password with - | None -> "" - | Some op -> " -op " ^ op) - - method supported_firmware = [ TargetBIOS ] - - (* List of Cinder volume IDs. *) - val mutable volume_ids = [] - (* If we didn't finish successfully, delete on exit. *) - val mutable delete_volumes_on_exit = true - - (* Create the Cinder volumes, wait for them to attach to the - * appliance, and return the paths of the /dev devices. - *) - method prepare_targets source_name overlays = - (* Set up an at-exit handler so we: - * (1) Unconditionally detach volumes. - * (2) Delete the volumes, but only if conversion was not successful. - *) - at_exit ( - fun () -> - List.iter detach_volume volume_ids; - if delete_volumes_on_exit then ( - (* XXX We probably need to wait for the previous - * detach operation to complete - unclear how. - *) - List.iter delete_cinder_volume volume_ids; - volume_ids <- [] - ) - ); - - (* Set a known description for volumes, then change it later - * when conversion is successful. In theory this would allow - * some kind of garbage collection for unfinished conversions - * in the case that virt-v2v crashes. - *) - let description = - sprintf "virt-v2v temporary volume for %s" source_name in - - (* Create the Cinder volumes. *) - List.iter ( - fun (_, ov) -> - (* Unclear what we should set the name to, so just make - * something related to the guest name. Cinder volume - * names do not need to be unique. - *) - let name = sprintf "%s-%s" source_name ov.ov_sd in - - (* Create the cinder volume and add the returned volume - * ID to the volume_ids list. - *) - let id = create_cinder_volume name description ov.ov_virtual_size in - volume_ids <- volume_ids @ [id] - ) overlays; - - (* Attach volume IDs to the conversion appliance and wait - * for the device nodes to appear. - *) - List.map ( - fun id -> - let dev = attach_volume id in - TargetFile dev - ) volume_ids - - method create_metadata source targets - target_buses guestcaps inspect target_firmware = - let nr_disks = List.length targets in - assert (nr_disks = List.length volume_ids); - assert (nr_disks >= 1); - - (* Image properties are only set on the first disk. - * - * In addition we set the first disk to bootable - * (XXX see RHBZ#1308535 for why this is wrong). - *) - let image_properties = - Openstack_image_properties.create source target_buses - guestcaps inspect target_firmware in - update_cinder_volume_metadata ~bootable:true ~image_properties - (List.hd volume_ids); - - (* For all disks we update the description to a "non-temporary" - * description (see above) and set volume properties. - *) - List.iteri ( - fun i id -> - let description = - sprintf "%s disk %d/%d converted by virt-v2v" - source.s_name (i+1) nr_disks in - - let volume_properties = ref [ - "virt_v2v_version", Guestfs_config.package_version_full; - "virt_v2v_conversion_date", iso_time; - "virt_v2v_guest_name", source.s_name; - "virt_v2v_disk_index", sprintf "%d/%d" (i+1) nr_disks; - ] in - (match source.s_genid with - | None -> () - | Some genid -> - List.push_back volume_properties - ("virt_v2v_vm_generation_id", genid) - ); - (match os_options.guest_id with - | None -> () - | Some guest_id -> - List.push_back volume_properties - ("virt_v2v_guest_id", guest_id) - ); - let volume_properties = !volume_properties in - - update_cinder_volume_metadata ~description ~volume_properties id - ) volume_ids; - - (* Successful so don't delete on exit. *) - delete_volumes_on_exit <- false - -end - -let output_openstack = new output_openstack -let () = Modules_list.register_output_module "openstack" diff --git a/v2v/output_openstack.mli b/v2v/output_openstack.mli deleted file mode 100644 index 1d89d7daa..000000000 --- a/v2v/output_openstack.mli +++ /dev/null @@ -1,32 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o openstack] target. *) - -type os_options -(** Miscellaneous extra command line parameters used by Openstack. *) - -val print_output_options : unit -> unit -val parse_output_options : (string * string) list -> os_options -(** Print and parse openstack -oo options. *) - -val output_openstack : string option -> string option -> string option -> - os_options -> Types.output -(** [output_openstack output_conn output_password output_storage os_options] - creates and returns a new {!Types.output} object specialized for writing - output to Openstack using the Openstack APIs. *) diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml deleted file mode 100644 index 22e8581a9..000000000 --- a/v2v/output_qemu.ml +++ /dev/null @@ -1,284 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Types -open Utils - -let find_target_disk targets { s_disk_id = id } = - try List.find (fun t -> t.target_overlay.ov_source.s_disk_id = id) targets - with Not_found -> assert false - -class output_qemu dir qemu_boot = -object - inherit output - - method as_options = - sprintf "-o qemu -os %s%s" dir (if qemu_boot then " --qemu-boot" else "") - - method prepare_targets source_name overlays = - List.map ( - fun (_, ov) -> - TargetFile (dir // source_name ^ "-" ^ ov.ov_sd) - ) overlays - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - method check_target_firmware guestcaps target_firmware = - match target_firmware with - | TargetBIOS -> () - | TargetUEFI -> error_unless_uefi_firmware guestcaps.gcaps_arch - - method create_metadata source targets target_buses guestcaps inspect - target_firmware = - let name = source.s_name in - let file = dir // name ^ ".sh" in - - let uefi_firmware = - match target_firmware with - | TargetBIOS -> None - | TargetUEFI -> Some (find_uefi_firmware guestcaps.gcaps_arch) in - let machine, secure_boot_required = - match guestcaps.gcaps_machine, uefi_firmware with - | _, Some { Uefi.flags } - when List.mem Uefi.UEFI_FLAG_SECURE_BOOT_REQUIRED flags -> - (* Force machine type to Q35 because PC does not support - * secure boot. We must remove this when we get the - * correct machine type from libosinfo in future. XXX - *) - Q35, true - | machine, _ -> - machine, false in - let smm = secure_boot_required in - - let machine = - match machine with - | I440FX -> "pc" - | Q35 -> "q35" - | Virt -> "virt" in - - (* Construct the command line. Note that the [Qemuopts] - * module deals with shell and qemu comma quoting. - *) - let cmd = Qemuopts.create () in - Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch); - - let flag = Qemuopts.flag cmd - and arg = Qemuopts.arg cmd - and arg_noquote = Qemuopts.arg_noquote cmd - and arg_list = Qemuopts.arg_list cmd in - - flag "-no-user-config"; flag "-nodefaults"; - arg "-name" source.s_name; - - (match source.s_genid with - | None -> () - | Some genid -> - arg_list "-device" ["vmgenid"; sprintf "guid=%s" genid; "id=vmgenid0"] - ); - - arg_list "-machine" (machine :: - (if smm then ["smm=on"] else []) @ - ["accel=kvm:tcg"]); - - (match uefi_firmware with - | None -> () - | Some { Uefi.code } -> - if secure_boot_required then - arg_list "-global" - ["driver=cfi.pflash01"; "property=secure"; "value=on"]; - arg_list "-drive" - ["if=pflash"; "format=raw"; "file=" ^ code; "readonly"]; - arg_noquote "-drive" "if=pflash,format=raw,file=\"$uefi_vars\""; - ); - - arg "-m" (Int64.to_string (source.s_memory /^ 1024L /^ 1024L)); - if source.s_vcpu > 1 then ( - (match source.s_cpu_topology with - | None -> - arg "-smp" (string_of_int source.s_vcpu) - | Some { s_cpu_sockets; s_cpu_cores; s_cpu_threads } -> - let args = [ - sprintf "cpus=%d" source.s_vcpu; - sprintf "sockets=%d" s_cpu_sockets; - sprintf "cores=%d" s_cpu_cores; - sprintf "threads=%d" s_cpu_threads; - ] in - arg_list "-smp" args - ); - ); - - let make_disk if_name i = function - | BusSlotEmpty -> () - - | BusSlotDisk d -> - (* Find the corresponding target disk. *) - let t = find_target_disk targets d in - - let target_file = - match t.target_file with - | TargetFile s -> s - | TargetURI _ -> assert false in - arg_list "-drive" ["file=" ^ target_file; "format=" ^ t.target_format; - "if=" ^ if_name; "index=" ^ string_of_int i; - "media=disk"] - - | BusSlotRemovable { s_removable_type = CDROM } -> - arg_list "-drive" ["format=raw"; "if=" ^ if_name; - "index=" ^ string_of_int i; "media=cdrom"] - - | BusSlotRemovable { s_removable_type = Floppy } -> - arg_list "-drive" ["format=raw"; "if=" ^ if_name; - "index=" ^ string_of_int i; "media=floppy"] - in - Array.iteri (make_disk "virtio") target_buses.target_virtio_blk_bus; - Array.iteri (make_disk "ide") target_buses.target_ide_bus; - - let make_scsi i = function - | BusSlotEmpty -> () - - | BusSlotDisk d -> - (* Find the corresponding target disk. *) - let t = find_target_disk targets d in - - let target_file = - match t.target_file with - | TargetFile s -> s - | TargetURI _ -> assert false in - arg_list "-drive" ["file=" ^ target_file; "format=" ^ t.target_format; - "if=scsi"; "bus=0"; "unit=" ^ string_of_int i; - "media=disk"] - - | BusSlotRemovable { s_removable_type = CDROM } -> - arg_list "-drive" ["format=raw"; "if=scsi"; "bus=0"; - "unit=" ^ string_of_int i; "media=cdrom"] - - | BusSlotRemovable { s_removable_type = Floppy } -> - arg_list "-drive" ["format=raw"; "if=scsi"; "bus=0"; - "unit=" ^ string_of_int i; "media=floppy"] - in - Array.iteri make_scsi target_buses.target_scsi_bus; - - (* XXX Highly unlikely that anyone cares, but the current - * code ignores target_buses.target_floppy_bus. - *) - - let net_bus = - match guestcaps.gcaps_net_bus with - | Virtio_net -> "virtio-net-pci" - | E1000 -> "e1000" - | RTL8139 -> "rtl8139" in - List.iteri ( - fun i nic -> - arg_list "-netdev" ["user"; "id=net" ^ string_of_int i]; - arg_list "-device" ([net_bus; - sprintf "netdev=net%d" i] @ - (match nic.s_mac with - | None -> [] - | Some mac -> ["mac=" ^ mac])) - ) source.s_nics; - - (* Add a display. *) - (match source.s_display with - | None -> () - | Some display -> - (match display.s_display_type with - | Window -> - arg "-display" "gtk" - | VNC -> - arg "-display" "vnc=:0" - | Spice -> - arg_list "-spice" [sprintf "port=%d" - (match display.s_port with - | None -> 5900 - | Some p -> p); - "addr=127.0.0.1"] - ); - arg "-vga" - (match guestcaps.gcaps_video with Cirrus -> "cirrus" | QXL -> "qxl") - ); - - (* Add a sound card. *) - (match source.s_sound with - | None -> () - | Some { s_sound_model = model } -> - if qemu_supports_sound_card model then ( - match model with - | AC97 -> arg "-device" "AC97" - | ES1370 -> arg "-device" "ES1370" - | ICH6 -> arg "-device" "intel-hda"; arg "-device" "hda-duplex" - (* XXX ich9 is a q35-only device, so it's not likely - that this will work unless we can force q35 above: *) - | ICH9 -> arg "-device" "ich9-intel-hda" - | PCSpeaker -> arg "-soundhw" "pcspk" (* not qdev-ified *) - | SB16 -> arg "-device" "sb16" - | USBAudio -> arg "-device" "usb-audio" - ) - ); - - (* Add the miscellaneous KVM devices. *) - if guestcaps.gcaps_virtio_rng then ( - arg_list "-object" ["rng-random"; "filename=/dev/urandom"; "id=rng0"]; - arg_list "-device" ["virtio-rng-pci"; "rng=rng0"]; - ); - if guestcaps.gcaps_virtio_balloon then - arg "-balloon" "virtio" - else - arg "-balloon" "none"; - if guestcaps.gcaps_isa_pvpanic then - arg_list "-device" ["pvpanic"; "ioport=0x505"]; - - (* Add a serial console to Linux guests. *) - if inspect.i_type = "linux" then - arg "-serial" "stdio"; - - (* Write the output file. *) - with_open_out file ( - fun chan -> - let fpf fs = fprintf chan fs in - fpf "#!/bin/sh -\n"; - fpf "\n"; - - (match uefi_firmware with - | None -> () - | Some { Uefi.vars = vars_template } -> - fpf "# Make a copy of the UEFI variables template\n"; - fpf "uefi_vars=\"$(mktemp)\"\n"; - fpf "cp %s \"$uefi_vars\"\n" (quote vars_template); - fpf "\n" - ); - - Qemuopts.to_chan cmd chan - ); - - Unix.chmod file 0o755; - - (* If --qemu-boot option was specified then we should boot the guest. *) - if qemu_boot then ( - let cmd = sprintf "%s &" (quote file) in - ignore (shell_command cmd) - ) -end - -let output_qemu = new output_qemu -let () = Modules_list.register_output_module "qemu" diff --git a/v2v/output_qemu.mli b/v2v/output_qemu.mli deleted file mode 100644 index 25f0648b1..000000000 --- a/v2v/output_qemu.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o qemu] target. *) - -val output_qemu : string -> bool -> Types.output -(** [output_qemu filename qemu_boot] creates and returns a new - {!Types.output} object specialized for writing output to local - files with a qemu script to start the guest locally. *) diff --git a/v2v/output_rhv.ml b/v2v/output_rhv.ml deleted file mode 100644 index a9102c069..000000000 --- a/v2v/output_rhv.ml +++ /dev/null @@ -1,281 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Std_utils -open Tools_utils -open Unix_utils -open Common_gettext.Gettext - -open Unix -open Printf - -open Types -open Utils - -let rec mount_and_check_storage_domain domain_class os = - (* The user can either specify -os nfs:/export, or a local directory - * which is assumed to be the already-mounted NFS export. - *) - match String.split ":/" os with - | mp, "" -> (* Already mounted directory. *) - check_storage_domain domain_class os mp - | server, export -> - let export = "/" ^ export in - - (* Create a mountpoint. Default mode is too restrictive for us - * when we need to write into the directory as 36:36. - *) - let mp = Mkdtemp.temp_dir "v2v." in - chmod mp 0o755; - - (* Try mounting it. *) - let cmd = [ "mount"; sprintf "%s:%s" server export; mp ] in - if run_command cmd <> 0 then - error (f_"mount command failed, see earlier errors.\n\nThis probably means you didn't specify the right %s path [-os %s], or else you need to rerun virt-v2v as root.") domain_class os; - - (* Make sure it is unmounted at exit. *) - at_exit (fun () -> - let cmd = [ "umount"; mp ] in - ignore (run_command cmd); - try rmdir mp with _ -> () - ); - - check_storage_domain domain_class os mp - -and check_storage_domain domain_class os mp = - (* Typical SD mountpoint looks like this: - * $ ls /tmp/mnt - * 39b6af0e-1d64-40c2-97e4-4f094f1919c7 __DIRECT_IO_TEST__ lost+found - * $ ls /tmp/mnt/39b6af0e-1d64-40c2-97e4-4f094f1919c7 - * dom_md images master - * We expect exactly one of those magic UUIDs. - *) - let entries = - try Sys.readdir mp - with Sys_error msg -> - error (f_"could not read the %s specified by the '-os %s' parameter on the command line. Is it really an OVirt or RHV-M %s? The original error is: %s") domain_class os domain_class msg in - let entries = Array.to_list entries in - let uuids = List.filter ( - fun entry -> - String.length entry = 36 && - entry.[8] = '-' && entry.[13] = '-' && entry.[18] = '-' && - entry.[23] = '-' - ) entries in - let uuid = - match uuids with - | [uuid] -> uuid - | [] -> - error (f_"there are no UUIDs in the %s (%s). Is it really an OVirt or RHV-M %s?") domain_class os domain_class - | _::_ -> - error (f_"there are multiple UUIDs in the %s (%s). This is unexpected, and may be a bug in virt-v2v or OVirt.") domain_class os in - - (* Check that the domain has been attached to a Data Center by - * checking that the master/vms directory exists. - *) - let () = - let master_vms_dir = mp // uuid // "master" // "vms" in - if not (is_directory master_vms_dir) then - error (f_"%s does not exist or is not a directory.\n\nMost likely cause: Either the %s (%s) has not been attached to any Data Center, or the path %s is not an %s at all.\n\nYou have to attach the %s to a Data Center using the RHV-M / OVirt user interface first.\n\nIf you don’t know what the %s mount point should be then you can also find this out through the RHV-M user interface.") - master_vms_dir domain_class os os - domain_class domain_class domain_class in - - (* Looks good, so return the SD mountpoint and UUID. *) - (mp, uuid) - -(* UID:GID required for files and directories when writing to ESD. *) -let uid = 36 and gid = 36 - -class output_rhv os output_alloc = - (* Create a UID-switching handle. If we're not root, create a dummy - * one because we cannot switch UIDs. - *) - let running_as_root = geteuid () = 0 in - let changeuid_t = - if running_as_root then - Changeuid.create ~uid ~gid () - else - Changeuid.create () in -object - inherit output - - method as_options = sprintf "-o rhv -os %s" os - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - (* RHV doesn't support serial consoles. This causes the conversion - * step to remove it. - *) - method keep_serial_console = false - - (* rhev-apt.exe will be installed (if available). *) - method install_rhev_apt = true - - (* Export Storage Domain mountpoint and UUID. *) - val mutable esd_mp = "" - val mutable esd_uuid = "" - - (* Target VM UUID. *) - val mutable vm_uuid = "" - - (* Image and volume UUIDs. The length of these lists will be the - * same as the list of targets. - *) - val mutable image_uuids = [] - val mutable vol_uuids = [] - - (* Flag to indicate if the target image dir(s) should be deleted. - * This is set to false once we know the conversion was - * successful. - *) - val mutable delete_target_directory = true - - (* This is called early on in the conversion and lets us choose the - * name of the target files that eventually get written by the main - * code. - * - * 'os' is the output storage (-os nfs:/export). 'targets' describes - * the destination files. We modify and return this list. - *) - method prepare_targets _ overlays = - let mp, uuid = - mount_and_check_storage_domain (s_"Export Storage Domain") os in - esd_mp <- mp; - esd_uuid <- uuid; - debug "RHV: ESD mountpoint: %s\nRHV: ESD UUID: %s" esd_mp esd_uuid; - - (* See if we can write files as UID:GID 36:36. *) - let () = - let testfile = esd_mp // esd_uuid // String.random8 () in - Changeuid.make_file changeuid_t testfile ""; - let stat = stat testfile in - Changeuid.unlink changeuid_t testfile; - let actual_uid = stat.st_uid and actual_gid = stat.st_gid in - debug "RHV: actual UID:GID of new files is %d:%d" actual_uid actual_gid; - if uid <> actual_uid || gid <> actual_gid then ( - if running_as_root then - warning (f_"cannot write files to the NFS server as %d:%d, even though we appear to be running as root. This probably means the NFS client or idmapd is not configured properly.\n\nYou will have to chown the files that virt-v2v creates after the run, otherwise RHV-M will not be able to import the VM.") uid gid - else - warning (f_"cannot write files to the NFS server as %d:%d. You might want to stop virt-v2v (^C) and rerun it as root.") uid gid - ) in - - (* Create unique UUIDs for everything *) - vm_uuid <- uuidgen (); - (* Generate random image and volume UUIDs for each target. *) - image_uuids <- - List.map ( - fun _ -> uuidgen () - ) overlays; - vol_uuids <- - List.map ( - fun _ -> uuidgen () - ) overlays; - - (* We need to create the target image director(ies) so there's a place - * for the main program to copy the images to. However if image - * conversion fails for any reason then we delete this directory. - *) - let images_dir = esd_mp // esd_uuid // "images" in - List.iter ( - fun image_uuid -> - let d = images_dir // image_uuid in - Changeuid.mkdir changeuid_t d 0o755 - ) image_uuids; - at_exit (fun () -> - if delete_target_directory then ( - List.iter ( - fun image_uuid -> - let d = images_dir // image_uuid in - let cmd = sprintf "rm -rf %s" (quote d) in - Changeuid.command changeuid_t cmd - ) image_uuids - ) - ); - - (* The final directory structure should look like this: - * ///images/ - * / # first disk (gen'd by main code) - * /.meta # first disk - * / # second disk - * /.meta # second disk - * / # etc - * /.meta # - *) - - (* Generate the randomly named target files (just the names). - * The main code is what generates the files themselves. - *) - let targets = - List.map ( - fun ((_, ov), image_uuid, vol_uuid) -> - let target_file = images_dir // image_uuid // vol_uuid in - debug "RHV: will export %s to %s" ov.ov_sd target_file; - TargetFile target_file - ) (List.combine3 overlays image_uuids vol_uuids) in - - (* Generate the .meta file associated with each volume. *) - let metas = - Create_ovf.create_meta_files output_alloc esd_uuid image_uuids - overlays in - List.iter ( - fun (target_file, meta) -> - let target_file = - match target_file with - | TargetFile s -> s - | TargetURI _ -> assert false in - let meta_filename = target_file ^ ".meta" in - Changeuid.make_file changeuid_t meta_filename meta - ) (List.combine targets metas); - - (* Return the list of target files. *) - targets - - method disk_create ?backingfile ?backingformat ?preallocation ?compat - ?clustersize path format size = - Changeuid.func changeuid_t ( - fun () -> - let g = open_guestfs ~identifier:"rhv_disk_create" () in - g#disk_create ?backingfile ?backingformat ?preallocation ?compat - ?clustersize path format size; - (* Make it sufficiently writable so that possibly root, or - * root squashed qemu-img will definitely be able to open it. - * An example of how root squashing nonsense makes everyone - * less secure. - *) - chmod path 0o666 - ) - - (* This is called after conversion to write the OVF metadata. *) - method create_metadata source targets _ guestcaps inspect target_firmware = - - (* Create the metadata. *) - let ovf = Create_ovf.create_ovf source targets guestcaps inspect - target_firmware output_alloc esd_uuid image_uuids vol_uuids vm_uuid - Create_ovf.RHVExportStorageDomain in - - (* Write it to the metadata file. *) - let dir = esd_mp // esd_uuid // "master" // "vms" // vm_uuid in - Changeuid.mkdir changeuid_t dir 0o755; - let file = dir // vm_uuid ^ ".ovf" in - Changeuid.output changeuid_t file (fun chan -> DOM.doc_to_chan chan ovf); - - (* Finished, so don't delete the target directory on exit. *) - delete_target_directory <- false -end - -let output_rhv = new output_rhv -let () = Modules_list.register_output_module "rhv" diff --git a/v2v/output_rhv.mli b/v2v/output_rhv.mli deleted file mode 100644 index e0db4f87d..000000000 --- a/v2v/output_rhv.mli +++ /dev/null @@ -1,24 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o rhv] target. *) - -val output_rhv : string -> Types.output_allocation -> Types.output -(** [output_rhv os output_alloc] creates and - returns a new {!Types.output} object specialized for writing - output to RHV-M or oVirt Export Storage Domain. *) diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml deleted file mode 100644 index c3decc7de..000000000 --- a/v2v/output_rhv_upload.ml +++ /dev/null @@ -1,488 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf -open Unix - -open Std_utils -open Tools_utils -open Unix_utils -open Common_gettext.Gettext - -open Types -open Utils - -type rhv_options = { - rhv_cafile : string option; - rhv_cluster : string option; - rhv_direct : bool; - rhv_verifypeer : bool; - rhv_disk_uuids : string list option; -} - -let print_output_options () = - printf (f_"Output options (-oo) which can be used with -o rhv-upload: - - -oo rhv-cafile=CA.PEM Set ‘ca.pem’ certificate bundle filename. - -oo rhv-cluster=CLUSTERNAME Set RHV cluster name. - -oo rhv-direct[=true|false] Use direct transfer mode (default: false). - -oo rhv-verifypeer[=true|false] Verify server identity (default: false). - -You can override the UUIDs of the disks, instead of using autogenerated UUIDs -after their uploads (if you do, you must supply one for each disk): - - -oo rhv-disk-uuid=UUID Disk UUID -") - -let parse_output_options options = - let rhv_cafile = ref None in - let rhv_cluster = ref None in - let rhv_direct = ref false in - let rhv_verifypeer = ref false in - let rhv_disk_uuids = ref None in - - List.iter ( - function - | "rhv-cafile", v -> - if !rhv_cafile <> None then - error (f_"-o rhv-upload: -oo rhv-cafile set more than once"); - rhv_cafile := Some v - | "rhv-cluster", v -> - if !rhv_cluster <> None then - error (f_"-o rhv-upload: -oo rhv-cluster set more than once"); - rhv_cluster := Some v - | "rhv-direct", "" -> rhv_direct := true - | "rhv-direct", v -> rhv_direct := bool_of_string v - | "rhv-verifypeer", "" -> rhv_verifypeer := true - | "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v - | "rhv-disk-uuid", v -> - rhv_disk_uuids := Some (v :: (Option.default [] !rhv_disk_uuids)) - | k, _ -> - error (f_"-o rhv-upload: unknown output option ‘-oo %s’") k - ) options; - - let rhv_cafile = !rhv_cafile in - let rhv_cluster = !rhv_cluster in - let rhv_direct = !rhv_direct in - let rhv_verifypeer = !rhv_verifypeer in - let rhv_disk_uuids = Option.map List.rev !rhv_disk_uuids in - if rhv_verifypeer && rhv_cafile = None then - error (f_"-o rhv-upload: must use ‘-oo rhv-cafile’ to supply the path to the oVirt or RHV user’s ‘ca.pem’ file"); - - { rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer; rhv_disk_uuids } - -let nbdkit_python_plugin = Config.virt_v2v_nbdkit_python_plugin -let pidfile_timeout = 30 -let finalization_timeout = 5*60 - -let json_optstring = function - | Some s -> JSON.String s - | None -> JSON.Null - -class output_rhv_upload output_alloc output_conn - output_password output_storage - rhv_options = - (* Create a temporary directory which will be deleted on exit. *) - let tmpdir = - let base_dir = (open_guestfs ())#get_cachedir () in - let t = Mkdtemp.temp_dir ~base_dir "rhvupload." in - rmdir_on_exit t; - t in - - let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in - - (* Create Python scripts for precheck, vmcheck, plugin and create VM. *) - let py_create = Python_script.create ~tmpdir in - let precheck_script = py_create ~name:"rhv-upload-precheck.py" - Output_rhv_upload_precheck_source.code in - let vmcheck_script = py_create ~name:"rhv-upload-vmcheck.py" - Output_rhv_upload_vmcheck_source.code in - let plugin_script = py_create ~name:"rhv-upload-plugin.py" - Output_rhv_upload_plugin_source.code in - let createvm_script = py_create ~name:"rhv-upload-createvm.py" - Output_rhv_upload_createvm_source.code in - let deletedisks_script = py_create ~name:"rhv-upload-deletedisks.py" - Output_rhv_upload_deletedisks_source.code in - - (* Check that the 'ovirtsdk4' Python module is available. *) - let error_unless_ovirtsdk4_module_available () = - let res = run_command [ Python_script.python; "-c"; "import ovirtsdk4" ] in - if res <> 0 then - error (f_"the Python module ‘ovirtsdk4’ could not be loaded, is it installed? See previous messages for problems.") - in - - (* Check that nbdkit is available and new enough. *) - let error_unless_nbdkit_working () = - let cmd = "nbdkit --version >/dev/null" in - debug "%s" cmd; - if 0 <> Sys.command "nbdkit --version >/dev/null" then - error (f_"nbdkit is not installed or not working. It is required to use ‘-o rhv-upload’. See the virt-v2v-output-rhv(1) manual."); - - (* Check it's a new enough version. The latest features we - * require are ‘--exit-with-parent’ and ‘--selinux-label’, both - * added in 1.1.14. (We use 1.1.16 as the minimum here because - * it also adds the selinux=yes|no flag in --dump-config). - *) - let lines = external_command "nbdkit --help" in - let lines = String.concat " " lines in - if String.find lines "exit-with-parent" == -1 || - String.find lines "selinux-label" == -1 then - error (f_"nbdkit is not new enough, you need to upgrade to nbdkit ≥ 1.1.16") - in - - (* Check that the python3 plugin is installed and working - * and can load the plugin script. - *) - let error_unless_nbdkit_python_plugin_working () = - let cmd = sprintf "nbdkit %s %s --dump-plugin >/dev/null" - nbdkit_python_plugin - (quote (Python_script.path plugin_script)) in - debug "%s" cmd; - if Sys.command cmd <> 0 then - error (f_"nbdkit %s plugin is not installed or not working. It is required if you want to use ‘-o rhv-upload’. - -See also the virt-v2v-output-rhv(1) manual.") - nbdkit_python_plugin - in - - (* Check that nbdkit was compiled with SELinux support (for the - * --selinux-label option). - *) - let error_unless_nbdkit_compiled_with_selinux () = - let lines = external_command "nbdkit --dump-config" in - (* In nbdkit <= 1.1.15 the selinux attribute was not present - * at all in --dump-config output so there was no way to tell. - * Ignore this case because there will be an error later when - * we try to use the --selinux-label parameter. - *) - if List.mem "selinux=no" (List.map String.trim lines) then - error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") - in - - (* Output format/sparse must be raw/sparse. We may be able to - * lift this limitation in future, but it requires changes on the - * RHV side. See TODO file for details. XXX - *) - let error_current_limitation required_param = - error (f_"rhv-upload: currently you must use ‘%s’. This restriction will be loosened in a future version.") required_param - in - - let error_unless_output_alloc_sparse () = - if output_alloc <> Sparse then - error_current_limitation "-oa sparse" - in - - (* JSON parameters which are invariant between disks. *) - let json_params = [ - "verbose", JSON.Bool (verbose ()); - - "output_conn", JSON.String output_conn; - "output_password", JSON.String output_password; - "output_storage", JSON.String output_storage; - "output_sparse", JSON.Bool (match output_alloc with - | Sparse -> true - | Preallocated -> false); - "rhv_cafile", json_optstring rhv_options.rhv_cafile; - "rhv_cluster", - JSON.String (Option.default "Default" rhv_options.rhv_cluster); - "rhv_direct", JSON.Bool rhv_options.rhv_direct; - - (* The 'Insecure' flag seems to be a number with various possible - * meanings, however we just set it to True/False. - * - * https://github.com/oVirt/ovirt-engine-sdk/blob/19aa7070b80e60a4cfd910448287aecf9083acbe/sdk/lib/ovirtsdk4/__init__.py#L395 - *) - "insecure", JSON.Bool (not rhv_options.rhv_verifypeer); - ] in - - (* nbdkit command line args which are invariant between disks. *) - let nbdkit_args = - let args = [ - "nbdkit"; - - "--foreground"; (* run in foreground *) - "--exit-with-parent"; (* exit when virt-v2v exits *) - "--newstyle"; (* use newstyle NBD protocol *) - "--exportname"; "/"; - - nbdkit_python_plugin; (* use the nbdkit Python plugin *) - Python_script.path plugin_script; (* Python plugin script *) - ] in - let args = if verbose () then args @ ["--verbose"] else args in - let args = - (* label the socket so qemu can open it *) - if have_selinux then - args @ ["--selinux-label"; "system_u:object_r:svirt_socket_t:s0"] - else args in - args in - - (* Delete disks. - * - * This ignores errors since the only time we are doing this is on - * the failure path. - *) - let delete_disks uuids = - let ids = List.map (fun uuid -> JSON.String uuid) uuids in - let json_params = - ("disk_uuids", JSON.List ids) :: json_params in - ignore (Python_script.run_command deletedisks_script json_params []) - in - -object - inherit output - - (* The storage domain UUID. *) - val mutable rhv_storagedomain_uuid = None - (* The cluster UUID. *) - val mutable rhv_cluster_uuid = None - (* List of disk UUIDs. *) - val mutable disks_uuids = [] - (* If we didn't finish successfully, delete on exit. *) - val mutable delete_disks_on_exit = true - - method precheck () = - Python_script.error_unless_python_interpreter_found (); - error_unless_ovirtsdk4_module_available (); - error_unless_nbdkit_working (); - error_unless_nbdkit_python_plugin_working (); - error_unless_output_alloc_sparse (); - (* Python code prechecks. *) - let precheck_fn = tmpdir // "v2vprecheck.json" in - let fd = Unix.openfile precheck_fn [O_WRONLY; O_CREAT] 0o600 in - if Python_script.run_command ~stdout_fd:fd - precheck_script json_params [] <> 0 then - error (f_"failed server prechecks, see earlier errors"); - let json = JSON_parser.json_parser_tree_parse_file precheck_fn in - debug "precheck output parsed as: %s" - (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); - rhv_storagedomain_uuid <- - Some (JSON_parser.object_get_string "rhv_storagedomain_uuid" json); - rhv_cluster_uuid <- - Some (JSON_parser.object_get_string "rhv_cluster_uuid" json); - if have_selinux then - error_unless_nbdkit_compiled_with_selinux () - - method as_options = - "-o rhv-upload" ^ - (match output_alloc with - | Sparse -> "" (* default, don't need to print it *) - | Preallocated -> " -oa preallocated") ^ - sprintf " -oc %s -op %s -os %s" - output_conn output_password output_storage - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - (* rhev-apt.exe will be installed (if available). *) - method install_rhev_apt = true - - method prepare_targets source_name overlays = - let uuids = - match rhv_options.rhv_disk_uuids with - | None -> - List.map (fun _ -> None) overlays - | Some uuids -> - if List.length uuids <> List.length overlays then - error (f_"the number of ‘-oo rhv-disk-uuid’ parameters passed on the command line has to match the number of guest disk images (for this guest: %d)") - (List.length overlays); - List.map (fun uuid -> Some uuid) uuids in - - let output_name = source_name in - let json_params = - ("output_name", JSON.String output_name) :: json_params in - - (* Check that the VM does not exist. This can't run in #precheck because - * we need to know the name of the virtual machine. - *) - if Python_script.run_command vmcheck_script json_params [] <> 0 then - error (f_"failed vmchecks, see earlier errors"); - - (* Set up an at-exit handler so we delete the orphan disks on failure. *) - at_exit ( - fun () -> - if delete_disks_on_exit then ( - if disks_uuids <> [] then - delete_disks disks_uuids - ) - ); - - (* Create an nbdkit instance for each disk and set the - * target URI to point to the NBD socket. - *) - List.map ( - fun ((target_format, ov), uuid) -> - let id = ov.ov_source.s_disk_id in - let disk_name = sprintf "%s-%03d" output_name id in - let json_params = - ("disk_name", JSON.String disk_name) :: json_params in - - let disk_format = - match target_format with - | "raw" as fmt -> fmt - | "qcow2" -> - error_current_limitation "-of raw" - | _ -> - error (f_"rhv-upload: -of %s: Only output format ‘raw’ or ‘qcow2’ is supported. If the input is in a different format then force one of these output formats by adding either ‘-of raw’ or ‘-of qcow2’ on the command line.") - target_format in - let json_params = - ("disk_format", JSON.String disk_format) :: json_params in - - let disk_size = ov.ov_virtual_size in - let json_params = - ("disk_size", JSON.Int disk_size) :: json_params in - - (* Ask the plugin to write the disk ID to a special file. *) - let diskid_file = diskid_file_of_id id in - let json_params = - ("diskid_file", JSON.String diskid_file) :: json_params in - - let json_params = - match uuid with - | None -> json_params - | Some uuid -> - ("rhv_disk_uuid", JSON.String uuid) :: json_params in - - (* Write the JSON parameters to a file. *) - let json_param_file = tmpdir // sprintf "params%d.json" id in - with_open_out - json_param_file - (fun chan -> output_string chan (JSON.string_of_doc json_params)); - - let sock = tmpdir // sprintf "nbdkit%d.sock" id in - let pidfile = tmpdir // sprintf "nbdkit%d.pid" id in - - (* Add common arguments to per-target arguments. *) - let args = - nbdkit_args @ [ "--pidfile"; pidfile; - "--unix"; sock; - sprintf "params=%s" json_param_file ] in - - (* Print the full command we are about to run when debugging. *) - if verbose () then ( - eprintf "running nbdkit:\n"; - List.iter (fun arg -> eprintf " %s" (quote arg)) args; - prerr_newline () - ); - - (* Start an nbdkit instance in the background. By using - * --exit-with-parent we don't have to worry about clean-up. - *) - let args = Array.of_list args in - let pid = fork () in - if pid = 0 then ( - (* Child process (nbdkit). *) - execvp "nbdkit" args - ); - - (* Wait for the pidfile to appear so we know that nbdkit - * is listening for requests. - *) - if not (wait_for_file pidfile pidfile_timeout) then ( - if verbose () then - error (f_"nbdkit did not start up. See previous debugging messages for problems.") - else - error (f_"nbdkit did not start up. There may be errors printed by nbdkit above. - -If the messages above are not sufficient to diagnose the problem then add the ‘virt-v2v -v -x’ options and examine the debugging output carefully.") - ); - - if have_selinux then ( - (* Note that Unix domain sockets have both a file label and - * a socket/process label. Using --selinux-label above - * only set the socket label, but we must also set the file - * label. - *) - ignore ( - run_command ["chcon"; "system_u:object_r:svirt_image_t:s0"; - sock] - ); - ); - (* ... and the regular Unix permissions, in case qemu is - * running as another user. - *) - chmod sock 0o777; - - (* Tell ‘qemu-img convert’ to write to the nbd socket which is - * connected to nbdkit. - *) - let json_params = [ - "file.driver", JSON.String "nbd"; - "file.path", JSON.String sock; - "file.export", JSON.String "/"; - ] in - TargetURI ("json:" ^ JSON.string_of_doc json_params) - ) (List.combine overlays uuids) - - method disk_copied t i nr_disks = - (* Get the UUID of the disk image. This file is written - * out by the nbdkit plugin on successful finalization of the - * transfer. - *) - let id = t.target_overlay.ov_source.s_disk_id in - let diskid_file = diskid_file_of_id id in - if not (wait_for_file diskid_file finalization_timeout) then - error (f_"transfer of disk %d/%d failed, see earlier error messages") - (i+1) nr_disks; - let diskid = read_whole_file diskid_file in - disks_uuids <- disks_uuids @ [diskid]; - - method create_metadata source targets _ guestcaps inspect target_firmware = - let image_uuids = - match rhv_options.rhv_disk_uuids, disks_uuids with - | None, [] -> - error (f_"there must be ‘-oo rhv-disk-uuid’ parameters passed on the command line to specify the UUIDs of guest disk images (for this guest: %d)") - (List.length targets) - | Some uuids, _ -> uuids - | None, uuids -> uuids in - assert (List.length image_uuids = List.length targets); - - (* The storage domain UUID. *) - let sd_uuid = - match rhv_storagedomain_uuid with - | None -> assert false - | Some uuid -> uuid in - - (* The volume and VM UUIDs are made up. *) - let vol_uuids = List.map (fun _ -> uuidgen ()) targets - and vm_uuid = uuidgen () in - - (* Create the metadata. *) - let ovf = - Create_ovf.create_ovf source targets guestcaps inspect - target_firmware output_alloc - sd_uuid image_uuids vol_uuids vm_uuid - OVirt in - let ovf = DOM.doc_to_string ovf in - - let json_params = - match rhv_cluster_uuid with - | None -> assert false - | Some uuid -> ("rhv_cluster_uuid", JSON.String uuid) :: json_params in - - let ovf_file = tmpdir // "vm.ovf" in - with_open_out ovf_file (fun chan -> output_string chan ovf); - if Python_script.run_command createvm_script json_params [ovf_file] <> 0 - then - error (f_"failed to create virtual machine, see earlier errors"); - - (* Successful so don't delete on exit. *) - delete_disks_on_exit <- false - -end - -let output_rhv_upload = new output_rhv_upload -let () = Modules_list.register_output_module "rhv-upload" diff --git a/v2v/output_rhv_upload.mli b/v2v/output_rhv_upload.mli deleted file mode 100644 index 67ccc9755..000000000 --- a/v2v/output_rhv_upload.mli +++ /dev/null @@ -1,33 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o rhv-upload] target. *) - -type rhv_options -(** Miscellaneous extra command line parameters used by rhv-upload. *) - -val print_output_options : unit -> unit -val parse_output_options : (string * string) list -> rhv_options -(** Print and parse rhv-upload -oo options. *) - -val output_rhv_upload : Types.output_allocation -> string -> string -> - string -> rhv_options -> Types.output -(** [output_rhv_upload output_alloc output_conn output_password output_storage - rhv_options] - creates and returns a new {!Types.output} object specialized for writing - output to oVirt or RHV directly via RHV APIs. *) diff --git a/v2v/output_rhv_upload_createvm_source.mli b/v2v/output_rhv_upload_createvm_source.mli deleted file mode 100644 index c1bafa15b..000000000 --- a/v2v/output_rhv_upload_createvm_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v - * Copyright (C) 2018 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val code : string diff --git a/v2v/output_rhv_upload_deletedisks_source.mli b/v2v/output_rhv_upload_deletedisks_source.mli deleted file mode 100644 index aa33bc548..000000000 --- a/v2v/output_rhv_upload_deletedisks_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val code : string diff --git a/v2v/output_rhv_upload_plugin_source.mli b/v2v/output_rhv_upload_plugin_source.mli deleted file mode 100644 index c1bafa15b..000000000 --- a/v2v/output_rhv_upload_plugin_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v - * Copyright (C) 2018 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val code : string diff --git a/v2v/output_rhv_upload_precheck_source.mli b/v2v/output_rhv_upload_precheck_source.mli deleted file mode 100644 index aa33bc548..000000000 --- a/v2v/output_rhv_upload_precheck_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v - * Copyright (C) 2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val code : string diff --git a/v2v/output_rhv_upload_vmcheck_source.mli b/v2v/output_rhv_upload_vmcheck_source.mli deleted file mode 100644 index c1bafa15b..000000000 --- a/v2v/output_rhv_upload_vmcheck_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v - * Copyright (C) 2018 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val code : string diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml deleted file mode 100644 index 1c84439ee..000000000 --- a/v2v/output_vdsm.ml +++ /dev/null @@ -1,250 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Std_utils -open Tools_utils -open Common_gettext.Gettext - -open Unix -open Printf - -open Types -open Utils - -type vdsm_options = { - image_uuids : string list; - vol_uuids : string list; - vm_uuid : string; - ovf_output : string; - compat : string; - ovf_flavour : Create_ovf.ovf_flavour; -} - -let ovf_flavours_str = String.concat "|" Create_ovf.ovf_flavours - -let print_output_options () = - printf (f_"Output options (-oo) which can be used with -o vdsm: - - -oo vdsm-compat=0.10|1.1 Write qcow2 with compat=0.10|1.1 - (default: 0.10) - -oo vdsm-vm-uuid=UUID VM UUID (required) - -oo vdsm-ovf-output=DIR OVF metadata directory (required) - -oo vdsm-ovf-flavour=%s - Set the type of generated OVF (default: rhvexp) - -For each disk you must supply one of each of these options: - - -oo vdsm-image-uuid=UUID Image directory UUID - -oo vdsm-vol-uuid=UUID Disk volume UUID -") ovf_flavours_str - -let parse_output_options options = - let vm_uuid = ref None in - let ovf_output = ref None in (* default "." *) - let compat = ref "0.10" in - let ovf_flavour = ref Create_ovf.RHVExportStorageDomain in - let image_uuids = ref [] in - let vol_uuids = ref [] in - - List.iter ( - function - | "vdsm-compat", "0.10" -> compat := "0.10" - | "vdsm-compat", "1.1" -> compat := "1.1" - | "vdsm-compat", v -> - error (f_"-o vdsm: unknown vdsm-compat level ‘%s’") v - | "vdsm-vm-uuid", v -> - if !vm_uuid <> None then - error (f_"-o vdsm: -oo vdsm-vm-uuid set more than once"); - vm_uuid := Some v; - | "vdsm-ovf-output", v -> - if !ovf_output <> None then - error (f_"-o vdsm: -oo vdsm-ovf-output set more than once"); - ovf_output := Some v; - | "vdsm-ovf-flavour", v -> - ovf_flavour := Create_ovf.ovf_flavour_of_string v - | "vdsm-image-uuid", v -> - List.push_front v image_uuids - | "vdsm-vol-uuid", v -> - List.push_front v vol_uuids - | k, _ -> - error (f_"-o vdsm: unknown output option ‘-oo %s’") k - ) options; - - let compat = !compat in - let image_uuids = List.rev !image_uuids in - let vol_uuids = List.rev !vol_uuids in - if image_uuids = [] || vol_uuids = [] then - error (f_"-o vdsm: either -oo vdsm-vol-uuid or -oo vdsm-vm-uuid was not specified"); - let vm_uuid = - match !vm_uuid with - | None -> - error (f_"-o vdsm: -oo vdsm-image-uuid was not specified") - | Some uuid -> uuid in - let ovf_output = Option.default "." !ovf_output in - let ovf_flavour = !ovf_flavour in - - { image_uuids; vol_uuids; vm_uuid; ovf_output; compat; ovf_flavour } - -class output_vdsm os vdsm_options output_alloc = -object - inherit output - - method as_options = - sprintf "-o vdsm -os %s%s%s -oo vdsm-vm-uuid=%s -oo vdsm-ovf-output=%s%s%s" os - (String.concat "" - (List.map (sprintf " -oo vdsm-image-uuid=%s") - vdsm_options.image_uuids)) - (String.concat "" - (List.map (sprintf " -oo vdsm-vol-uuid=%s") - vdsm_options.vol_uuids)) - vdsm_options.vm_uuid - vdsm_options.ovf_output - (match vdsm_options.compat with - | "0.10" -> "" (* currently this is the default, so don't print it *) - | s -> sprintf " -oo vdsm-compat=%s" s) - (match vdsm_options.ovf_flavour with - (* currently this is the default, so don't print it *) - | Create_ovf.RHVExportStorageDomain -> "" - | flav -> sprintf "-oo vdsm-ovf-flavour=%s" - (Create_ovf.ovf_flavour_to_string flav)) - - method supported_firmware = [ TargetBIOS; TargetUEFI ] - - (* RHV doesn't support serial consoles. This causes the conversion - * step to remove it. - *) - method keep_serial_console = false - - (* rhev-apt.exe will be installed (if available). *) - method install_rhev_apt = true - - (* Data Domain mountpoint. *) - val mutable dd_mp = "" - val mutable dd_uuid = "" - - (* This is called early on in the conversion and lets us choose the - * name of the target files that eventually get written by the main - * code. - * - * 'os' is the output storage domain (-os /rhv/data//) - * this is already mounted path. - *) - method prepare_targets _ overlays = - if List.length vdsm_options.image_uuids <> List.length overlays || - List.length vdsm_options.vol_uuids <> List.length overlays then - error (f_"the number of ‘-oo vdsm-image-uuid’ and ‘-oo vdsm-vol-uuid’ parameters passed on the command line has to match the number of guest disk images (for this guest: %d)") - (List.length overlays); - - let mp, uuid = - let fields = String.nsplit "/" os in (* ... "data-center" "UUID" *) - let fields = List.rev fields in (* "UUID" "data-center" ... *) - let fields = List.dropwhile ((=) "") fields in - match fields with - | uuid :: rest when String.length uuid = 36 -> - let mp = String.concat "/" (List.rev rest) in - mp, uuid - | _ -> - error (f_"vdsm: invalid -os parameter does not contain a valid UUID: %s") - os in - - dd_mp <- mp; - dd_uuid <- uuid; - debug "VDSM: DD mountpoint: %s\nVDSM: DD UUID: %s" dd_mp dd_uuid; - - (* Note that VDSM has to create all these directories. *) - let images_dir = dd_mp // dd_uuid // "images" in - List.iter ( - fun image_uuid -> - let d = images_dir // image_uuid in - if not (is_directory d) then - error (f_"image directory (%s) does not exist or is not a directory") - d - ) vdsm_options.image_uuids; - - (* Note that VDSM has to create this directory too. *) - if not (is_directory vdsm_options.ovf_output) then - error (f_"OVF (metadata) directory (%s) does not exist or is not a directory") - vdsm_options.ovf_output; - - debug "VDSM: OVF (metadata) directory: %s" vdsm_options.ovf_output; - - (* The final directory structure should look like this: - * ///images/ - * / # first disk (gen'd by main code) - * /.meta # first disk - * / # second disk - * /.meta # second disk - * / # etc - * /.meta # - *) - - (* Create the target filenames. *) - let targets = - List.map ( - fun ((_, ov), image_uuid, vol_uuid) -> - let target_file = images_dir // image_uuid // vol_uuid in - debug "VDSM: will export %s to %s" ov.ov_sd target_file; - TargetFile target_file - ) (List.combine3 overlays vdsm_options.image_uuids vdsm_options.vol_uuids) in - - (* Generate the .meta files associated with each volume. *) - let metas = - Create_ovf.create_meta_files output_alloc dd_uuid - vdsm_options.image_uuids overlays in - List.iter ( - fun (target_file, meta) -> - let target_file = - match target_file with - | TargetFile s -> s - | TargetURI _ -> assert false in - let meta_filename = target_file ^ ".meta" in - with_open_out meta_filename (fun chan -> output_string chan meta) - ) (List.combine targets metas); - - (* Return the list of target files. *) - targets - - method disk_create ?backingfile ?backingformat ?preallocation ?compat - ?clustersize path format size = - let g = open_guestfs ~identifier:"vdsm_disk_create" () in - (* For qcow2, override v2v-supplied compat option, because RHEL 6 - * nodes cannot handle qcow2 v3 (RHBZ#1145582, RHBZ#1400205). - *) - let compat = - if format <> "qcow2" then compat else Some vdsm_options.compat in - g#disk_create ?backingfile ?backingformat ?preallocation ?compat - ?clustersize path format size - - (* This is called after conversion to write the OVF metadata. *) - method create_metadata source targets _ guestcaps inspect target_firmware = - (* Create the metadata. *) - let ovf = Create_ovf.create_ovf source targets guestcaps inspect - target_firmware - output_alloc dd_uuid - vdsm_options.image_uuids - vdsm_options.vol_uuids - vdsm_options.vm_uuid - vdsm_options.ovf_flavour in - - (* Write it to the metadata file. *) - let file = vdsm_options.ovf_output // vdsm_options.vm_uuid ^ ".ovf" in - with_open_out file (fun chan -> DOM.doc_to_chan chan ovf) -end - -let output_vdsm = new output_vdsm -let () = Modules_list.register_output_module "vdsm" diff --git a/v2v/output_vdsm.mli b/v2v/output_vdsm.mli deleted file mode 100644 index ee19c6be1..000000000 --- a/v2v/output_vdsm.mli +++ /dev/null @@ -1,31 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** [-o vdsm] target. *) - -type vdsm_options -(** Miscellaneous extra command line parameters used by VDSM. *) - -val print_output_options : unit -> unit -val parse_output_options : (string * string) list -> vdsm_options -(** Print and parse vdsm -oo options. *) - -val output_vdsm : string -> vdsm_options -> Types.output_allocation -> Types.output -(** [output_vdsm os vdsm_options output_alloc] creates and - returns a new {!Types.output} object specialized for writing - output to Data Domains directly under VDSM control. *) diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml deleted file mode 100644 index a6dba8351..000000000 --- a/v2v/parse_libvirt_xml.ml +++ /dev/null @@ -1,545 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Printf - -open C_utils -open Std_utils -open Tools_utils -open Common_gettext.Gettext -open Xpath_helpers - -open Types -open Utils - -type parsed_disk = { - p_source_disk : source_disk; - p_source : parsed_source; -} -and parsed_source = -| P_source_dev of string -| P_source_file of string -| P_dont_rewrite - -(* Turn string like "hda" into controller slot number. See also - * common/utils/utils.c:guestfs_int_drive_index which this function calls. - *) -let get_drive_slot str offset = - let name = String.sub str offset (String.length str - offset) in - try Some (drive_index name) - with Invalid_argument _ -> - warning (f_"could not parse device name ‘%s’ from the source libvirt XML") str; - None - -let parse_libvirt_xml ?bandwidth ?conn xml = - debug "libvirt xml is:\n%s" xml; - - (* Create a default libvirt connection on request, to not open one - * in case there is no need to fetch more data (for example inspect - * the storage pools). - *) - let libvirt_conn = - lazy (Libvirt.Connect.connect ()) in - let get_conn () = - match conn with - | None -> Lazy.force libvirt_conn - | Some conn -> conn in - - let doc = Xml.parse_memory xml in - let xpathctx = Xml.xpath_new_context doc in - let xpath_string = xpath_string xpathctx - and xpath_int = xpath_int xpathctx - and xpath_int64 = xpath_int64 xpathctx in - - let hypervisor = - match xpath_string "/domain/@type" with - | None | Some "" -> - error (f_"in the libvirt XML metadata, is missing or empty") - | Some s -> source_hypervisor_of_string s in - let name = - match xpath_string "/domain/name/text()" with - | None | Some "" -> - error (f_"in the libvirt XML metadata, is missing or empty") - | Some s -> s in - let genid = - match xpath_string "/domain/genid/text()" with - | None | Some "" -> None - | Some _ as s -> s in - let memory = - Option.default (1024L *^ 1024L) (xpath_int64 "/domain/memory/text()") in - let memory = memory *^ 1024L in - - let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in - let cpu_model = xpath_string "/domain/cpu/model/text()" in - let cpu_sockets = xpath_int "/domain/cpu/topology/@sockets" in - let cpu_cores = xpath_int "/domain/cpu/topology/@cores" in - let cpu_threads = xpath_int "/domain/cpu/topology/@threads" in - - (* Get the field from the input XML. If not set then - * try calculating it from the node. If that's - * not set either, then assume 1 vCPU. - *) - let vcpu = xpath_int "/domain/vcpu/text()" in - let vcpu = - match vcpu, cpu_sockets, cpu_cores, cpu_threads with - | Some vcpu, _, _, _ -> vcpu - | None, None, None, None -> 1 - | None, _, _, _ -> - let sockets = Option.default 1 cpu_sockets - and cores = Option.default 1 cpu_cores - and threads = Option.default 1 cpu_threads in - sockets * cores * threads in - - let cpu_topology = - match cpu_sockets, cpu_cores, cpu_threads with - | Some sockets, Some cores, Some threads -> - Some { s_cpu_sockets = sockets; s_cpu_cores = cores; - s_cpu_threads = threads; } - | _, _, _ -> None in - - let features = - let nodes = xpath_get_nodes xpathctx "/domain/features/*" in - List.map Xml.node_name nodes in - - let display = - let obj = Xml.xpath_eval_expression xpathctx "/domain/devices/graphics" in - let nr_nodes = Xml.xpathobj_nr_nodes obj in - if nr_nodes < 1 then None - else ( - (* Ignore everything except the first device. *) - let node = Xml.xpathobj_node obj 0 in - Xml.xpathctx_set_current_context xpathctx node; - let keymap = xpath_string "@keymap" in - let password = xpath_string "@passwd" in - let listen = - let obj = Xml.xpath_eval_expression xpathctx "listen" in - let nr_nodes = Xml.xpathobj_nr_nodes obj in - if nr_nodes < 1 then ( - match xpath_string "@listen" with - | None -> LNoListen | Some a -> LAddress a - ) else ( - (* Use only the first configuration. *) - match xpath_string "listen[1]/@type" with - | None -> LNoListen - | Some "address" -> - (match xpath_string "listen[1]/@address" with - | None -> LNoListen - | Some a -> LAddress a - ) - | Some "network" -> - (match xpath_string "listen[1]/@network" with - | None -> LNoListen - | Some n -> LNetwork n - ) - | Some "socket" -> - (match xpath_string "listen[1]/@socket" with - | None -> LSocket None - | Some n -> LSocket (Some n) - ) - | Some "none" -> - LNone - | Some t -> - warning (f_" in the input libvirt XML was ignored") t; - LNoListen - ) in - let port = - match xpath_string "@autoport" with - | Some "no" -> - (match xpath_int "@port" with - | Some port when port > 0 -> Some port - | Some _ | None -> None) - | _ -> None in - match xpath_string "@type" with - | None -> None - | Some "vnc" -> - Some { s_display_type = VNC; - s_keymap = keymap; s_password = password; s_listen = listen; - s_port = port } - | Some "spice" -> - Some { s_display_type = Spice; - s_keymap = keymap; s_password = password; s_listen = listen; - s_port = port } - | Some ("sdl"|"desktop" as t) -> - warning (f_"virt-v2v does not support local displays, so in the input libvirt XML was ignored") t; - None - | Some t -> - warning (f_"display in the input libvirt XML was ignored") t; - None - ) in - - (* Video adapter. *) - let video = - let obj = Xml.xpath_eval_expression xpathctx "/domain/devices/video" in - let nr_nodes = Xml.xpathobj_nr_nodes obj in - if nr_nodes < 1 then None - else ( - (* Ignore everything except the first