On 08/27/2014 04:27 PM, Rodrigo Trujillo wrote:
Hi, I tested the patches and they worked when I tried to attach a new iscsi LUN

See screenshot attached:
- vda is an iSCSI LUN unit:0:0:2 added to vm during its creation - it is a disk of type VOLUME
    * NOTICE that path is different because I am using the patch I wrote and sent in "[Kimchi-devel] [PATCH] Fix guest
      disk return when disk is a iscsi volume" . Otherwise, the path would be blank
- vdb is an iSCSI LUN unit:0:0:1 added using this patch from Royce

Problem is that disks based on iSCSI LUNs are being created differently, generating diferent XMLs. See:

I've just sent a patch to fix this problem and make the volume XML the same in both cases.
Check: [Kimchi-devel] [PATCH] Update iSCSI volume XML when creating a VM from an iSCSI pool


  1.     <disk type='volume' device='disk'>
  2.       <driver name='qemu' type='raw'/>
  3.       <source pool='TEST-ISCSI1' volume='unit:0:0:2' mode='host'/>
  4.       <target dev='vda' bus='virtio'/>
  5.       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
  6.     </disk>
  7.     <disk type='block' device='disk'>
  8.       <driver name='qemu' type='raw'/>
  9.       <source dev='/dev/disk/by-id/wwn-0x60000000000000000e00000000010001'/>
  10.       <target dev='vdb' bus='virtio'/>
  11.       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
  12.     </disk>
  13.     <disk type='network' device='cdrom'>
  14.       <driver name='qemu' type='raw'/>
  15.       <source protocol='http' name='/pub/fedora/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso'>
  16.         <host name='204.246.0.137' port='80'/>
  17.       </source>
  18.       <target dev='hdc' bus='ide'/>
  19.       <readonly/>
  20.       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
  21.     </disk>

So, we need to agree about which xml type are we going to use when attaching an iSCSI Lun: VOLUME or BLOCK ?
Once decided, implement similarly when creating VM and when attaching new storage.
Then fix the UI if needed.

Regards

Rodrigo Trujillo


On 08/26/2014 06:50 AM, lvroyce@linux.vnet.ibm.com wrote:
From: Royce Lv <lvroyce@linux.vnet.ibm.com>

Iscsi volume fails to attach to vm because of its path is rejected
by previous cdrom validate logic,
and type 'unknown' forms wrong vm xml
This patchset fix the above bugs and form right vm xml in order to
start vm.

Royce Lv (2):
  Guest storage: Fix attaching type judgement
  Guest storage: fix volume format overwrite

 src/kimchi/model/vmstorages.py | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)




_______________________________________________
Kimchi-devel mailing list
Kimchi-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel