[Kimchi-devel] [PATCH 0/2] Fix attaching iscsi storage volume

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed Aug 27 19:27:09 UTC 2014


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:

 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 at linux.vnet.ibm.com wrote:
> From: Royce Lv <lvroyce at 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(-)
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20140827/1ea5d177/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2014-08-27 15:51:56.png
Type: image/png
Size: 36321 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20140827/1ea5d177/attachment.png>


More information about the Kimchi-devel mailing list