Bug 1493480 - Failed to import Vm
Summary: Failed to import Vm
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: 4.19.30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.2.0
: ---
Assignee: Dan Kenigsberg
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-20 09:53 UTC by Gabriel
Modified: 2017-09-22 14:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-22 13:43:58 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
vsdm.log (167.86 KB, text/plain)
2017-09-20 09:53 UTC, Gabriel
no flags Details
import.log (89.20 KB, text/plain)
2017-09-21 13:19 UTC, Gabriel
no flags Details

Description Gabriel 2017-09-20 09:53:54 UTC
Created attachment 1328359 [details]
vsdm.log

Description of problem:

I am getting the errors as listed below while importing OVA file:
Add-Disk operation of 'boot.vmdk' was initiated by the system.
Add-Disk operation of 'disk0.vmdk' was initiated by the system.
Starting to import Vm ASAv to Data Center Default, Cluster Default
Starting to convert Vm ASAv
Failed to convert Vm ASAv
VM ASAv was successfully removed.
Failed to import Vm ASAv to Data Center Default, Cluster Default

Version-Release number of selected component (if applicable):
OS Version:
RHEL - 7 - 3.1611.el7.centos
OS Description:
oVirt Node 4.1.6_rc2
Kernel Version:
3.10.0 - 514.26.2.el7.x86_64
KVM Version:
2.6.0 - 28.el7.10.1
LIBVIRT Version:
libvirt-2.0.0-10.el7_3.9
VDSM Version:
vdsm-4.19.30-1.el7.centos
SPICE Version:
0.12.4 - 20.el7_3
GlusterFS Version:
glusterfs-3.8.15-2.el7
CEPH Version:
librbd1-0.94.5-1.el7

How reproducible:
Import OVA file via "Import" option on the "Virtual Machines" tab.

Steps to Reproduce:
1.
2.
3.

Actual results:	
Add-Disk operation of 'boot.vmdk' was initiated by the system.
Add-Disk operation of 'disk0.vmdk' was initiated by the system.
Starting to import Vm ASAv to Data Center Default, Cluster Default
Starting to convert Vm ASAv
Failed to convert Vm ASAv
VM ASAv was successfully removed.
Failed to import Vm ASAv to Data Center Default, Cluster Default

Expected results:


Additional info:

Comment 1 Arik 2017-09-20 11:21:24 UTC
Seems like there was a problem initiating the virt-v2v process. Can you try to invoke 'virt-v2v' from the command line and tell what's the output?

Comment 2 Gabriel 2017-09-20 11:58:10 UTC
Will you be able to give me exact command syntax for that? I am quite new with ovirt.

Comment 3 Arik 2017-09-20 15:34:36 UTC
(In reply to Gabriel from comment #2)
> Will you be able to give me exact command syntax for that? I am quite new
> with ovirt.

Sure, "virt-v2v --help"

Comment 4 Michal Skrivanek 2017-09-20 17:12:05 UTC
Gabriel, are you running oVirt on RHEL hosts? Can you please detail what channels you have configured? Plain RHEL server subscription is not enough to run RHV. For oVirt on RHEL it's also not that straightforward and you do need additional setup (either additional rhv channels or mix up of rhel and centos repos where you'd need to be a bit careful not to conflict with each other)

Comment 5 Gabriel 2017-09-21 11:45:27 UTC
(In reply to Michal Skrivanek from comment #4)
> Gabriel, are you running oVirt on RHEL hosts? Can you please detail what
> channels you have configured? Plain RHEL server subscription is not enough
> to run RHV. For oVirt on RHEL it's also not that straightforward and you do
> need additional setup (either additional rhv channels or mix up of rhel and
> centos repos where you'd need to be a bit careful not to conflict with each
> other)

I'm running oVirt Node.

Comment 6 Michal Skrivanek 2017-09-21 11:52:40 UTC
Ok. Still need to see about proper installation of libguestfs packages, so what's the result of comment #4?

Comment 7 Gabriel 2017-09-21 12:24:02 UTC
Hmmm, isn't that all the stuff should already be in place after oVirt Node installation?

Comment 8 Gabriel 2017-09-21 13:16:38 UTC
(In reply to Arik from comment #3)
> (In reply to Gabriel from comment #2)
> > Will you be able to give me exact command syntax for that? I am quite new
> > with ovirt.
> 
> Sure, "virt-v2v --help"

I tried it but got "virt-v2v: error: libguestfs error: could not connect to libvirt (URI = 
qemu:///system): authentication failed: authentication failed [code=45 
int1=-1]"

I used root credentials but seems it does not like it.

[root@ovirtnode01 tmp]# virt-v2v -i ova asav944-12.ova -o local -of qcow2 -os /tmp/
[   0,0] Opening the source -i ova asav944-12.ova
virt-v2v: warning: making OVA directory public readable to work around 
libvirt bug https://bugzilla.redhat.com/1045069
[   0,8] Creating an overlay to protect the source from being modified
[   1,8] Initializing the target -o local -os /tmp/
[   1,8] Opening the overlay
libvirt needs authentication to connect to libvirt URI qemu:///system
(see also: http://libvirt.org/auth.html http://libvirt.org/uri.html)
Please enter your authentication name: ^C
[root@ovirtnode01 tmp]# virt-v2v -v -i ova asav944-12.ova -o local -of qcow2 -os /tmp/
[root@ovirtnode01 tmp]# virt-v2v -v -i ova asav944-12.ova -o local -of qcow2 -os /tmp/
virt-v2v: libguestfs 1.36.3rhel=7,release=6.el7_4.3,libvirt (x86_64)
libvirt version: 3.2.0
[   0,0] Opening the source -i ova asav944-12.ova
qemu-img info json:'{ "file": { "driver": "raw", "offset": 512, "size": 512, "file": { "filename": "/tmp/v2vqemuimgtstfbd0aa.img" } } }' >/dev/null
qemu-img supports "offset" and "size" in json URLs: true
libvirt supports  "raw" driver in json URL: true
tar -tf 'asav944-12.ova'
tar '-xf' 'asav944-12.ova' '-C' '/var/tmp/ova.iFZ2wJ' 'desmo.ovf' 'desmo.mf'
virt-v2v: warning: making OVA directory public readable to work around 
libvirt bug https://bugzilla.redhat.com/1045069
chmod '-R' 'go=u,go-w' '/var/tmp/ova.iFZ2wJ' 'asav944-12.ova'
processing manifest /var/tmp/ova.iFZ2wJ/desmo.mf
tar xOf 'asav944-12.ova' 'desmo.ovf' | sha1sum
tar xOf 'asav944-12.ova' 'disk0.vmdk' | sha1sum
tar xOf 'asav944-12.ova' 'boot.vmdk' | sha1sum
tar tRvf 'asav944-12.ova'
json: json:{ "file": { "driver": "raw", "offset": 57856, "size": 151319040, "file": { "driver": "file", "filename": "/tmp/asav944-12.ova" } } }
tar tRvf 'asav944-12.ova'
json: json:{ "file": { "driver": "raw", "offset": 151377408, "size": 1123328, "file": { "driver": "file", "filename": "/tmp/asav944-12.ova" } } }
    source name: ASAv
hypervisor type: vmware
         memory: 2147483648 (bytes)
       nr vCPUs: 1
   CPU features: 
       firmware: bios
        display: 
          video: 
          sound: 
disks:
	json:{ "file": { "driver": "raw", "offset": 57856, "size": 151319040, "file": { "driver": "file", "filename": "/tmp/asav944-12.ova" } } } (vmdk) [scsi]
	json:{ "file": { "driver": "raw", "offset": 151377408, "size": 1123328, "file": { "driver": "file", "filename": "/tmp/asav944-12.ova" } } } (vmdk) [scsi]
removable media:
	CD-ROM [ide] in slot 0
NICs:
	Network "Network adapter 1"
	Network "Network adapter 2"
	Network "Network adapter 3"
	Network "Network adapter 4"
	Network "Network adapter 5"
	Network "Network adapter 6"
	Network "Network adapter 7"
	Network "Network adapter 8"
	Network "Network adapter 9"
	Network "Network adapter 10"

check_host_free_space: overlay_dir=/var/tmp free_space=14356975616
[   0,8] Creating an overlay to protect the source from being modified
qemu-img 'create' '-q' '-f' 'qcow2' '-b' 'json:{ "file": { "driver": "raw", "offset": 57856, "size": 151319040, "file": { "driver": "file", "filename": "/tmp/asav944-12.ova" } } }' '-o' 'compat=1.1,backing_fmt=vmdk' '/var/tmp/v2vovl757bc9.qcow2'
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/4
libguestfs: parse_json: qemu-img info JSON output:\n{\n    "backing-filename-format": "vmdk",\n    "virtual-size": 268435456,\n    "filename": "/dev/fd/4",\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\": { \"driver\": \"raw\", \"offset\": 57856, \"size\": 151319040, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "backing-filename": "json:{ \"file\": { \"driver\": \"raw\", \"offset\": 57856, \"size\": 151319040, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "dirty-flag": false\n}\n\n
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/4
libguestfs: parse_json: qemu-img info JSON output:\n{\n    "backing-filename-format": "vmdk",\n    "virtual-size": 268435456,\n    "filename": "/dev/fd/4",\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\": { \"driver\": \"raw\", \"offset\": 57856, \"size\": 151319040, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "backing-filename": "json:{ \"file\": { \"driver\": \"raw\", \"offset\": 57856, \"size\": 151319040, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "dirty-flag": false\n}\n\n
qemu-img 'create' '-q' '-f' 'qcow2' '-b' 'json:{ "file": { "driver": "raw", "offset": 151377408, "size": 1123328, "file": { "driver": "file", "filename": "/tmp/asav944-12.ova" } } }' '-o' 'compat=1.1,backing_fmt=vmdk' '/var/tmp/v2vovl031a13.qcow2'
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/4
libguestfs: parse_json: qemu-img info JSON output:\n{\n    "backing-filename-format": "vmdk",\n    "virtual-size": 8589934592,\n    "filename": "/dev/fd/4",\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\": { \"driver\": \"raw\", \"offset\": 151377408, \"size\": 1123328, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "backing-filename": "json:{ \"file\": { \"driver\": \"raw\", \"offset\": 151377408, \"size\": 1123328, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "dirty-flag": false\n}\n\n
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /dev/fd/4
libguestfs: parse_json: qemu-img info JSON output:\n{\n    "backing-filename-format": "vmdk",\n    "virtual-size": 8589934592,\n    "filename": "/dev/fd/4",\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\": { \"driver\": \"raw\", \"offset\": 151377408, \"size\": 1123328, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "backing-filename": "json:{ \"file\": { \"driver\": \"raw\", \"offset\": 151377408, \"size\": 1123328, \"file\": { \"driver\": \"file\", \"filename\": \"/tmp/asav944-12.ova\" } } }",\n    "dirty-flag": false\n}\n\n
[   1,7] Initializing the target -o local -os /tmp/
[   1,7] Opening the overlay
libguestfs: launch: program=virt-v2v
libguestfs: launch: identifier=v2v
libguestfs: launch: version=1.36.3rhel=7,release=6.el7_4.3,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/libguestfsW0oxHH
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: libvirt version = 3002000 (3.2.0)
libguestfs: guest random name = guestfs-4877rt4wu8v40ido
libguestfs: connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libvirt needs authentication to connect to libvirt URI qemu:///system
(see also: http://libvirt.org/auth.html http://libvirt.org/uri.html)
Please enter your authentication name: root
Please enter your password: 
libvirt: XML-RPC error : authentication failed: authentication failed
virt-v2v: error: libguestfs error: could not connect to libvirt (URI = 
qemu:///system): authentication failed: authentication failed [code=45 
int1=-1]

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]
rm -rf '/var/tmp/ova.iFZ2wJ'
rm -rf '/var/tmp/null.s8v3MO'
libguestfs: closing guestfs handle 0x2640660 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsW0oxHH
libguestfs: closing guestfs handle 0x263fb90 (state 0)
libguestfs: closing guestfs handle 0x263fe90 (state 0)
libguestfs: closing guestfs handle 0x263d430 (state 0)
libguestfs: closing guestfs handle 0x263ae80 (state 0)
libguestfs: closing guestfs handle 0x25e1ea0 (state 0)
libguestfs: closing guestfs handle 0x25d0af0 (state 0)
libguestfs: closing guestfs handle 0x25bf740 (state 0)

Comment 9 Gabriel 2017-09-21 13:19:43 UTC
Created attachment 1329001 [details]
import.log

import.log

Comment 10 Michal Skrivanek 2017-09-22 05:42:23 UTC
It's bot using root credentials indeed. But the import.log does contain useful information. See error at the end - it cannot detect the guest OS. What are you running inside the VM you are trying to convert?

Comment 12 Michal Skrivanek 2017-09-22 13:43:58 UTC
I'm afraid that OS is not supported by virt-v2v. You may have luck with importing a qcow disk with that OS and just create oVirt VM from scratch and attach it
If the aource is not qcow or you have troubles converting the disk then you'd need to try to install the whole guest from scratch

Hope it helps, but we can't really do much else in oVirt

Comment 13 Gabriel 2017-09-22 14:04:05 UTC
Will try and let you now.

Thanks!


Note You need to log in before you can comment on or make changes to this bug.