Bug 1378340

Summary: v2v: Extended support for block device
Product: [oVirt] vdsm Reporter: Shahar Havivi <shavivi>
Component: CoreAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: baptiste.agasse, bugs, jcall, jwoods, mavital, michal.skrivanek, nsimsolo
Target Milestone: ovirt-4.1.0-betaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
michal.skrivanek: devel_ack+
mavital: testing_ack+
Target Release: 4.19.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-15 14:55:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1416112    
Bug Blocks:    

Description Shahar Havivi 2016-09-22 08:07:32 UTC
Extended support for block devices for KVM and VMWare.
currently we do support block devices that exported as file in libvirt:
<disk type='file' device='disk'>
  <source file='...'/>
  ...

Added support for type block is needed:
<disk type='block' device='disk'>
  <source dev='/dev/mapper/...'/>
  ...

Comment 1 Shahar Havivi 2017-01-18 08:00:34 UTC
The fix presented a bug when importing from KVM and not supplying username.
As a workaround user can set any arbitrary username and password if the uri doesn't require authentication.
bz #1414256 fix this issue

Comment 2 Nisim Simsolo 2017-02-02 12:52:56 UTC
Verification builds:
ovirt-engine-4.1.0.3-0.1.el7
libvirt-client-2.0.0-10.el7_3.4.x86_64
vdsm-4.19.4-1.el7ev.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
sanlock-3.4.0-1.el7.x86_64

Comment 3 Nisim Simsolo 2017-08-27 11:52:16 UTC
Verification scenario:
1. Edit KVM VM disk using virsh command and change it to block device:
    <disk type='block' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source dev='/var/lib/libvirt/images/nsimsolo_kvm_new /centos_minimal.qcow2'/>
      <target dev='sdb' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
2. From RHV host -> virsh dumpxml this VM and verify disk type='block':
virsh # dumpxml centos_minimal
<domain type='kvm'>
  <name>centos_minimal</name>
  .
  .
  .
  <disk type='block' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source dev='/var/lib/libvirt/images/nsimsolo_kvm_new/centos_minimal.qcow2'/>
      <target dev='sdb' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
3. Browse webadmin -> VMs tab -> import, select above mentioned VM and download it.
4. After download succeeded, run VM and verify VM is running properly.