Bug 1446150 - virt-v2v can not convert vmWare guest to KVM
Summary: virt-v2v can not convert vmWare guest to KVM
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-27 10:34 UTC by wangyuehui
Modified: 2017-07-18 05:55 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-18 05:55:03 UTC
Embargoed:


Attachments (Terms of Use)
'virt-v2v -v -x ... >& log' (70.23 KB, text/plain)
2017-04-27 10:34 UTC, wangyuehui
no flags Details

Description wangyuehui 2017-04-27 10:34:45 UTC
Created attachment 1274569 [details]
'virt-v2v -v -x ... >& log'

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.use the "Export OVF Template" option on vSphere to export the OVA file to windows
2.cp OVA file to centos7
3.virt-v2v  -i ova iSwitch3.ova -o local -of qcow2 -os /home/vmware/ 

Actual results:
virt-v2v  -i ova iSwitch3.ova -o local -of qcow2 -os /home/vmware/ 
[   0.0] Opening the source -i ova iSwitch3.ova
[   0.1] Creating an overlay to protect the source from being modified
[   0.4] Initializing the target -o local -os /home/vmware/
[   0.4] Opening the overlay
[  20.9] Inspecting the overlay
virt-v2v: error: inspection could not detect the source guest (or physical 
machine).

Assuming that you are running virt-v2v/virt-p2v on a source which is 
supported (and not, for example, a blank disk), then this should not 
happen.  You should run 'virt-v2v -v -x ... >& log' and attach the complete 
log to a new bug report (see http://libguestfs.org).

No root device found in this operating system image.

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

  virt-v2v -v -x [...]
Expected results:
virt-v2v -i ova VM.ova -o local -os /var/tmp

Additional info:
[root@wang vmware]# virt-v2v --version
virt-v2v 1.32.7rhel=7,release=3.el7.centos.2,libvirt

Comment 1 Richard W.M. Jones 2017-04-27 11:04:50 UTC
The version of qemu you are running (1.5) cannot parse the VMDK
file inside the OVA, and just thinks it's a blank disk.

Assuming it's not a blank disk, you need to use qemu-kvm-rhev.

Comment 2 Richard W.M. Jones 2017-04-27 11:06:35 UTC
Or qemu-kvm-ev on CentOS.

Comment 3 Richard W.M. Jones 2017-04-27 11:12:22 UTC
OK, the above is nonsense.  What's happening is that we see a single
ext2 partition on the disk, but inside that partition there's nothing
recognizable as an operating system.

What are you trying to convert?

Comment 4 wangyuehui 2017-05-02 02:49:10 UTC
The filesystem is EXT4 as it showing:

[root@Linux ~]#mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/sda1 on /boot type ext4 (rw,sync,noatime)
127.11.254.1:/exports on /mnt/sv type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=70,retrans=3,sec=sys,local_lock=all,addr=127.11.254.1)
[root@Linux ~]# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   120.8M         0    120.8M   0% /dev/shm
tmpfs                   120.8M     48.0K    120.8M   0% /tmp
/dev/sda1                96.8M     27.3M     64.5M  30% /boot
127.11.254.1:/exports
                         31.5G      4.3G     25.6G  14% /mnt/sv

Comment 5 wangyuehui 2017-05-02 03:01:33 UTC
(In reply to Richard W.M. Jones from comment #3)
> OK, the above is nonsense.  What's happening is that we see a single
> ext2 partition on the disk, but inside that partition there's nothing
> recognizable as an operating system.
> 
> What are you trying to convert?
Hi, Richard,
The VMware vm'os is used for our internal product, may be it has been changed.
And as the last meesage shows, it is mounted as EXT4, how can virt-v2v detect is as EXT2? And what can I do when it is regarded as EXT2 by virt-v2v ? I am trying to convert the Vmware vm to KVM vm.

Comment 6 Pino Toscano 2017-05-02 08:53:38 UTC
(In reply to wangyuehui from comment #4)
> The filesystem is EXT4 as it showing:
> 
> [root@Linux ~]#mount
> rootfs on / type rootfs (rw)
> proc on /proc type proc (rw,relatime)
> sysfs on /sys type sysfs (rw,relatime)
> devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
> tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
> tmpfs on /tmp type tmpfs (rw,relatime)
> /dev/sda1 on /boot type ext4 (rw,sync,noatime)
> 127.11.254.1:/exports on /mnt/sv type nfs
> (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,nolock,proto=tcp,
> port=2049,timeo=70,retrans=3,sec=sys,local_lock=all,addr=127.11.254.1)
> [root@Linux ~]# df -h
> Filesystem                Size      Used Available Use% Mounted on
> tmpfs                   120.8M         0    120.8M   0% /dev/shm
> tmpfs                   120.8M     48.0K    120.8M   0% /tmp
> /dev/sda1                96.8M     27.3M     64.5M  30% /boot
> 127.11.254.1:/exports
>                          31.5G      4.3G     25.6G  14% /mnt/sv

Is this run in the booted guest, i.e. the one you are trying to convert?
The ext4 partition is for /boot, not for / -- how are the partitions & mount points of the guest structured? Is it run from a initramfs?

Comment 7 Richard W.M. Jones 2017-05-02 09:52:45 UTC
Essentially virt-v2v only converts recognized guests.  For the
upstream version that list is here:

http://libguestfs.org/virt-v2v.1.html#guests

Other kinds of guests cannot be converted by virt-v2v unless
support for them is added.


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