[Kimchi-devel] [PATCH] Fix create vm disk params

Royce Lv lvroyce at linux.vnet.ibm.com
Fri Jul 4 02:38:37 UTC 2014


On 2014年07月02日 20:36, Sheldon wrote:
> See inline comments below.
>
> On 07/01/2014 05:43 PM, lvroyce at linux.vnet.ibm.com wrote:
>> From: Royce Lv <lvroyce at linux.vnet.ibm.com>
>>
>> When creating vm on SCSI/iSCSI pools, volume needs to be specified.
>> API.md and doc need to be updated.
>>
>> Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
>> ---
>>   docs/API.md         | 1 +
>>   src/kimchi/API.json | 6 ++++++
>>   2 files changed, 7 insertions(+)
>>
>> diff --git a/docs/API.md b/docs/API.md
>> index 4f51dd0..7a3076b 100644
>> --- a/docs/API.md
>> +++ b/docs/API.md
>> @@ -183,6 +183,7 @@ Represents a snapshot of the Virtual Machine's 
>> primary monitor.
>>         (either *size* or *volume* must be specified):
>>           * index: The device index
>>           * size: The device size in GB
>> +        * volume: LUN of SCSI or iSCSI storage.
> please check the commit: 279a710
> In 279a710, we remove the volume, for we do not support create a vm 
> from a volume.
>
> I'd like to say, the volume should not only be LUN, but also can be 
> others.
> The original idea is that we can create a vm from any valid volume.
We originally planned to use volume as existed volume (volume with 
content)-- as we discussed in create vm from img,
but as which is introduced in SCSI/iSCSI features, as SCSI pool can just 
pick a empty volume instead of creating volumes, we must assgin this in 
advance.
So this fix is dedicate for this feature.

For creating vm form image, we will use a new parameter "base_volume" 
instead of "volume".

In this case "volume" only present data disk, and with "iso" image or 
"base_volume" the system will be installed.
>
> You can cherry-pick the patch.
>
> Also update the testcase and validate_integrity.
ACK.
>
>
>>
>>       * graphics *(optional)*: The graphics paramenters of this template
>>           * type: The type of graphics. It can be VNC or spice or None.
>> diff --git a/src/kimchi/API.json b/src/kimchi/API.json
>> index 6d1324c..ea1eb61 100644
>> --- a/src/kimchi/API.json
>> +++ b/src/kimchi/API.json
>> @@ -381,7 +381,13 @@
>>                                   "type": "number",
>>                                   "minimum": 1,
>>                                   "error": "KCHTMPL0022E"
>> +                            },
>> +                            "volume": {
>> +                                "description": "LUN of SCSI or iSCSI 
>> storage",
>> +                                "type": "string",
>> +                                "minLength": 1
>>                               }
>> +
>>                           }
>>                       },
>>                       "minItems": 1,
>
>




More information about the Kimchi-devel mailing list