Libguestfs
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- 4 participants
- 7463 discussions
I am trying to convert vmware guests in preparation for a uploading the image to glance for use in openstack
Environmental Details:
vmware vsphere 5.5
tried converting machines on two different esxi hosts but encountered the same issue
all vm's are ubuntu LTS >= 12.04
happens with LVM and non LVM machines
output of virt-v2v --version
virt-v2v 1.36.5fedora=26,release=1.fc26,libvirt
output of libvirtd --version
libvirtd (libvirt) 3.2.1
virt-v2v and libvirt were installed from yum
/var/tmp/v2vovl*.qcow2 files never grow beyond 196K
I assume never, I let it run for about an hour during with the following processes show 0.0% cpu utilization
qemu-system-x86
libvirtd
virt-v2v
It may be worth noting that doing a direct image conversion completes successfully
virt-v2v -i disk /mnt/vmware/Axia-DEV/Axia-DEV-flat.vmdk -o glance -on Axia-DEV
Debug Output
[fedora@virt-v2v-fedora ~]$ virt-v2v -ic vpx://AXIA-EFT%5cstanner@192.168.28.9/Axia/galleon.axia-eft.local/?no_verify=1 "Axia-DEV" -o glance -on Axia-DEV
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x17bf770, program = virt-v2v
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x17bfb60, program = virt-v2v
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x17c3460, program = virt-v2v
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
[ 0.0] Opening the source -i libvirt -ic vpx://AXIA-EFT%5cstanner@192.168.28.9/Axia/galleon.axia-eft.local/?no_verify=1 Axia-DEV
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x17c2f80, program = virt-v2v
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
Enter AXIA-EFT\stanner's password for 192.168.28.9:
Enter host password for user 'AXIA-EFT\stanner':
[ 17.6] Creating an overlay to protect the source from being modified
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x18c4da0, program = virt-v2v
libguestfs: trace: disk_has_backing_file "/var/tmp/v2vovl6b4221.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/5
libguestfs: parse_json: qemu-img info JSON output:\n{\n "backing-filename-format": "raw",\n "virtual-size": 42949672960,\n "filename": "/dev/fd/5",\n "cluster-size": 65536,\n "format": "qcow2",\n "actual-size": 200704,\n "format-specific": {\n "type": "qcow2",\n "data": {\n "compat": "1.1",\n "lazy-refcounts": false,\n "refcount-bits": 16,\n "corrupt": false\n }\n },\n "full-backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV-flat.vmdk?dcPath=Axia&dsName=…", \"file.timeout\": 2000 }",\n "backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV-flat.vmdk?dcPath=Axia&dsName=…", \"file.timeout\": 2000 }",\n "dirty-flag": false\n}\n\n
libguestfs: trace: disk_has_backing_file = 1
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x18c62d0, program = virt-v2v
libguestfs: trace: disk_virtual_size "/var/tmp/v2vovl6b4221.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/5
libguestfs: parse_json: qemu-img info JSON output:\n{\n "backing-filename-format": "raw",\n "virtual-size": 42949672960,\n "filename": "/dev/fd/5",\n "cluster-size": 65536,\n "format": "qcow2",\n "actual-size": 200704,\n "format-specific": {\n "type": "qcow2",\n "data": {\n "compat": "1.1",\n "lazy-refcounts": false,\n "refcount-bits": 16,\n "corrupt": false\n }\n },\n "full-backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV-flat.vmdk?dcPath=Axia&dsName=…", \"file.timeout\": 2000 }",\n "backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV-flat.vmdk?dcPath=Axia&dsName=…", \"file.timeout\": 2000 }",\n "dirty-flag": false\n}\n\n
libguestfs: trace: disk_virtual_size = 42949672960
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x18c66c0, program = virt-v2v
libguestfs: trace: disk_has_backing_file "/var/tmp/v2vovld9a225.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/5
libguestfs: parse_json: qemu-img info JSON output:\n{\n "backing-filename-format": "raw",\n "virtual-size": 12884901888,\n "filename": "/dev/fd/5",\n "cluster-size": 65536,\n "format": "qcow2",\n "actual-size": 200704,\n "format-specific": {\n "type": "qcow2",\n "data": {\n "compat": "1.1",\n "lazy-refcounts": false,\n "refcount-bits": 16,\n "corrupt": false\n }\n },\n "full-backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV%5f1-flat.vmdk?dcPath=Axia&dsN…", \"file.timeout\": 2000 }",\n "backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV%5f1-flat.vmdk?dcPath=Axia&dsN…", \"file.timeout\": 2000 }",\n "dirty-flag": false\n}\n\n
libguestfs: trace: disk_has_backing_file = 1
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x18c6a90, program = virt-v2v
libguestfs: trace: disk_virtual_size "/var/tmp/v2vovld9a225.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/5
libguestfs: parse_json: qemu-img info JSON output:\n{\n "backing-filename-format": "raw",\n "virtual-size": 12884901888,\n "filename": "/dev/fd/5",\n "cluster-size": 65536,\n "format": "qcow2",\n "actual-size": 200704,\n "format-specific": {\n "type": "qcow2",\n "data": {\n "compat": "1.1",\n "lazy-refcounts": false,\n "refcount-bits": 16,\n "corrupt": false\n }\n },\n "full-backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV%5f1-flat.vmdk?dcPath=Axia&dsN…", \"file.timeout\": 2000 }",\n "backing-filename": "json: { \"file.cookie\": \"vmware_soap_session=\\\"5289dca7-6ebb-99ae-8130-426365c71d50\\\"\", \"file.sslverify\": \"off\", \"file.driver\": \"https\", \"file.url\": \"https://192.168.28.9/folder/Axia-DEV/Axia-DEV%5f1-flat.vmdk?dcPath=Axia&dsN…", \"file.timeout\": 2000 }",\n "dirty-flag": false\n}\n\n
libguestfs: trace: disk_virtual_size = 12884901888
[ 18.6] Initializing the target -o glance
[ 23.0] Opening the overlay
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x189ef40, program = virt-v2v
libguestfs: trace: set_identifier "v2v"
libguestfs: trace: v2v: set_identifier = 0
libguestfs: trace: v2v: get_memsize
libguestfs: trace: v2v: get_memsize = 500
libguestfs: trace: v2v: set_memsize 2000
libguestfs: trace: v2v: set_memsize = 0
libguestfs: trace: v2v: set_network true
libguestfs: trace: v2v: set_network = 0
libguestfs: trace: v2v: add_drive "/var/tmp/v2vovl6b4221.qcow2" "format:qcow2" "cachemode:unsafe" "discard:besteffort" "copyonread:true"
libguestfs: trace: v2v: add_drive = 0
libguestfs: trace: v2v: add_drive "/var/tmp/v2vovld9a225.qcow2" "format:qcow2" "cachemode:unsafe" "discard:besteffort" "copyonread:true"
libguestfs: trace: v2v: add_drive = 0
libguestfs: trace: v2v: launch
libguestfs: trace: v2v: get_tmpdir
libguestfs: trace: v2v: get_tmpdir = "/tmp"
libguestfs: trace: v2v: version
libguestfs: trace: v2v: version = <struct guestfs_version = major: 1, minor: 36, release: 5, extra: fedora=26,release=1.fc26,libvirt, >
libguestfs: trace: v2v: get_backend
libguestfs: trace: v2v: get_backend = "libvirt"
libguestfs: launch: program=virt-v2v
libguestfs: launch: identifier=v2v
libguestfs: launch: version=1.36.5fedora=26,release=1.fc26,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfs31KAuI
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
libguestfs: libvirt version = 3002001 (3.2.1)
libguestfs: guest random name = guestfs-8h2157ddlkwvgurn
libguestfs: connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///session, auth = default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x17da530
libguestfs: qemu version (reported by libvirt) = 2009000 (2.9.0)
libguestfs: get libvirt capabilities
libguestfs: parsing capabilities XML
libguestfs: trace: v2v: get_backend_setting "force_tcg"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting "internal_libvirt_label"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting "internal_libvirt_imagelabel"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting "internal_libvirt_norelabel_disks"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: trace: v2v: get_backend_setting "network_bridge"
libguestfs: trace: v2v: get_backend_setting = NULL (error)
libguestfs: build appliance
libguestfs: trace: v2v: get_cachedir
libguestfs: trace: v2v: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.1.18
supermin: rpm: detected RPM version 4.13
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: trace: v2v: disk_create "/tmp/libguestfs31KAuI/overlay1" "qcow2" -1 "backingfile:/var/tmp/.guestfs-1000/appliance.d/root" "backingformat:raw"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/var/tmp/.guestfs-1000/appliance.d/root,backing_fmt=raw
libguestfs: command: run: \ /tmp/libguestfs31KAuI/overlay1
Formatting '/tmp/libguestfs31KAuI/overlay1', fmt=qcow2 size=4294967296 backing_file=/var/tmp/.guestfs-1000/appliance.d/root backing_fmt=raw encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
libguestfs: trace: v2v: disk_create = 0
libguestfs: trace: v2v: get_sockdir
libguestfs: trace: v2v: get_sockdir = "/run/user/1000"
libguestfs: create libvirt XML
libguestfs: trace: v2v: get_cachedir
libguestfs: trace: v2v: get_cachedir = "/var/tmp"
libguestfs: libvirt XML:\n<?xml version="1.0"?>\n<domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">\n <name>guestfs-8h2157ddlkwvgurn</name>\n <memory unit="MiB">2000</memory>\n <currentMemory unit="MiB">2000</currentMemory>\n <cpu mode="host-passthrough">\n <model fallback="allow"/>\n </cpu>\n <vcpu>1</vcpu>\n <clock offset="utc">\n <timer name="rtc" tickpolicy="catchup"/>\n <timer name="pit" tickpolicy="delay"/>\n <timer name="hpet" present="no"/>\n </clock>\n <os>\n <type>hvm</type>\n <kernel>/var/tmp/.guestfs-1000/appliance.d/kernel</kernel>\n <initrd>/var/tmp/.guestfs-1000/appliance.d/initrd</initrd>\n <cmdline>panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v</cmdline>\n <bios useserial="yes"/>\n </os>\n <on_reboot>destroy</on_reboot>\n <devices>\n <rng model="virtio">\n <backend model="random">/dev/urandom</backend>\n </rng>\n <controller type="scsi" index="0" model="virtio-scsi"/>\n <disk device="disk" type="file">\n <source file="/var/tmp/v2vovl6b4221.qcow2"/>\n <target dev="sda" bus="scsi"/>\n <driver name="qemu" type="qcow2" cache="unsafe" discard="unmap"/>\n <address type="drive" controller="0" bus="0" target="0" unit="0"/>\n </disk>\n <disk device="disk" type="file">\n <source file="/var/tmp/v2vovld9a225.qcow2"/>\n <target dev="sdb" bus="scsi"/>\n <driver name="qemu" type="qcow2" cache="unsafe" discard="unmap"/>\n <address type="drive" controller="0" bus="0" target="1" unit="0"/>\n </disk>\n <disk type="file" device="disk">\n <source file="/tmp/libguestfs31KAuI/overlay1"/>\n <target dev="sdc" bus="scsi"/>\n <driver name="qemu" type="qcow2" cache="unsafe"/>\n <address type="drive" controller="0" bus="0" target="2" unit="0"/>\n <shareable/>\n </disk>\n <serial type="unix">\n <source mode="connect" path="/run/user/1000/libguestfsrSgHCr/console.sock"/>\n <target port="0"/>\n </serial>\n <channel type="unix">\n <source mode="connect" path="/run/user/1000/libguestfsrSgHCr/guestfsd.sock"/>\n <target type="virtio" name="org.libguestfs.channel.0"/>\n </channel>\n <interface type="bridge">\n <source bridge="virbr0"/>\n <model type="virtio"/>\n </interface>\n <controller type="usb" model="none"/>\n <memballoon model="none"/>\n </devices>\n <qemu:commandline>\n <qemu:env name="TMPDIR" value="/var/tmp"/>\n </qemu:commandline>\n</domain>\n
libguestfs: trace: v2v: get_cachedir
libguestfs: trace: v2v: get_cachedir = "/var/tmp"
libguestfs: command: run: ls
libguestfs: command: run: \ -a
libguestfs: command: run: \ -l
libguestfs: command: run: \ -R
libguestfs: command: run: \ -Z /var/tmp/.guestfs-1000
libguestfs: /var/tmp/.guestfs-1000:
libguestfs: total 12
libguestfs: drwxr-xr-x. 3 fedora fedora unconfined_u:object_r:user_tmp_t:s0 4096 Sep 8 17:29 .
libguestfs: drwxrwxrwt. 13 root root system_u:object_r:tmp_t:s0 4096 Sep 8 17:29 ..
libguestfs: drwxr-xr-x. 2 fedora fedora unconfined_u:object_r:user_tmp_t:s0 4096 Sep 8 15:12 appliance.d
libguestfs: -rw-r--r--. 1 fedora fedora unconfined_u:object_r:user_tmp_t:s0 0 Sep 8 15:11 lock
libguestfs:
libguestfs: /var/tmp/.guestfs-1000/appliance.d:
libguestfs: total 217316
libguestfs: drwxr-xr-x. 2 fedora fedora unconfined_u:object_r:user_tmp_t:s0 4096 Sep 8 15:12 .
libguestfs: drwxr-xr-x. 3 fedora fedora unconfined_u:object_r:user_tmp_t:s0 4096 Sep 8 17:29 ..
libguestfs: -rw-r--r--. 1 fedora fedora system_u:object_r:virt_content_t:s0 546304 Sep 8 17:29 initrd
libguestfs: -rwxr-xr-x. 1 fedora fedora system_u:object_r:virt_content_t:s0 7295064 Sep 8 17:29 kernel
libguestfs: -rw-r--r--. 1 fedora fedora system_u:object_r:virt_content_t:s0 4294967296 Sep 8 17:29 root
libguestfs: command: run: ls
libguestfs: command: run: \ -a
libguestfs: command: run: \ -l
libguestfs: command: run: \ -Z /run/user/1000/libguestfsrSgHCr
libguestfs: total 0
libguestfs: drwx------. 2 fedora fedora unconfined_u:object_r:user_tmp_t:s0 80 Sep 8 17:29 .
libguestfs: drwx------. 10 fedora fedora system_u:object_r:user_tmp_t:s0 220 Sep 8 17:29 ..
libguestfs: srwxrwxr-x. 1 fedora fedora unconfined_u:object_r:user_tmp_t:s0 0 Sep 8 17:29 console.sock
libguestfs: srwxrwxr-x. 1 fedora fedora unconfined_u:object_r:user_tmp_t:s0 0 Sep 8 17:29 guestfsd.sock
libguestfs: launch libvirt guest
\x1b[1;256r\x1b[25libguestfs: responding to serial console Device Status Report
6;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 02/12/17
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@) Sun Feb 12 00:43:05 UTC 2017
Term: 80x24
4 0
SeaBIOS (version 1.10.2-1.fc26)
Machine UUID 79b50ad0-9c08-4139-976d-81bf0e610331
iPXE (http://ipxe.org) 00:02.0 C100 PCI2.10 PnP PMM+7CF92300+7CED2300 C100
Booting from ROM...
\x1b[2J[ 0.000000] Linux version 4.11.8-300.fc26.x86_64 (mockbuild(a)bkernel02.phx2.fedoraproject.org) (gcc version 7.1.1 20170622 (Red Hat 7.1.1-3) (GCC) ) #1 SMP Thu Jun 29 20:09:48 UTC 2017
[ 0.000000] Command line: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000007cffdfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000007cffe000-0x000000007cffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014
[ 0.000000] Hypervisor detected: KVM
[ 0.000000] e820: last_pfn = 0x7cffe max_arch_pfn = 0x400000000
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT
[ 0.000000] found SMP MP-table at [mem 0x000f6c10-0x000f6c1f] mapped at [ffff977c800f6c10]
[ 0.000000] RAMDISK: [mem 0x7cf6a000-0x7cfeffff]
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI BIOS Error (bug): A valid RSDP was not found (20170119/tbxfroot-244)
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000007cffdfff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x7cf3f000-0x7cf69fff]
[ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[ 0.000000] kvm-clock: cpu 0, msr 0:7cebf001, primary cpu clock
[ 0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x000000007cffdfff]
[ 0.000000] Normal empty
[ 0.000000] Device empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x000000007cffdfff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000007cffdfff]
[ 0.000000] SFI: Simple Firmware Interface v0.81 http://simplefirmware.org
[ 0.000000] Intel MultiProcessor Specification v1.4
[ 0.000000] MPTABLE: OEM ID: BOCHSCPU
[ 0.000000] MPTABLE: Product ID: 0.1
[ 0.000000] MPTABLE: APIC at: 0xFEE00000
[ 0.000000] Processor #0 (Bootup-CPU)
[ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[ 0.000000] Processors: 1
[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[ 0.000000] e820: [mem 0x7d000000-0xfeffbfff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on KVM
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.000000] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] percpu: Embedded 36 pages/cpu @ffff977cfcc00000 s108888 r8192 d30376 u2097152
[ 0.000000] KVM setup async PF for cpu 0
[ 0.000000] kvm-stealtime: cpu 0, msr 7cc0d900
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 503879
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Memory: 1993292K/2047600K available (8688K kernel code, 1668K rwdata, 3604K rodata, 2120K init, 1816K bss, 54308K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.001000] Hierarchical RCU implementation.
[ 0.001000] \tBuild-time adjustment of leaf fanout to 64.
[ 0.001000] \tRCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=1.
[ 0.001000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=1
[ 0.001000] NR_IRQS:524544 nr_irqs:256 16
[ 0.001000] \tOffload RCU callbacks from all CPUs
[ 0.001000] \tOffload RCU callbacks from CPUs: 0.
[ 0.001000] Console: colour *CGA 80x25
[ 0.001000] console [ttyS0] enabled
[ 0.001046] tsc: Detected 2000.034 MHz processor
[ 0.003076] Calibrating delay loop (skipped) preset value.. 4000.06 BogoMIPS (lpj=2000034)
[ 0.005039] pid_max: default: 32768 minimum: 301
[ 0.007112] Security Framework initialized
[ 0.009042] Yama: becoming mindful.
[ 0.011044] SELinux: Disabled at boot.
[ 0.013241] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.016284] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.018329] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.020043] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.022643] Disabling memory control group subsystem
[ 0.025573] CPU: Physical Processor ID: 0
[ 0.028443] mce: CPU supports 10 MCE banks
[ 0.032102] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.034038] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.049354] Freeing SMP alternatives memory: 32K
[ 0.052692] ftrace: allocating 31978 entries in 125 pages
[ 0.066104] smpboot: Max logical packages: 1
[ 0.073533] x2apic enabled
[ 0.074067] Switched APIC routing to physical x2apic.
[ 0.100000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.100000] smpboot: CPU0: Intel(R) Xeon(R) CPU E5-2640 v2 @ 2.00GHz (family: 0x6, model: 0x3e, stepping: 0x4)
[ 0.100125] Performance Events: IvyBridge events, Intel PMU driver.
[ 0.101085] ... version: 2
[ 0.102044] ... bit width: 48
[ 0.103045] ... generic registers: 4
[ 0.104044] ... value mask: 0000ffffffffffff
[ 0.105044] ... max period: 000000007fffffff
[ 0.106079] ... fixed-purpose events: 3
[ 0.107071] ... event mask: 000000070000000f
[ 0.108916] smp: Bringing up secondary CPUs ...
[ 0.109049] smp: Brought up 1 node, 1 CPU
[ 0.110050] smpboot: Total of 1 processors activated (4000.06 BogoMIPS)
[ 0.114259] devtmpfs: initialized
[ 0.115099] x86/mm: Memory block size: 128MB
[ 0.118905] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 0.119053] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.120103] pinctrl core: initialized pinctrl subsystem
[ 0.122044] RTC time: 17:29:33, date: 09/08/17
[ 0.123207] NET: Registered protocol family 16
[ 0.124368] cpuidle: using governor menu
[ 0.126165] PCI: Using configuration type 1 for base access
[ 0.127219] core: PMU erratum BJ122, BV98, HSD29 workaround disabled, HT off
[ 0.129460] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.130374] ACPI: Interpreter disabled.
[ 0.131095] vgaarb: loaded
[ 0.132145] SCSI subsystem initialized
[ 0.133111] usbcore: USB support disabled
[ 0.134154] PCI: Probing PCI hardware
[ 0.135076] PCI host bridge to bus 0000:00
[ 0.136053] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.137052] pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffffff]
[ 0.138046] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.163937] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.164047] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.165050] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.166046] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.256961] pci 0000:00:01.0: PIIX/ICH IRQ router [8086:7000]
[ 0.258902] NetLabel: Initializing
[ 0.259045] NetLabel: domain hash size = 128
[ 0.260044] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.261073] NetLabel: unlabeled traffic allowed by default
[ 0.262308] clocksource: Switched to clocksource kvm-clock
[ 0.287467] VFS: Disk quotas dquot_6.6.0
[ 0.293800] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.304437] pnp: PnP ACPI: disabled
[ 0.311411] NET: Registered protocol family 2
[ 0.318502] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.329787] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[ 0.340146] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.350315] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.359754] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.369705] NET: Registered protocol family 1
[ 0.376559] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.385931] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.395043] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.405409] Unpacking initramfs...
[ 0.411542] Freeing initrd memory: 536K
[ 0.417881] platform rtc_cmos: registered platform RTC device (no PNP device found)
[ 0.429848] alg: self-tests disabled
[ 0.435759] audit: initializing netlink subsys (disabled)
[ 0.444868] Initialise system trusted keyrings
[ 0.451929] workingset: timestamp_bits=36 max_order=19 bucket_order=0
[ 0.461870] audit: type=2000 audit(1504891773.475:1): state=initialized audit_enabled=0 res=1
[ 0.477292] zbud: loaded
[ 0.483329] NET: Registered protocol family 38
[ 0.490331] Key type asymmetric registered
[ 0.496750] Asymmetric key parser 'x509' registered
[ 0.504405] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.515840] io scheduler noop registered
[ 0.522120] io scheduler deadline registered
[ 0.528847] io scheduler cfq registered (default)
[ 0.536211] io scheduler mq-deadline registered
[ 0.543379] atomic64_test: passed for x86-64 platform with CX8 and with SSE
[ 0.554291] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 0.607528] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 0.619856] Non-volatile memory driver v1.3
[ 0.626528] Linux agpgart interface v0.103
[ 0.637829] scsi host0: ata_piix
[ 0.643221] scsi host1: ata_piix
[ 0.648478] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0c0 irq 14
[ 0.659114] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0c8 irq 15
[ 0.669720] libphy: Fixed MDIO Bus: probed
[ 0.676270] usbserial: usb_serial_init - usb_register failed
[ 0.685067] usbserial: usb_serial_init - returning with error -19
[ 0.694506] i8042: PNP: No PS/2 controller found.
[ 0.701921] i8042: Probing ports directly.
[ 0.717142] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 0.724884] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 0.732782] mousedev: PS/2 mouse device common for all mice
[ 0.743862] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[ 0.761801] input: VirtualPS/2 VMware VMMouse as /devices/platform/i8042/serio1/input/input3
[ 0.778437] input: VirtualPS/2 VMware VMMouse as /devices/platform/i8042/serio1/input/input2
[ 0.795570] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
[ 0.806713] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram
[ 0.822706] device-mapper: uevent: version 1.0.3
[ 0.830154] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel(a)redhat.com
[ 0.843343] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.852122] drop_monitor: Initializing network drop monitor service
[ 0.861944] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 0.870216] Initializing XFRM netlink socket
[ 0.877172] NET: Registered protocol family 10
[ 0.884780] Segment Routing with IPv6
[ 0.890624] mip6: Mobile IPv6
[ 0.895507] NET: Registered protocol family 17
[ 0.903255] AVX version of gcm_enc/dec engaged.
[ 0.910372] AES CTR mode by8 optimization enabled
[ 0.918228] registered taskstats version 1
[ 0.924720] Loading compiled-in X.509 certificates
[ 0.933508] Loaded X.509 cert 'Fedora kernel signing key: a97d6306ae6a6507bdc5a7857746bd9b5938a8b2'
[ 0.947700] zswap: loaded using pool lzo/zbud
[ 0.966514] Key type big_key registered
[ 0.972753] Key type encrypted registered
[ 0.988137] Magic number: 1:349:491
[ 0.995256] rtc_cmos rtc_cmos: setting system clock to 2017-09-08 17:29:34 UTC (1504891774)
[ 1.013849] Freeing unused kernel memory: 2120K
[ 1.020993] Write protecting the kernel read-only data: 14336k
[ 1.030840] Freeing unused kernel memory: 1536K
[ 1.039488] Freeing unused kernel memory: 492K
[ 1.048991] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 1.058948] rodata_test: all tests were successful
supermin: mounting /proc
supermin: ext2 mini initrd starting up: 5.1.18 dietlibc
supermin: cmdline: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v
supermin: uptime: 1.10 0.03
supermin: mounting /sys
supermin: internal insmod crc32-pclmul.ko
supermin: internal insmod crc32c-intel.ko
supermin: internal insmod crct10dif-pclmul.ko
supermin: internal insmod crc32_generic.ko
supermin: internal insmod nfit.ko
insmod: init_module: nfit.ko: No such device
supermin: internal insmod virtio.ko
supermin: internal insmod virtio_ring.ko
supermin: internal insmod virtio_blk.ko
[ 1.184884] random: fast init done
supermin: internal insmod virtio-rng.ko
supermin: internal insmod virtio_console.ko
supermin: internal insmod crypto_engine.ko
supermin: internal insmod virtio_crypto.ko
supermin: internal insmod virtio_net.ko
supermin: internal insmod nd_btt.ko
supermin: internal insmod nd_pmem.ko
supermin: internal insmod virtio_scsi.ko
supermin: internal insmod virtio_balloon.ko
supermin: internal insmod virtio_input.ko
supermin: internal insmod virtio_mmio.ko
supermin: internal insmod virtio_pci.ko
[ 1.291935] virtio-pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 10
[ 1.327489] virtio-pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 11
[ 1.359512] scsi host2: Virtio SCSI HBA
[ 1.366760] virtio-pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 11
[ 1.387118] scsi 2:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 1.430845] scsi 2:0:1:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 1.443504] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1cd44e5d440, max_idle_ns: 440795218083 ns
[ 1.493791] scsi 2:0:2:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 1.532826] virtio-pci 0000:00:05.0: PCI->APIC IRQ transform: INT A -> IRQ 10
[ 1.561197] random: crng init done
[ 1.613227] sd 2:0:0:0: Attached scsi generic sg0 type 0
[ 1.622594] sd 2:0:0:0: [sda] 83886080 512-byte logical blocks: (42.9 GB/40.0 GiB)
[ 1.634440] sd 2:0:1:0: Attached scsi generic sg1 type 0
[ 1.642938] sd 2:0:0:0: [sda] Write Protect is off
[ 1.650610] sd 2:0:1:0: [sdb] 25165824 512-byte logical blocks: (12.9 GB/12.0 GiB)
[ 1.662477] sd 2:0:1:0: [sdb] Write Protect is off
[ 1.670187] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.684170] sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.699240] sd 2:0:2:0: Attached scsi generic sg2 type 0
[ 1.715928] sd 2:0:2:0: [sdc] 8388608 512-byte logical blocks: (4.29 GB/4.00 GiB)
[ 1.727370] sd 2:0:2:0: [sdc] Write Protect is off
[ 1.735100] sd 2:0:2:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.755559] sd 2:0:2:0: [sdc] Attached SCSI disk
[ 2.005978] sdb: sdb1
[ 2.014127] sd 2:0:1:0: [sdb] Attached SCSI disk
[ 2.363315] sda: sda1 sda2 < sda5 >
[ 2.373152] sd 2:0:0:0: [sda] Attached SCSI disk
supermin: internal insmod crc-itu-t.ko
supermin: internal insmod crc7.ko
supermin: internal insmod crc8.ko
supermin: internal insmod libcrc32c.ko
supermin: picked /sys/block/sdc/dev (8:32) as root device
supermin: creating /dev/root as block special 8:32
supermin: mounting new root on /root
[ 2.436182] EXT4-fs (sdc): mounting ext2 file system using the ext4 subsystem
[ 2.454444] EXT4-fs (sdc): mounted filesystem without journal. Opts:
supermin: deleting initramfs files
supermin: chroot
Starting /init script ...
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v == *guestfs_network=1* ]]
+ guestfs_network=1
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v == *guestfs_rescue=1* ]]
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v == *guestfs_noreboot=1* ]]
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v == *guestfs_boot_analysis=1* ]]
+ '[' '!' -d /sys ']'
+ mkdir -p /sys
+ mount -t sysfs /sys /sys
+ mkdir -p /run
+ mount -t tmpfs -o nosuid,size=20%,mode=0755 tmpfs /run
+ mkdir -p /run/lock
+ ln -s ../run/lock /var/lock
+ test -e /etc/mtab
+ ln -s /proc/mounts /etc/mtab
+ mount -t devtmpfs /dev /dev
+ mkdir -p /dev/pts
+ mount -t devpts /dev/pts /dev/pts
+ [[ panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v == *selinux=1* ]]
+ mkdir -p /run/tmpfiles.d
+ kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
++ od -x -A n
++ dd if=/dev/urandom bs=16 count=1 status=none
+ machine_id=' e181 aa53 961c 8b16 326e 173d 782d e914'
+ echo e181aa53961c8b16326e173d782de914
+ systemd-tmpfiles --prefix=/dev --prefix=/run --prefix=/var/run --create --boot
[/usr/lib/tmpfiles.d/systemd.conf:11] Unknown group 'utmp'.
[/usr/lib/tmpfiles.d/systemd.conf:19] Unknown user 'systemd-network'.
[/usr/lib/tmpfiles.d/systemd.conf:20] Unknown user 'systemd-network'.
[/usr/lib/tmpfiles.d/systemd.conf:21] Unknown user 'systemd-network'.
[/usr/lib/tmpfiles.d/systemd.conf:25] Unknown group 'systemd-journal'.
[/usr/lib/tmpfiles.d/systemd.conf:26] Unknown group 'systemd-journal'.
+ for f in /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd /sbin/udevd /lib/udev/udevd /usr/lib/udev/udevd
+ '[' -x /lib/systemd/systemd-udevd ']'
+ UDEVD=/lib/systemd/systemd-udevd
+ break
+ '[' -z /lib/systemd/systemd-udevd ']'
+ /lib/systemd/systemd-udevd --daemon
starting version 233
+ udevadm trigger
+ udevadm settle --timeout=600
[ 3.445833] EDAC MC: Ver: 3.0.0
[ 3.459209] EDAC sbridge: Ver: 1.1.1
2
7
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
by Richard W.M. Jones 12 Sep '17
by Richard W.M. Jones 12 Sep '17
12 Sep '17
Patches 1-4 are almost the same as they are when previously posted
here:
https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html
Patch 5 actually uses the mandatory locking test to turn off locking
in the narrow case where a drive is opened readonly, and then only for
the drive being inspected.
Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’).
Rich.
2
13
12 Sep '17
Incomplete fix for https://bugzilla.redhat.com/show_bug.cgi?id=1417306
The full fix is waiting for a libvirt change, but this can still go
upstream.
Rich.
3
6
The patch I posted last week to disable mandatory locking for readonly
drives
(https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html)
was wrong in a couple of respects. Firstly it didn't work, which I
didn't detect because my tests were testing the wrong thing. Oops.
Secondly it used a simple version number check to detect qemu binaries
implementing mandatory locking.
This patch series addresses the second issue. It refactors the code
which tests qemu features to make it more manageable. Then it
implements QMP testing, and finally it adds a slightly braindead (but
working) test for whether the qemu binary implements mandatory locking
based on features of the binary and not version numbers.
I tested this against several qemu binaries with and without locking
and it worked for me in all cases.
Rich.
1
4
[PATCH] lib: command: Print command before running it with guestfs_int_cmd_pipe_run.
by Richard W.M. Jones 11 Sep '17
by Richard W.M. Jones 11 Sep '17
11 Sep '17
Unlike ordinary guestfs_int_cmd_run, the pipe version did not print
the command it was about to run when debugging was enabled.
Fixes commit e98bb8692929a037f3452686719504aea31f311d.
---
lib/command.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/command.c b/lib/command.c
index 970acf6e5..bc469de59 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -791,6 +791,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode)
finish_command (cmd);
+ if (cmd->g->verbose)
+ debug_command (cmd);
+
/* Various options cannot be used here. */
assert (!cmd->capture_errors);
assert (!cmd->stdout_callback);
--
2.13.2
2
1
Enhance the Libvirt_utils module with libvirt connection objects,
and read-only and read-writen open functions for them; adapt the rest of
the mini-binding to use these objects, instead of opening + closing
libvirt connections every time. This has different improvements:
a) a libvirt connection is reused for different API calls, improving
the communication with remote (input) servers
b) because of (a), there is way less need to pass libvirt_uri and
password variables all around
The hierarchy of input_libvirt* classes is changed to take a Lazy object
with the libvirt connection, accessing it through a "proctected" method:
this way, the connection is opened only at the first access.
---
v2v/copy_to_local.ml | 3 +-
v2v/input_libvirt.ml | 13 +-
v2v/input_libvirt_other.ml | 24 ++--
v2v/input_libvirt_other.mli | 5 +-
v2v/input_libvirt_vcenter_https.ml | 10 +-
v2v/input_libvirt_vcenter_https.mli | 2 +-
v2v/input_libvirt_vddk.ml | 18 +--
v2v/input_libvirt_vddk.mli | 4 +-
v2v/input_libvirt_xen_ssh.ml | 10 +-
v2v/input_libvirt_xen_ssh.mli | 2 +-
v2v/input_libvirtxml.ml | 3 +-
v2v/libvirt_utils-c.c | 259 +++++++++++++++++++-----------------
v2v/libvirt_utils.ml | 16 ++-
v2v/libvirt_utils.mli | 44 +++---
v2v/output_libvirt.ml | 8 +-
v2v/parse_libvirt_xml.ml | 4 +-
v2v/parse_libvirt_xml.mli | 2 +-
17 files changed, 233 insertions(+), 194 deletions(-)
diff --git a/v2v/copy_to_local.ml b/v2v/copy_to_local.ml
index 0a2b7ed75..828b5b490 100644
--- a/v2v/copy_to_local.ml
+++ b/v2v/copy_to_local.ml
@@ -131,7 +131,8 @@ read the man page virt-v2v-copy-to-local(1).
(* Get the remote libvirt XML. *)
message (f_"Fetching the remote libvirt XML metadata ...");
- let xml = Libvirt_utils.dumpxml ?password ~conn:input_conn guest_name in
+ let conn = Libvirt_utils.connect_rw ?password ~conn:input_conn () in
+ let xml = Libvirt_utils.dumpxml conn guest_name in
debug "libvirt XML from remote server:\n%s" xml;
diff --git a/v2v/input_libvirt.ml b/v2v/input_libvirt.ml
index e8143b6ad..6baac7d5f 100644
--- a/v2v/input_libvirt.ml
+++ b/v2v/input_libvirt.ml
@@ -28,9 +28,10 @@ open Utils
(* Choose the right subclass based on the URI. *)
let input_libvirt dcpath vddk_options password libvirt_uri guest =
+ let conn = lazy (Libvirt_utils.connect_rw ?password ?conn:libvirt_uri ()) in
match libvirt_uri with
| None ->
- Input_libvirt_other.input_libvirt_other password libvirt_uri guest
+ Input_libvirt_other.input_libvirt_other conn guest
| Some orig_uri ->
let { Xml.uri_server = server; uri_scheme = scheme } as parsed_uri =
@@ -45,7 +46,7 @@ let input_libvirt dcpath vddk_options password libvirt_uri guest =
| Some _, None (* No scheme? *)
| Some _, Some "" ->
- Input_libvirt_other.input_libvirt_other password libvirt_uri guest
+ Input_libvirt_other.input_libvirt_other conn guest
(* vCenter over https, or
* vCenter or ESXi using nbdkit vddk plugin
@@ -54,16 +55,16 @@ let input_libvirt dcpath vddk_options password libvirt_uri guest =
(match vddk_options with
| None ->
Input_libvirt_vcenter_https.input_libvirt_vcenter_https
- dcpath password libvirt_uri parsed_uri scheme server guest
+ dcpath conn password parsed_uri scheme server guest
| Some vddk_options ->
Input_libvirt_vddk.input_libvirt_vddk vddk_options password
- libvirt_uri parsed_uri guest
+ conn parsed_uri guest
)
(* Xen over SSH *)
| Some server, Some ("xen+ssh" as scheme) ->
Input_libvirt_xen_ssh.input_libvirt_xen_ssh
- password libvirt_uri parsed_uri scheme server guest
+ conn parsed_uri scheme server guest
(* Old virt-v2v also supported qemu+ssh://. However I am
* deliberately not supporting this in new virt-v2v. Don't
@@ -74,6 +75,6 @@ let input_libvirt dcpath vddk_options password libvirt_uri guest =
| 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 password libvirt_uri guest
+ Input_libvirt_other.input_libvirt_other conn guest
let () = Modules_list.register_input_module "libvirt"
diff --git a/v2v/input_libvirt_other.ml b/v2v/input_libvirt_other.ml
index 05923e952..cd466a2c5 100644
--- a/v2v/input_libvirt_other.ml
+++ b/v2v/input_libvirt_other.ml
@@ -49,24 +49,24 @@ let error_if_no_ssh_agent () =
error (f_"ssh-agent authentication has not been set up ($SSH_AUTH_SOCK is not set). Please read \"INPUT FROM RHEL 5 XEN\" in the virt-v2v(1) man page.")
(* Superclass. *)
-class virtual input_libvirt (password : string option) libvirt_uri guest =
-object
+class virtual input_libvirt lazy_conn guest =
+ let conn_obj = lazy_conn in
+object (self)
inherit input
method as_options =
- sprintf "-i libvirt%s %s"
- (match libvirt_uri with
- | None -> ""
- | Some uri -> " -ic " ^ uri)
- guest
+ sprintf "-i libvirt -ic %s %s" (Libvirt_utils.get_uri self#conn) guest
+
+ method private conn =
+ Lazy.force conn_obj
end
(* Subclass specialized for handling anything that's *not* VMware vCenter
* or Xen.
*)
-class input_libvirt_other password libvirt_uri guest =
-object
- inherit input_libvirt password libvirt_uri guest
+class input_libvirt_other lazy_conn guest =
+object (self)
+ inherit input_libvirt lazy_conn guest
method source () =
debug "input_libvirt_other: source()";
@@ -74,9 +74,9 @@ object
(* Get the libvirt XML. This also checks (as a side-effect)
* that the domain is not running. (RHBZ#1138586)
*)
- let xml = Libvirt_utils.dumpxml ?password ?conn:libvirt_uri guest in
+ let xml = Libvirt_utils.dumpxml self#conn guest in
- let source, disks = parse_libvirt_xml ?conn:libvirt_uri xml in
+ let source, disks = parse_libvirt_xml self#conn xml in
let disks = List.map (fun { p_source_disk = disk } -> disk) disks in
{ source with s_disks = disks }
end
diff --git a/v2v/input_libvirt_other.mli b/v2v/input_libvirt_other.mli
index 603fd3dd2..9645aa5af 100644
--- a/v2v/input_libvirt_other.mli
+++ b/v2v/input_libvirt_other.mli
@@ -21,10 +21,11 @@
val error_if_libvirt_does_not_support_json_backingfile : unit -> unit
val error_if_no_ssh_agent : unit -> unit
-class virtual input_libvirt : string option -> string option -> string -> object
+class virtual input_libvirt : Libvirt_utils.conn Lazy.t -> string -> object
method as_options : string
method virtual source : unit -> Types.source
method adjust_overlay_parameters : Types.overlay -> unit
+ method private conn : Libvirt_utils.conn
end
-val input_libvirt_other : string option -> string option -> string -> Types.input
+val input_libvirt_other : Libvirt_utils.conn Lazy.t -> string -> Types.input
diff --git a/v2v/input_libvirt_vcenter_https.ml b/v2v/input_libvirt_vcenter_https.ml
index 8b6856c7e..54370b954 100644
--- a/v2v/input_libvirt_vcenter_https.ml
+++ b/v2v/input_libvirt_vcenter_https.ml
@@ -36,9 +36,9 @@ let readahead_for_copying = Some (64 * 1024 * 1024)
(* Subclass specialized for handling VMware vCenter over https. *)
class input_libvirt_vcenter_https
- cmdline_dcPath password libvirt_uri parsed_uri scheme server guest =
-object
- inherit input_libvirt password libvirt_uri guest
+ cmdline_dcPath lazy_conn password parsed_uri scheme server guest =
+object (self)
+ inherit input_libvirt lazy_conn guest
val saved_source_paths = Hashtbl.create 13
val mutable dcPath = ""
@@ -64,8 +64,8 @@ object
(* Get the libvirt XML. This also checks (as a side-effect)
* that the domain is not running. (RHBZ#1138586)
*)
- let xml = Libvirt_utils.dumpxml ?password ?conn:libvirt_uri guest in
- let source, disks = parse_libvirt_xml ?conn:libvirt_uri xml in
+ let xml = Libvirt_utils.dumpxml self#conn guest in
+ let source, disks = parse_libvirt_xml self#conn xml in
(* Find the <vmware:datacenterpath> element from the XML, if it
* exists. This was added in libvirt >= 1.2.20.
diff --git a/v2v/input_libvirt_vcenter_https.mli b/v2v/input_libvirt_vcenter_https.mli
index 840b5a90f..6f848f2f0 100644
--- a/v2v/input_libvirt_vcenter_https.mli
+++ b/v2v/input_libvirt_vcenter_https.mli
@@ -18,4 +18,4 @@
(** [-i libvirt] when the source is VMware vCenter *)
-val input_libvirt_vcenter_https : string option -> string option -> string option -> Xml.uri -> string -> string -> string -> Types.input
+val input_libvirt_vcenter_https : string option -> Libvirt_utils.conn Lazy.t -> string option -> Xml.uri -> string -> string -> string -> Types.input
diff --git a/v2v/input_libvirt_vddk.ml b/v2v/input_libvirt_vddk.ml
index b6a57d374..a09c0b55b 100644
--- a/v2v/input_libvirt_vddk.ml
+++ b/v2v/input_libvirt_vddk.ml
@@ -34,7 +34,7 @@ open Xpath_helpers
open Printf
(* Subclass specialized for handling VMware via nbdkit vddk plugin. *)
-class input_libvirt_vddk vddk_options password libvirt_uri parsed_uri guest =
+class input_libvirt_vddk vddk_options password lazy_conn parsed_uri guest =
(* The VDDK path. *)
let libdir = vddk_options.vddk_libdir in
@@ -102,8 +102,8 @@ See also \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") library_path
error (f_"You must pass the ‘--vddk-thumbprint’ option with the SSL thumbprint of the VMware server. To find the thumbprint, see the nbdkit-vddk-plugin(1) manual. See also \"INPUT FROM VDDK\" in the virt-v2v(1) manual.")
in
-object
- inherit input_libvirt password libvirt_uri guest
+object (self)
+ inherit input_libvirt lazy_conn guest
method source () =
error_unless_vddk_libdir ();
@@ -114,8 +114,8 @@ object
(* Get the libvirt XML. This also checks (as a side-effect)
* that the domain is not running. (RHBZ#1138586)
*)
- let xml = Libvirt_utils.dumpxml ?password ?conn:libvirt_uri guest in
- let source, disks = parse_libvirt_xml ?conn:libvirt_uri xml in
+ let xml = Libvirt_utils.dumpxml self#conn guest in
+ let source, disks = parse_libvirt_xml self#conn xml in
(* Find the <vmware:moref> element from the XML. This was added
* in libvirt >= 3.7 and is required.
@@ -163,12 +163,8 @@ object
match parsed_uri.Xml.uri_server with
| Some server -> server
| None ->
- match libvirt_uri with
- | Some libvirt_uri ->
- error (f_"‘-ic %s’ URL does not contain a host name field")
- libvirt_uri
- | None ->
- error (f_"you must use the ‘-ic’ parameter. See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") in
+ (* XXX *)
+ error (f_"you must use the ‘-ic’ parameter. See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") in
(* Similar to above, we also need a username to pass. *)
let user =
diff --git a/v2v/input_libvirt_vddk.mli b/v2v/input_libvirt_vddk.mli
index 19a34c202..3017488b5 100644
--- a/v2v/input_libvirt_vddk.mli
+++ b/v2v/input_libvirt_vddk.mli
@@ -18,7 +18,7 @@
(** [-i libvirt] when the source is VMware via nbdkit vddk plugin *)
-val input_libvirt_vddk : Types.vddk_options -> string option -> string option -> Xml.uri -> string -> Types.input
-(** [input_libvirt_vddk vddk_options password libvirt_uri parsed_uri guest]
+val input_libvirt_vddk : Types.vddk_options -> string option -> Libvirt_utils.conn Lazy.t -> Xml.uri -> string -> Types.input
+(** [input_libvirt_vddk vddk_options password conn 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
index fd3da2c44..9d3005855 100644
--- a/v2v/input_libvirt_xen_ssh.ml
+++ b/v2v/input_libvirt_xen_ssh.ml
@@ -30,9 +30,9 @@ open Input_libvirt_other
open Printf
(* Subclass specialized for handling Xen over SSH. *)
-class input_libvirt_xen_ssh password libvirt_uri parsed_uri scheme server guest =
-object
- inherit input_libvirt password libvirt_uri guest
+class input_libvirt_xen_ssh lazy_conn parsed_uri scheme server guest =
+object (self)
+ inherit input_libvirt lazy_conn guest
method source () =
debug "input_libvirt_xen_ssh: source: scheme %s server %s"
@@ -47,8 +47,8 @@ object
(* Get the libvirt XML. This also checks (as a side-effect)
* that the domain is not running. (RHBZ#1138586)
*)
- let xml = Libvirt_utils.dumpxml ?password ?conn:libvirt_uri guest in
- let source, disks = parse_libvirt_xml ?conn:libvirt_uri xml in
+ let xml = Libvirt_utils.dumpxml self#conn guest in
+ let source, disks = parse_libvirt_xml self#conn xml in
(* Map the <source/> filename (which is relative to the remote
* Xen server) to an ssh URI. This is a JSON URI looking something
diff --git a/v2v/input_libvirt_xen_ssh.mli b/v2v/input_libvirt_xen_ssh.mli
index 85213241a..bde0ff65a 100644
--- a/v2v/input_libvirt_xen_ssh.mli
+++ b/v2v/input_libvirt_xen_ssh.mli
@@ -18,4 +18,4 @@
(** [-i libvirt] when the source is Xen *)
-val input_libvirt_xen_ssh : string option -> string option -> Xml.uri -> string -> string -> string -> Types.input
+val input_libvirt_xen_ssh : Libvirt_utils.conn Lazy.t -> Xml.uri -> string -> string -> string -> Types.input
diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml
index 570541d7d..5d13faee6 100644
--- a/v2v/input_libvirtxml.ml
+++ b/v2v/input_libvirtxml.ml
@@ -34,7 +34,8 @@ object
method source () =
let xml = read_whole_file file in
- let source, disks = parse_libvirt_xml xml in
+ let conn = Libvirt_utils.connect_ro () in
+ let source, disks = parse_libvirt_xml conn 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
diff --git a/v2v/libvirt_utils-c.c b/v2v/libvirt_utils-c.c
index 93ee5208e..fec14356b 100644
--- a/v2v/libvirt_utils-c.c
+++ b/v2v/libvirt_utils-c.c
@@ -31,6 +31,7 @@
#include <libintl.h>
#include <caml/alloc.h>
+#include <caml/custom.h>
#include <caml/fail.h>
#include <caml/memory.h>
#include <caml/mlvalues.h>
@@ -49,6 +50,39 @@
#define ERROR_MESSAGE_LEN 512
+/* Wrap and unwrap virConnectPtr, with a finalizer. */
+#define Libvirtconn_val(rv) (*(virConnectPtr *)Data_custom_val(rv))
+
+static void
+libvirtconn_finalize (value rev)
+{
+ virConnectPtr conn = Libvirtconn_val (rev);
+ if (conn)
+ virConnectClose (conn);
+}
+
+static struct custom_operations custom_operations = {
+ (char *) "libvirtconn_custom_operations",
+ libvirtconn_finalize,
+ custom_compare_default,
+ custom_hash_default,
+ custom_serialize_default,
+ custom_deserialize_default
+};
+
+static value
+Val_libvirtconn (virConnectPtr conn)
+{
+ CAMLparam0 ();
+ CAMLlocal1 (rv);
+
+ rv = caml_alloc_custom (&custom_operations, sizeof (virConnectPtr), 0, 1);
+ Libvirtconn_val (rv) = conn;
+
+ CAMLreturn (rv);
+}
+
+
static void
ignore_errors (void *ignore, virErrorPtr ignore2)
{
@@ -111,11 +145,10 @@ libvirt_auth_default_wrapper (virConnectCredentialPtr cred,
}
}
-virStoragePoolPtr
+static virStoragePoolPtr
connect_and_load_pool (value connv, value poolnamev)
{
CAMLparam2 (connv, poolnamev);
- const char *conn_uri = NULL;
const char *poolname;
/* We have to assemble the error on the stack because a dynamic
* string couldn't be freed.
@@ -125,31 +158,8 @@ connect_and_load_pool (value connv, value poolnamev)
virConnectPtr conn;
virStoragePoolPtr pool;
- if (connv != Val_int (0))
- conn_uri = String_val (Field (connv, 0)); /* Some conn */
-
- /* We have to call the default authentication handler, not least
- * since it handles all the PolicyKit crap. However it also makes
- * coding this simpler.
- */
- conn = virConnectOpenAuth (conn_uri, virConnectAuthPtrDefault,
- VIR_CONNECT_RO);
- if (conn == NULL) {
- if (conn_uri)
- snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection ‘%s’"), conn_uri);
- else
- snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
- caml_invalid_argument (errmsg);
- }
-
- /* Suppress default behaviour of printing errors to stderr. Note
- * you can't set this to NULL to ignore errors; setting it to NULL
- * restores the default error handler ...
- */
- virConnSetErrorFunc (conn, NULL, ignore_errors);
-
/* Look up the pool. */
+ conn = Libvirtconn_val (connv);
poolname = String_val (poolnamev);
pool = virStoragePoolLookupByUUIDString (conn, poolname);
@@ -162,48 +172,72 @@ connect_and_load_pool (value connv, value poolnamev)
snprintf (errmsg, sizeof errmsg,
_("cannot find libvirt pool ‘%s’: %s\n\nUse ‘virsh pool-list --all’ to list all available pools, and ‘virsh pool-dumpxml <pool>’ to display details about a particular pool.\n\nTo set the pool which virt-v2v uses, add the ‘-os <pool>’ option."),
poolname, err->message);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
CAMLreturnT (virStoragePoolPtr, pool);
}
+
value
-v2v_dumpxml (value passwordv, value connv, value domnamev)
+v2v_libvirt_connect_ro (value connv, value unitv)
{
- CAMLparam3 (passwordv, connv, domnamev);
- CAMLlocal1 (retv);
+ CAMLparam2 (connv, unitv);
+ const char *conn_uri = NULL;
+ char errmsg[ERROR_MESSAGE_LEN];
+ virConnectPtr conn;
+
+ if (connv != Val_int (0))
+ conn_uri = String_val (Field (connv, 0)); /* Some conn */
+
+ /* We have to call the default authentication handler, not least
+ * since it handles all the PolicyKit crap. However it also makes
+ * coding this simpler.
+ */
+ conn = virConnectOpenAuth (conn_uri, virConnectAuthPtrDefault,
+ VIR_CONNECT_RO);
+ if (conn == NULL) {
+ if (conn_uri)
+ snprintf (errmsg, sizeof errmsg,
+ _("cannot open libvirt connection ‘%s’"), conn_uri);
+ else
+ snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
+ caml_invalid_argument (errmsg);
+ }
+
+ /* Suppress default behaviour of printing errors to stderr. Note
+ * you can't set this to NULL to ignore errors; setting it to NULL
+ * restores the default error handler ...
+ */
+ virConnSetErrorFunc (conn, NULL, ignore_errors);
+
+ CAMLreturn (Val_libvirtconn (conn));
+}
+
+value
+v2v_libvirt_connect_rw (value passwordv, value connv, value unitv)
+{
+ CAMLparam3 (passwordv, connv, unitv);
const char *password = NULL;
const char *conn_uri = NULL;
- const char *domname;
virConnectAuth authdata;
/* We have to assemble the error on the stack because a dynamic
* string couldn't be freed.
*/
char errmsg[ERROR_MESSAGE_LEN];
- virErrorPtr err;
virConnectPtr conn;
- virDomainPtr dom;
- int is_test_uri = 0;
- char *xml;
if (passwordv != Val_int (0))
password = String_val (Field (passwordv, 0)); /* Some password */
- if (connv != Val_int (0)) {
+ if (connv != Val_int (0))
conn_uri = String_val (Field (connv, 0)); /* Some conn */
- is_test_uri = STRPREFIX (conn_uri, "test:");
- }
/* Set up authentication wrapper. */
authdata = *virConnectAuthPtrDefault;
authdata.cb = libvirt_auth_default_wrapper;
authdata.cbdata = (void *) password;
- /* Note this cannot be a read-only connection since we need to use
- * the VIR_DOMAIN_XML_SECURE flag below.
- */
conn = virConnectOpenAuth (conn_uri, &authdata, 0);
if (conn == NULL) {
if (conn_uri)
@@ -220,6 +254,26 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
*/
virConnSetErrorFunc (conn, NULL, ignore_errors);
+ CAMLreturn (Val_libvirtconn (conn));
+}
+
+value
+v2v_libvirt_dumpxml (value connv, value domnamev)
+{
+ CAMLparam2 (connv, domnamev);
+ CAMLlocal1 (retv);
+ const char *domname;
+ /* We have to assemble the error on the stack because a dynamic
+ * string couldn't be freed.
+ */
+ char errmsg[ERROR_MESSAGE_LEN];
+ virErrorPtr err;
+ virConnectPtr conn;
+ virDomainPtr dom;
+ int is_test_uri = 0;
+ char *xml;
+
+ conn = Libvirtconn_val (connv);
/* Look up the domain. */
domname = String_val (domnamev);
@@ -232,10 +286,11 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
_("cannot find libvirt domain ‘%s’: %s"), domname, err->message);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
+ is_test_uri = STRPREFIX (virConnectGetURI (conn), "test:");
+
/* As a side-effect we check that the domain is shut down. Of course
* this is only appropriate for virt-v2v. (RHBZ#1138586)
*/
@@ -249,7 +304,6 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
_("libvirt domain ‘%s’ is running or paused. It must be shut down in order to perform virt-v2v conversion"),
domname);
virDomainFree (dom);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
}
@@ -262,11 +316,9 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
_("cannot fetch XML description of guest ‘%s’: %s"),
domname, err->message);
virDomainFree (dom);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
virDomainFree (dom);
- virConnectClose (conn);
retv = caml_copy_string (xml);
free (xml);
@@ -275,7 +327,7 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
}
value
-v2v_pool_dumpxml (value connv, value poolnamev)
+v2v_libvirt_pool_dumpxml (value connv, value poolnamev)
{
CAMLparam2 (connv, poolnamev);
CAMLlocal1 (retv);
@@ -284,13 +336,11 @@ v2v_pool_dumpxml (value connv, value poolnamev)
*/
char errmsg[ERROR_MESSAGE_LEN];
virErrorPtr err;
- virConnectPtr conn;
virStoragePoolPtr pool;
char *xml;
/* Look up the pool. */
pool = connect_and_load_pool (connv, poolnamev);
- conn = virStoragePoolGetConnect (pool);
xml = virStoragePoolGetXMLDesc (pool, 0);
if (xml == NULL) {
@@ -299,11 +349,9 @@ v2v_pool_dumpxml (value connv, value poolnamev)
_("cannot fetch XML description of pool ‘%s’: %s"),
String_val (poolnamev), err->message);
virStoragePoolFree (pool);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
virStoragePoolFree (pool);
- virConnectClose (conn);
retv = caml_copy_string (xml);
free (xml);
@@ -312,7 +360,7 @@ v2v_pool_dumpxml (value connv, value poolnamev)
}
value
-v2v_vol_dumpxml (value connv, value poolnamev, value volnamev)
+v2v_libvirt_vol_dumpxml (value connv, value poolnamev, value volnamev)
{
CAMLparam3 (connv, poolnamev, volnamev);
CAMLlocal1 (retv);
@@ -322,14 +370,12 @@ v2v_vol_dumpxml (value connv, value poolnamev, value volnamev)
*/
char errmsg[ERROR_MESSAGE_LEN];
virErrorPtr err;
- virConnectPtr conn;
virStoragePoolPtr pool;
virStorageVolPtr vol;
char *xml;
/* Look up the pool. */
pool = connect_and_load_pool (connv, poolnamev);
- conn = virStoragePoolGetConnect (pool);
/* Look up the volume. */
volname = String_val (volnamev);
@@ -341,7 +387,6 @@ v2v_vol_dumpxml (value connv, value poolnamev, value volnamev)
snprintf (errmsg, sizeof errmsg,
_("cannot find libvirt volume ‘%s’: %s"), volname, err->message);
virStoragePoolFree (pool);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
@@ -353,12 +398,10 @@ v2v_vol_dumpxml (value connv, value poolnamev, value volnamev)
volname, err->message);
virStorageVolFree (vol);
virStoragePoolFree (pool);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
virStorageVolFree (vol);
virStoragePoolFree (pool);
- virConnectClose (conn);
retv = caml_copy_string (xml);
free (xml);
@@ -367,11 +410,10 @@ v2v_vol_dumpxml (value connv, value poolnamev, value volnamev)
}
value
-v2v_capabilities (value connv, value unitv)
+v2v_libvirt_capabilities (value connv)
{
- CAMLparam2 (connv, unitv);
+ CAMLparam1 (connv);
CAMLlocal1 (capabilitiesv);
- const char *conn_uri = NULL;
char *capabilities;
/* We have to assemble the error on the stack because a dynamic
* string couldn't be freed.
@@ -380,29 +422,7 @@ v2v_capabilities (value connv, value unitv)
virErrorPtr err;
virConnectPtr conn;
- if (connv != Val_int (0))
- conn_uri = String_val (Field (connv, 0)); /* Some conn */
-
- /* We have to call the default authentication handler, not least
- * since it handles all the PolicyKit crap. However it also makes
- * coding this simpler.
- */
- conn = virConnectOpenAuth (conn_uri, virConnectAuthPtrDefault,
- VIR_CONNECT_RO);
- if (conn == NULL) {
- if (conn_uri)
- snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection ‘%s’"), conn_uri);
- else
- snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
- caml_invalid_argument (errmsg);
- }
-
- /* Suppress default behaviour of printing errors to stderr. Note
- * you can't set this to NULL to ignore errors; setting it to NULL
- * restores the default error handler ...
- */
- virConnSetErrorFunc (conn, NULL, ignore_errors);
+ conn = Libvirtconn_val (connv);
capabilities = virConnectGetCapabilities (conn);
if (!capabilities) {
@@ -410,23 +430,19 @@ v2v_capabilities (value connv, value unitv)
snprintf (errmsg, sizeof errmsg,
_("cannot get libvirt hypervisor capabilities: %s"),
err->message);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
capabilitiesv = caml_copy_string (capabilities);
free (capabilities);
- virConnectClose (conn);
-
CAMLreturn (capabilitiesv);
}
value
-v2v_domain_exists (value connv, value domnamev)
+v2v_libvirt_domain_exists (value connv, value domnamev)
{
CAMLparam2 (connv, domnamev);
- const char *conn_uri = NULL;
const char *domname;
/* We have to assemble the error on the stack because a dynamic
* string couldn't be freed.
@@ -437,31 +453,8 @@ v2v_domain_exists (value connv, value domnamev)
virDomainPtr dom;
int domain_exists;
- if (connv != Val_int (0))
- conn_uri = String_val (Field (connv, 0)); /* Some conn */
-
- /* We have to call the default authentication handler, not least
- * since it handles all the PolicyKit crap. However it also makes
- * coding this simpler.
- */
- conn = virConnectOpenAuth (conn_uri, virConnectAuthPtrDefault,
- VIR_CONNECT_RO);
- if (conn == NULL) {
- if (conn_uri)
- snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection ‘%s’"), conn_uri);
- else
- snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
- caml_invalid_argument (errmsg);
- }
-
- /* Suppress default behaviour of printing errors to stderr. Note
- * you can't set this to NULL to ignore errors; setting it to NULL
- * restores the default error handler ...
- */
- virConnSetErrorFunc (conn, NULL, ignore_errors);
-
/* Look up the domain. */
+ conn = Libvirtconn_val (connv);
domname = String_val (domnamev);
dom = virDomainLookupByName (conn, domname);
@@ -477,17 +470,44 @@ v2v_domain_exists (value connv, value domnamev)
snprintf (errmsg, sizeof errmsg,
_("cannot find libvirt domain ‘%s’: %s"),
domname, err->message);
- virConnectClose (conn);
caml_invalid_argument (errmsg);
}
}
- virConnectClose (conn);
-
CAMLreturn (Val_bool (domain_exists));
}
value
+v2v_libvirt_get_uri (value connv)
+{
+ CAMLparam1 (connv);
+ CAMLlocal1 (uriv);
+ char *uri;
+ /* We have to assemble the error on the stack because a dynamic
+ * string couldn't be freed.
+ */
+ char errmsg[ERROR_MESSAGE_LEN];
+ virErrorPtr err;
+ virConnectPtr conn;
+
+ conn = Libvirtconn_val (connv);
+
+ uri = virConnectGetURI (conn);
+ if (!uri) {
+ err = virGetLastError ();
+ snprintf (errmsg, sizeof errmsg,
+ _("cannot get libvirt hypervisor URI: %s"),
+ err->message);
+ caml_invalid_argument (errmsg);
+ }
+
+ uriv = caml_copy_string (uri);
+ free (uri);
+
+ CAMLreturn (uriv);
+}
+
+value
v2v_libvirt_get_version (value unitv)
{
CAMLparam1 (unitv);
@@ -529,11 +549,12 @@ v2v_libvirt_get_version (value unitv)
caml_invalid_argument ("virt-v2v was compiled without libvirt support"); \
}
-NO_LIBVIRT (value v2v_dumpxml (value connv, value domv))
-NO_LIBVIRT (value v2v_pool_dumpxml (value connv, value poolv))
-NO_LIBVIRT (value v2v_vol_dumpxml (value connv, value poolnamev, value volnamev))
-NO_LIBVIRT (value v2v_capabilities (value connv, value unitv))
-NO_LIBVIRT (value v2v_domain_exists (value connv, value domnamev))
+NO_LIBVIRT (value v2v_libvirt_dumpxml (value connv, value domv))
+NO_LIBVIRT (value v2v_libvirt_pool_dumpxml (value connv, value poolv))
+NO_LIBVIRT (value v2v_libvirt_vol_dumpxml (value connv, value poolnamev, value volnamev))
+NO_LIBVIRT (value v2v_libvirt_capabilities (value connv, value unitv))
+NO_LIBVIRT (value v2v_libvirt_domain_exists (value connv, value domnamev))
+NO_LIBVIRT (value v2v_libvirt_get_uri (value connv))
NO_LIBVIRT (value v2v_libvirt_get_version (value unitv))
#endif /* !HAVE_LIBVIRT */
diff --git a/v2v/libvirt_utils.ml b/v2v/libvirt_utils.ml
index 248d78c72..d813855cd 100644
--- a/v2v/libvirt_utils.ml
+++ b/v2v/libvirt_utils.ml
@@ -19,13 +19,19 @@
(* This module implements various [virsh]-like commands, but with
non-broken authentication handling. *)
-external dumpxml : ?password:string -> ?conn:string -> string -> string = "v2v_dumpxml"
-external pool_dumpxml : ?conn:string -> string -> string = "v2v_pool_dumpxml"
-external vol_dumpxml : ?conn:string -> string -> string -> string = "v2v_vol_dumpxml"
+type conn
+external connect_ro : ?conn:string -> unit -> conn = "v2v_libvirt_connect_ro"
+external connect_rw : ?password:string -> ?conn:string -> unit -> conn = "v2v_libvirt_connect_rw"
-external capabilities : ?conn:string -> unit -> string = "v2v_capabilities"
+external dumpxml : conn -> string -> string = "v2v_libvirt_dumpxml"
+external pool_dumpxml : conn -> string -> string = "v2v_libvirt_pool_dumpxml"
+external vol_dumpxml : conn -> string -> string -> string = "v2v_libvirt_vol_dumpxml"
-external domain_exists : ?conn:string -> string -> bool = "v2v_domain_exists"
+external capabilities : conn -> string = "v2v_libvirt_capabilities"
+
+external domain_exists : conn -> string -> bool = "v2v_libvirt_domain_exists"
+
+external get_uri : conn -> string = "v2v_libvirt_get_uri"
external libvirt_get_version : unit -> int * int * int
= "v2v_libvirt_get_version"
diff --git a/v2v/libvirt_utils.mli b/v2v/libvirt_utils.mli
index 53dfd48e5..11a83b9a2 100644
--- a/v2v/libvirt_utils.mli
+++ b/v2v/libvirt_utils.mli
@@ -24,32 +24,42 @@
password prompt to stdout, which is the same place we would be
reading the XML from. This file works around this brokenness. *)
-val dumpxml : ?password:string -> ?conn:string -> string -> string
-(** [dumpxml ?password ?conn dom] returns the libvirt XML of domain [dom].
- The optional [?conn] parameter is the libvirt connection URI.
+type conn
+(** The type of a compiled regular expression. *)
+
+val connect_ro : ?conn:string -> unit -> conn
+(** Connect in read-only mode to the specified URI. *)
+
+val connect_rw : ?password:string -> ?conn:string -> unit -> conn
+(** Connect in read-only mode to the specified URI. *)
+
+val dumpxml : conn -> string -> string
+(** [dumpxml conn dom] returns the libvirt XML of domain [dom]
+ in the libvirt connection [conn].
[dom] may be a guest name or UUID. *)
-val pool_dumpxml : ?conn:string -> string -> string
-(** [pool_dumpxml ?conn pool] returns the libvirt XML of pool [pool].
- The optional [?conn] parameter is the libvirt connection URI.
+val pool_dumpxml : conn -> string -> string
+(** [pool_dumpxml ?conn pool] returns the libvirt XML of pool [pool]
+ in the libvirt connection [conn].
[pool] may be a pool name or UUID. *)
-val vol_dumpxml : ?conn:string -> string -> string -> string
-(** [vol_dumpxml ?conn pool vol] returns the libvirt XML of volume [vol],
- which is part of the pool [pool].
- The optional [?conn] parameter is the libvirt connection URI.
+val vol_dumpxml : conn -> string -> string -> string
+(** [vol_dumpxml conn pool vol] returns the libvirt XML of volume [vol],
+ which is part of the pool [pool], in the libvirt connection [conn].
[pool] may be a pool name or UUID. *)
-val capabilities : ?conn:string -> unit -> string
-(** [capabilities ?conn ()] returns the libvirt capabilities XML.
- The optional [?conn] parameter is the libvirt connection URI. *)
+val capabilities : conn -> string
+(** [capabilities conn] returns the libvirt capabilities XML
+ of the libvirt connection [conn]. *)
-val domain_exists : ?conn:string -> string -> bool
-(** [domain_exists ?conn dom] returns a boolean indicating if the
- the libvirt XML domain [dom] exists.
- The optional [?conn] parameter is the libvirt connection URI.
+val domain_exists : conn -> string -> bool
+(** [domain_exists conn dom] returns a boolean indicating if the
+ the libvirt XML domain [dom] exists in the libvirt connection [conn].
[dom] may be a guest name, but not a UUID. *)
+val get_uri : conn -> string
+(** [get_uri conn] returns the URI of the libvirt connection [conn]. *)
+
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/output_libvirt.ml b/v2v/output_libvirt.ml
index b5df8245f..e00cac24b 100644
--- a/v2v/output_libvirt.ml
+++ b/v2v/output_libvirt.ml
@@ -78,8 +78,10 @@ class output_libvirt oc output_pool = object
| Some uri -> sprintf "-o libvirt -oc %s -os %s" uri output_pool
method prepare_targets source targets =
+ let conn = Libvirt_utils.connect_ro ?conn:oc () in
+
(* Get the capabilities from libvirt. *)
- let xml = Libvirt_utils.capabilities ?conn:oc () in
+ let xml = Libvirt_utils.capabilities conn in
debug "libvirt capabilities XML:\n%s" xml;
(* This just checks that the capabilities XML is well-formed,
@@ -94,7 +96,7 @@ class output_libvirt oc output_pool = object
capabilities_doc <- Some doc;
(* Does the domain already exist on the target? (RHBZ#889082) *)
- if Libvirt_utils.domain_exists ?conn:oc source.s_name then (
+ if Libvirt_utils.domain_exists conn source.s_name then (
if source.s_hypervisor = Physical then (* virt-p2v user *)
error (f_"a libvirt domain called ‘%s’ already exists on the target.\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.s_name
@@ -106,7 +108,7 @@ class output_libvirt oc output_pool = object
(* Connect to output libvirt instance and check that the pool exists
* and dump out its XML.
*)
- let xml = Libvirt_utils.pool_dumpxml ?conn:oc output_pool in
+ let xml = Libvirt_utils.pool_dumpxml conn output_pool in
let doc = Xml.parse_memory xml in
let xpathctx = Xml.xpath_new_context doc in
let xpath_string = xpath_string xpathctx in
diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml
index c71707000..e3260c429 100644
--- a/v2v/parse_libvirt_xml.ml
+++ b/v2v/parse_libvirt_xml.ml
@@ -71,7 +71,7 @@ let create_curl_qemu_uri driver host port path =
(* Turn the JSON parameters into a 'json:' protocol string. *)
"json: " ^ JSON.string_of_doc json_params
-let parse_libvirt_xml ?conn xml =
+let parse_libvirt_xml conn xml =
debug "libvirt xml is:\n%s" xml;
let doc = Xml.parse_memory xml in
@@ -328,7 +328,7 @@ let parse_libvirt_xml ?conn xml =
(match xpath_string "source/@pool", xpath_string "source/@volume" with
| None, None | Some _, None | None, Some _ -> ()
| Some pool, Some vol ->
- let xml = Libvirt_utils.vol_dumpxml ?conn pool vol in
+ let xml = Libvirt_utils.vol_dumpxml conn pool vol in
let doc = Xml.parse_memory xml in
let xpathctx = Xml.xpath_new_context doc in
let xpath_string = Xpath_helpers.xpath_string xpathctx in
diff --git a/v2v/parse_libvirt_xml.mli b/v2v/parse_libvirt_xml.mli
index 3d4f7b375..1f2a5056e 100644
--- a/v2v/parse_libvirt_xml.mli
+++ b/v2v/parse_libvirt_xml.mli
@@ -27,7 +27,7 @@ and parsed_source =
| P_source_file of string (** <source file> *)
| P_dont_rewrite (** s_qemu_uri is already set. *)
-val parse_libvirt_xml : ?conn:string -> string -> Types.source * parsed_disk list
+val parse_libvirt_xml : Libvirt_utils.conn -> string -> Types.source * parsed_disk list
(** Take libvirt XML and parse it into a {!Types.source} structure and a
list of source disks.
--
2.13.5
2
2
Hi,
I tried to do code coverage testing for libguestfs with gcov.
The steps are shown as follows:
1. Download and install the source package(libguestfs-1.36.5-1.el7.src.rpm)
2. Modify libguestfs.spec file
#diff -u libguestfs.spec libguestfs.spec.modify
---------------------------------------------------------------------------------------
--- libguestfs.spec 2017-08-29 02:44:35.623751541 -0400
+++ libguestfs.spec.modify 2017-08-29 06:09:49.650654223 -0400
@@ -14,7 +14,7 @@
Name: libguestfs
Epoch: 1
Version: 1.36.5
-Release: 1%{?dist}
+Release: 1.gcov%{?dist}
License: LGPLv2+
# Source and patches.
@@ -69,7 +69,7 @@
Patch0034: 0034-RHEL-7-v2v-disable-unconfig-of-manually-installed-VM.patch
Patch0035: 0035-v2v-i-ova-Prefer-pigz-or-pxz-for-uncompressing-OVA-f.patch
Patch0036: 0036-resize-handle-empty-UUIDs-for-swap-partitions-RHBZ-1.patch
-
+Patch0037: 0037-possible-link-fix.patch
# Use git for patch management.
BuildRequires: git
@@ -815,6 +815,8 @@
%build
+CFLAGS="-fprofile-arcs -ftest-coverage -g -O0"; export CFLAGS
+LDFLAGS="-fprofile-arcs -ftest-coverage -lgcov"; export LDFLAGS
# Test if network is available.
ip addr list ||:
ip route list ||:
@@ -852,6 +854,7 @@
--disable-golang \
$extra
+sed -i 's/^CFLAGS = -fprofile-arcs -ftest-coverage -g -O0/CFLAGS = /g' /home/mockbuild/rpmbuild/BUILD/libguestfs-1.36.5/ocaml/Makefile
# Building index-parse.c by hand works around a race condition in the
# autotools cruft, where two or more copies of yacc race with each
# other, resulting in a corrupted file.
------------------------------------------------------------------------------------------
3.Execute rpmbuild command, but it failed with some errors.
#rpmbuild -ba SPECS/libguestfs.spec
------------------------------------------------------------------------------------------
...
gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DGUESTFS_PRIVATE=1 -I.. -I/usr/lib64/ocaml -I../ocaml -I../common/utils -I../common/utils -I../lib -I../lib -I../gnulib/lib -I../gnulib/lib -fno-common -W -Wabi -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbuiltin-macro-redefined -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wdouble-promotion -Wempty-body -Wendif-labels -Wenum-compare -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat-zero-length -Wfree-nonheap-object -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wold-style-declaration -Wold-style-definition -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wreturn-local-addr -Wreturn-type -Wsequence-point -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-overflow -Wstrict-prototypes -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wswitch -Wsync-nand -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-macros -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Wnormalized=nfc -Wno-unused-parameter -Wno-missing-field-initializers -fdiagnostics-show-option -Wframe-larger-than=5000 -Wstack-usage=10000 -fPIC -fno-strict-overflow -Wno-strict-overflow -c -o ../common/utils/libguestfsocaml_a-utils.o `test -f '../common/utils/utils.c' || echo './'`../common/utils/utils.c
ocamlfind ocamlc -g -annot -warn-error CDEFLMPSUVYZX-3 -package unix -c guestfs.ml -o guestfs.cmo
ocamlfind ocamlopt -g -annot -warn-error CDEFLMPSUVYZX-3 -package unix -c guestfs.ml -o guestfs.cmx
rm -f libguestfsocaml.a
ar cr libguestfsocaml.a libguestfsocaml_a-guestfs-c.o libguestfsocaml_a-guestfs-c-actions.o libguestfsocaml_a-guestfs-c-errnos.o ../common/utils/libguestfsocaml_a-utils.o ../gnulib/lib/libgnu.la
ranlib libguestfsocaml.a
ocamlmklib -o mlguestfs \
libguestfsocaml_a-guestfs-c.o libguestfsocaml_a-guestfs-c-actions.o libguestfsocaml_a-guestfs-c-errnos.o ../common/utils/libguestfsocaml_a-utils.o guestfs.cmo \
-fprofile-arcs -ftest-coverage -lgcov \
\
-L../lib/.libs -lguestfs
Unknown option -fprofile-arcs
Unknown option -ftest-coverage
ocamlmklib -o mlguestfs \
libguestfsocaml_a-guestfs-c.o libguestfsocaml_a-guestfs-c-actions.o libguestfsocaml_a-guestfs-c-errnos.o ../common/utils/libguestfsocaml_a-utils.o guestfs.cmx \
-fprofile-arcs -ftest-coverage -lgcov \
\
-L../lib/.libs -lguestfs
Unknown option -fprofile-arcs
Unknown option -ftest-coverage
touch stamp-mlguestfs
Warning: Element Unix.error not found
make[2]: Leaving directory `/home/mockbuild/rpmbuild/BUILD/libguestfs-1.36.5/ocaml'
Making all in ocaml/examples
make[2]: Entering directory `/home/mockbuild/rpmbuild/BUILD/libguestfs-1.36.5/ocaml/examples'
ocamlfind ocamlopt -cclib -L../../lib/.libs -package unix -linkpkg \
-warn-error A -I .. mlguestfs.cmxa create_disk.ml -o create_disk
ocamlfind ocamlopt -cclib -L../../lib/.libs -package unix -linkpkg \
-warn-error A -I .. mlguestfs.cmxa debug_logging.ml -o debug_logging
../libmlguestfs.a(libguestfsocaml_a-utils.o): In function `guestfs_int_string_is_valid':
utils.c:(.text+0xb99): undefined reference to `c_isalpha'
utils.c:(.text+0xbbf): undefined reference to `c_isdigit'
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
make[2]: *** [debug_logging] Error 2
make[2]: *** Waiting for unfinished jobs....
../libmlguestfs.a(libguestfsocaml_a-utils.o): In function `guestfs_int_string_is_valid':
utils.c:(.text+0xb99): undefined reference to `c_isalpha'
utils.c:(.text+0xbbf): undefined reference to `c_isdigit'
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
make[2]: *** [create_disk] Error 2
make[2]: Leaving directory `/home/mockbuild/rpmbuild/BUILD/libguestfs-1.36.5/ocaml/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mockbuild/rpmbuild/BUILD/libguestfs-1.36.5'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.JoY6TA (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.JoY6TA (%build)
---------------------------------------------------------------------------------------
The patch in attachment added in libguestfs.spec aims to resolve the above issue. But it seems to have no effect. Any idea how to resolve this issue? Thanks.
Best Regards
Yongkui Guo
IRC: yoguo
Tel: 15010777318
2
4
virt-resize error on RHEL 7 (was: Re: Regarding libguestfs)
by abinaya.manikandan@wipro.com 07 Sep '17
by abinaya.manikandan@wipro.com 07 Sep '17
07 Sep '17
Hi Richard,
As per your suggestion we removed pango-devel and build was successful. Thank you!
After the delivery, our customer reported another error related to virt-resize as below:
virt-resize: error: libguestfs error: internal_feature_available:
dispatch_incoming_message: unknown procedure number 458, set
LIBGUESTFS_PATH to point to the matching libguestfs appliance directory
Regards,
Abinaya
-----Original Message-----
From: Richard W.M. Jones [mailto:rjones@redhat.com]
Sent: Tuesday, August 29, 2017 7:56 PM
To: Abinaya Sandhiya Manikandan (GIS) <abinaya.manikandan(a)wipro.com>
Cc: libguestfs(a)redhat.com; Emlyn Jose (GIS) <emlyn.jose(a)wipro.com>
Subject: Re: Pango error when compiling virt-p2v on RHEL 7 (was: Re: [Libguestfs] Regarding libguestfs)
** This mail has been sent from an external source **
On Tue, Aug 29, 2017 at 02:20:47PM +0000, abinaya.manikandan(a)wipro.com<mailto:abinaya.manikandan@wipro.com> wrote:
> Hi,
>
> Yes, We are using pango-devel-1.40.4-1.el7.x86_64.
> Please find details below:
>
> >> [root@euca-10-254-11-189 rpmbuild]# rpm -qf
> >> /usr/include/pango-1.0/pango/pango-version-macros.h
> pango-devel-1.40.4-1.el7.x86_64
>
> Somehow the issue fixed if we remove the pango-devel,
Removing pango-devel most likely disables gtk, thus disabling compilation of virt-p2v. Which is one way to fix it, but I suppose it depends on if you need virt-p2v ...
> but now the issue is different,
>
> >> /opt/autoconf/x86_64/2.69/bin/autoconf: line 505:
> >> /opt/autoconf/x86_64/2.69/bin/autom4te:/opt/autoconf/x86_64/2.69/bi
> >> n/autom4te:: No such file or directory
> automake-1.15: error: autoconf failed with exit status: 127
> WARNING: 'automake-1.15' is missing on your system.
As the error message says, automake is missing. I suppose removing pango also removed automake for whatever reason, or you removed or changed the version of automake while you were removing pango.
I cannot reproduce the original problem right now, but I'm looking at it.
Rich.
--
Richard Jones, Virtualization Group, Red Hat https://clicktime.symantec.com/a/1/RfaWKpJjiitkZvrcQ55iIzI7QAy9m0tPN52hu7Np…
Read my programming and virtualization blog: https://clicktime.symantec.com/a/1/MS_Vt_w0A9fkbbXBBANKg9ZLqDbmOPA-PncG2Xsz…
virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows.
https://clicktime.symantec.com/a/1/PHy2CxdtLV8q_hJJQHgxNWUP1Pzqdx7qHTUIucbB…
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com ______________________________________________________________________
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
3
3
07 Sep '17
$ virt-builder fedora-26
virt-builder: error: failed to download
http://download.opensuse.org/repositories/Virtualization:/virt-builder-imag…:
HTTP status code 500
[...]
You can temporarily disable this repo by doing:
$ mkdir -p ~/.config/virt-builder/repos.d/
$ touch ~/.config/virt-builder/repos.d/opensuse.conf
Keep an eye on https://status.opensuse.org/ . When
download.opensuse.org becomes available again you can just remove the
‘~/.config/virt-builder/repos.d/opensuse.conf’ file to go back to
normal.
Thanks: Pino Toscano for coming up with the incantation above.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
1
0
On Wed, Sep 06, 2017 at 03:55:05PM +0300, Maxim Kozover wrote:
> Hi Richard!
> Tell me, please, is there any chance you have an (unofficial) patch ready
> or almost ready that removes a protocol limit from guestfs_readdir (returns
> a large answer in chunks in a loop etc)?
Yes this is one of the very few remaining APIs which has a
protocol limit.
> I happen to have a need to use libguestfs fuse accessing the directory with
> a million of files in it, the individual files are accessed ok, but the
> directory...
This is a genuine bug. Can you file one?
If you can get away without using fuse (ie. using the API directly)
then a workaround would be to look at how our visitor code works:
https://github.com/libguestfs/libguestfs/blob/master/common/visit/visit.c#L…
where it only uses APIs which are unlimited, eg:
https://github.com/libguestfs/libguestfs/blob/master/lib/file.c#L507
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
1
0