[PATCH 0/6] v2v: Add drivers for virtio-rng, balloon, pvpanic.
by Richard W.M. Jones
Yaniv pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=1438794
that virt-v2v both doesn't install the virtio-rng driver for Windows,
and doesn't give the guest a virtio-rng PCI device either.
There are two problems here:
Firstly the Windows virtio-rng driver isn't included in the exploded
tree (/usr/share/virtio-win) so it doesn't get copied into the guest.
The solution is to prefer the virtio-win ISO over the exploded tree,
since the ISO contains the complete set. We had support for reading
the ISO for ages, so this just changes the default to search the ISO
first (patch 6/6).
Secondly we didn't model if the guest supports virtio-rng. If it does
support it, we should add a virtio-rng device in the output metadata.
Patch 1-5 add this modelling, and support for -o libvirt. I didn't
(yet?) add support for -o rhv, because I couldn't see from the oVirt
Engine source how to describe that in the OVF.
As part of the same set of changes, I also added support for
virtio-balloon and pvpanic, which work in basically the same way as
virtio-rng, so it was convenient to add all three at the same time.
Rich.
7 years, 7 months
[PATCH v5 0/7] Feature: Yara file scanning
by Matteo Cafasso
v5:
- rebase on top of 1.37.9
- add missing actions_yara.* files
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am | 4 +-
daemon/cleanups.c | 9 +
daemon/cleanups.h | 2 +
daemon/daemon.h | 3 +
daemon/upload.c | 70 +++----
daemon/yara.c | 301 +++++++++++++++++++++++++++++++
generator/Makefile.am | 3 +
generator/actions.ml | 6 +-
generator/actions_yara.ml | 79 ++++++++
generator/actions_yara.mli | 22 +++
generator/proc_nr.ml | 3 +
generator/structs.ml | 9 +
gobject/Makefile.inc | 8 +-
java/Makefile.inc | 1 +
java/com/redhat/et/libguestfs/.gitignore | 1 +
lib/MAX_PROC_NR | 2 +-
lib/Makefile.am | 1 +
lib/yara.c | 127 +++++++++++++
m4/guestfs_daemon.m4 | 14 ++
tests/yara/Makefile.am | 26 +++
tests/yara/test-yara-scan.sh | 72 ++++++++
23 files changed, 731 insertions(+), 37 deletions(-)
create mode 100644 daemon/yara.c
create mode 100644 generator/actions_yara.ml
create mode 100644 generator/actions_yara.mli
create mode 100644 lib/yara.c
create mode 100644 tests/yara/Makefile.am
create mode 100755 tests/yara/test-yara-scan.sh
--
2.11.0
7 years, 7 months
[PATCH] builder: Don't hard-code /etc for configuration files.
by Richard W.M. Jones
Use ./configure --sysconfdir setting.
---
builder/paths.ml | 2 +-
mllib/guestfs_config.ml.in | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/builder/paths.ml b/builder/paths.ml
index cbd9d4bd0..9ce8504a1 100644
--- a/builder/paths.ml
+++ b/builder/paths.ml
@@ -35,7 +35,7 @@ let xdg_config_home () =
let xdg_config_dirs () =
let dirs =
try Sys.getenv "XDG_CONFIG_DIRS"
- with Not_found -> "/etc/xdg" in
+ with Not_found -> Guestfs_config.sysconfdir ^ "/xdg" in
let dirs = String.nsplit ":" dirs in
let dirs = List.filter (fun x -> x <> "") dirs in
List.map (fun x -> x // prog) dirs
diff --git a/mllib/guestfs_config.ml.in b/mllib/guestfs_config.ml.in
index 68dbcbc20..15bebd582 100644
--- a/mllib/guestfs_config.ml.in
+++ b/mllib/guestfs_config.ml.in
@@ -22,5 +22,6 @@ let package_version = "@PACKAGE_VERSION@"
let package_version_full = "@PACKAGE_VERSION_FULL@"
let prefix = "@prefix@"
let datadir = prefix ^ "/share"
+let sysconfdir = "@sysconfdir@"
let host_cpu = "@host_cpu@"
let gnupg = "@GNUPG@"
--
2.12.0
7 years, 7 months
[PATCH v5 00/10] Introducing virt-builder-repository
by Cédric Bosdonnat
Hi all,
Here is the v5 of my patches series applying the latest comments
from Pino.
Cédric Bosdonnat (10):
lib/osinfo.c: Extract xml processing into a callback
lib: extract osinfo DB traversing API
mllib: ocaml wrapper for lib/osinfo
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
dib: move do_cp to mllib.Commun_utils
mllib: add do_mv helper function to Common_utils
mllib: add XPath helper xpath_get_nodes()
Add a virt-builder-repository tool
.gitignore | 4 +
builder/Makefile.am | 121 ++++-
builder/builder.ml | 2 +-
builder/index.mli | 3 +
builder/index_parser.ml | 74 +++-
builder/index_parser.mli | 8 +-
builder/index_parser_tests.ml | 129 ++++++
builder/repository_main.ml | 488 +++++++++++++++++++++
.../{test-virt-builder-docs.sh => test-docs.sh} | 2 +
builder/virt-builder-repository.pod | 183 ++++++++
dib/utils.ml | 4 -
lib/Makefile.am | 2 +
lib/osinfo-iso.c | 462 +++++++++++++++++++
lib/osinfo.c | 477 ++------------------
lib/osinfo.h | 27 ++
mllib/Makefile.am | 11 +-
mllib/common_utils.ml | 11 +
mllib/common_utils.mli | 6 +
mllib/osinfo-c.c | 102 +++++
mllib/osinfo.ml | 26 ++
mllib/osinfo.mli | 31 ++
mllib/xpath_helpers.ml | 9 +
mllib/xpath_helpers.mli | 4 +
23 files changed, 1727 insertions(+), 459 deletions(-)
create mode 100644 builder/index_parser_tests.ml
create mode 100644 builder/repository_main.ml
rename builder/{test-virt-builder-docs.sh => test-docs.sh} (93%)
create mode 100644 builder/virt-builder-repository.pod
create mode 100644 lib/osinfo-iso.c
create mode 100644 lib/osinfo.h
create mode 100644 mllib/osinfo-c.c
create mode 100644 mllib/osinfo.ml
create mode 100644 mllib/osinfo.mli
--
2.12.0
7 years, 7 months
[PATCH v4 0/7] Feature: Yara file scanning
by Matteo Cafasso
Rebase patches on top of 1.37.1.
No changes since last series.
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am | 4 +-
daemon/cleanups.c | 9 +
daemon/cleanups.h | 2 +
daemon/daemon.h | 3 +
daemon/upload.c | 70 +++----
daemon/yara.c | 301 +++++++++++++++++++++++++++++++
generator/Makefile.am | 3 +
generator/actions.ml | 6 +-
generator/proc_nr.ml | 3 +
generator/structs.ml | 9 +
gobject/Makefile.inc | 8 +-
java/Makefile.inc | 1 +
java/com/redhat/et/libguestfs/.gitignore | 1 +
lib/MAX_PROC_NR | 2 +-
lib/Makefile.am | 1 +
lib/yara.c | 127 +++++++++++++
m4/guestfs_daemon.m4 | 14 ++
tests/yara/Makefile.am | 26 +++
tests/yara/test-yara-scan.sh | 72 ++++++++
21 files changed, 630 insertions(+), 37 deletions(-)
create mode 100644 daemon/yara.c
create mode 100644 lib/yara.c
create mode 100644 tests/yara/Makefile.am
create mode 100755 tests/yara/test-yara-scan.sh
--
2.11.0
7 years, 7 months
[PATCH 0/1] fix virtio block driver installation for w10/w2k16
by Pavel Butsykin
This patch fixes the problem of the first boot after installation virtio block
drivers on Windows 10 / Server 2016. Apparently in w10/w2k16 was changed the
behavior of Windows-Kernel-Pnp where driver installation can now be done from
the kernel. But those records (ddb_regedits) which we write to the registry is
not enough for correct kernel-pnp installation:
>>> [Device Install (Hardware initiated) - PCI\VEN_1AF4&DEV_1004&SUBSYS_00081AF4&REV_00\3&13c0b0c5&0&18]
>>> Section start 2017/03/29 20:06:28.109
dvi: {Build Driver List} 20:06:28.203
dvi: Searching for hardware ID(s):
dvi: pci\ven_1af4&dev_1004&subsys_00081af4&rev_00
dvi: pci\ven_1af4&dev_1004&subsys_00081af4
dvi: pci\ven_1af4&dev_1004&cc_010000
dvi: pci\ven_1af4&dev_1004&cc_0100
dvi: Searching for compatible ID(s):
dvi: pci\ven_1af4&dev_1004&rev_00
dvi: pci\ven_1af4&dev_1004
dvi: pci\ven_1af4&cc_010000
dvi: pci\ven_1af4&cc_0100
dvi: pci\ven_1af4
dvi: pci\cc_010000
dvi: pci\cc_0100
dvi: {Build Driver List - exit(0x00000000)} 20:06:28.219
dvi: {DIF_SELECTBESTCOMPATDRV} 20:06:28.219
dvi: Default installer: Enter 20:06:28.219
dvi: {Select Best Driver}
! dvi: Selecting driver failed(0xe0000228)
dvi: {Select Best Driver - exit(0xe0000228)}
! dvi: Default installer: failed!
! dvi: Error 0xe0000228: There are no compatible drivers for this device.
dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 20:06:28.219
ndv: {Core Device Install} 20:06:28.219
ndv: {Install Device - PCI\VEN_1AF4&DEV_1004&SUBSYS_00081AF4&REV_00\3&13C0B0C5&0&18} 20:06:28.219
ndv: Parent device: ACPI\PNP0A03\1
dvi: {DIF_ALLOW_INSTALL} 20:06:28.219
dvi: Default installer: Enter 20:06:28.219
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 20:06:28.219
dvi: {DIF_REGISTER_COINSTALLERS} 20:06:28.234
dvi: Default installer: Enter 20:06:28.359
dvi: Default installer: Exit
dvi: {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 20:06:28.359
dvi: {DIF_INSTALLDEVICE} 20:06:28.359
dvi: Default installer: Enter 20:06:28.359
! dvi: Installing NULL driver!
dvi: Install Null Driver: Removing device sub-tree. 20:06:28.359
dvi: Install Null Driver: Removing device sub-tree completed. 20:06:28.625
dvi: Install Device: Removing device sub-tree. 20:06:28.625
dvi: Install Device: Removing device sub-tree completed. 20:06:28.891
! dvi: Device required reboot: Query remove failed (install) 0x13: CR_FAILURE.
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICE - exit(0x00000000)} 20:06:28.891
ndv: {Install Device - exit(0x00000000)} 20:06:28.891
ndv: {Core Device Install - exit(0xe0000203)} 20:06:28.891
<<< Section end 2017/03/29 20:06:28.906
<<< [Exit status: FAILURE(0xe0000203)]
As a result, the driver is installed as "Null Driver", this condition doesn't
allow to boot a second time(usually a reboot is required after adding new hardware)
and we will get 0x0000007B: INACCESSIBLE_BOOT_DEVICE.
However, for Windows-UserPnp our entries in the registry(ddb_regedits) is quite
enough, therefore if Windows-UserPnp manages to work out for virtio block device
before the reboot we were lucky and the next boot will be successful. But when
we have many new devices for which Windows-UserPnp also need to install drivers,
there is a very little chance that Windows-UserPnp will have time to install
drivers for disk before reboot. it looks like this:
...
sto: {DRIVERSTORE IMPORT END} 17:18:13.580
dvi: Flushed all driver package files to disk. Time = 313 ms
!!! sig: Failed to install catalog 'vioscsi.cat' as 'oem11.cat'. Error = 0x00000426
sto: {DRIVERSTORE IMPORT END: exit(0x00000426)} 17:18:14.033
sto: Flushed driver database node 'SYSTEM'. Time = 172 ms
sto: Rolled back driver package publishing.
sto: Rolled back driver package registration.
sto: Rolled back driver package import.
!!! sto: Failed to import driver package into Driver Store. Error = 0x00000426
sto: {Stage Driver Package: exit(0x00000426)} 17:18:14.267
sto: {Setup Import Driver Package - exit (0x00000426)} 17:18:14.408
!!! ndv: Driver package import failed for device.
!!! ndv: Error 1062: The service has not been started.
ndv: Installing NULL driver.
<<< Section end 2017/03/29 17:18:15.095
<<< [Exit status: FAILURE(0x00000426)]
(The service was started, but then stopped because of the reboot).
Here Windows-UserPnp driver installation is interrupted by reboot
"winlogon.exe (WIN-SR0JQJLUQQU) has initiated the restart of computer
WIN-9UQ6UAVOUQR onbehalf of user NT AUTHORITY\SYSTEM for the following reason:
Operating System: Upgrade (Planned))."
The solution is quite simple need to add a field "Version" to
HKLM/SYSTEM/DriverDatabase/DriverPackages/drv_inf_label then Windows-Kernel-Pnp
will be able to correctly install the virtio block driver.
Pavel Butsykin (1):
v2v: windows convert: fix virtio block driver installation for
w10/w2k16
v2v/windows_virtio.ml | 7 +++++++
1 file changed, 7 insertions(+)
--
2.11.0
7 years, 7 months