Skip to contentSkip to conversation

`xl create` can not parse `disk = ['target=/tmp/disk.img, vdev=xvdb']`

DISCUSSION Zhigang Wang 2 participants 5 messages May 16, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

xl create cannot parse::

    disk = ['target=/tmp/disk.img,vdev=xvdb']

Error::

    # xl create vm.cfg 
    Parsing config from vm.cfg
    vm.cfg: config parsing error in disk specification: no vdev specified in `target=/tmp/disk.img,vdev=xvdb'

But can parse::

    disk = ['vdev=xvdb,target=/tmp/disk.img']

Is this a bug?

Thanks,

Zhigang

#1 lore raw
Quoted 12 lines · Zhigang Wang

Hi,

xl create cannot parse::

    disk = ['target=/tmp/disk.img,vdev=xvdb']

Error::

    # xl create vm.cfg 
    Parsing config from vm.cfg
    vm.cfg: config parsing error in disk specification: no vdev specified in `target=/tmp/disk.img,vdev=xvdb'
Quoted 5 lines

But can parse::

    disk = ['vdev=xvdb,target=/tmp/disk.img']

Is this a bug?

No, it is expected, check the docs for the disk format strings.

(User questions should go to xen-users@)

Ian.

#2 lore raw
Quoted 15 lines · Ian Campbell
Quoted 14 lines · Zhigang Wang

Hi,

xl create cannot parse::

    disk = ['target=/tmp/disk.img,vdev=xvdb']

Error::

    # xl create vm.cfg 
    Parsing config from vm.cfg
    vm.cfg: config parsing error in disk specification: no vdev specified in `target=/tmp/disk.img,vdev=xvdb'

But can parse::

Quoted 7 lines
Quoted 3 lines
    disk = ['vdev=xvdb,target=/tmp/disk.img']

Is this a bug?

No, it is expected, check the docs for the disk format strings.

(User questions should go to xen-users@)

Thanks for your answer.

I checked: http://xenbits.xen.org/docs/4.4-testing/misc/xl-disk-configuration.txt

And I think here is what you referred to:

    where each diskspec is in this form:
        
       [<key>=<value>|<flag>,]*,
         [<target>, [<format>, [<vdev>, [<access>]]]],
         [<key>=<value>|<flag>,]*
         [target=<target>]

That means disk positional parameter also has orders. I missed this point before.

Thanks,

Zhigang

#3 lore raw
Quoted 30 lines · Zhigang Wang
Quoted 15 lines · Ian Campbell
Quoted 14 lines · Zhigang Wang

Hi,

xl create cannot parse::

    disk = ['target=/tmp/disk.img,vdev=xvdb']

Error::

    # xl create vm.cfg 
    Parsing config from vm.cfg
    vm.cfg: config parsing error in disk specification: no vdev specified in `target=/tmp/disk.img,vdev=xvdb'

But can parse::

Quoted 7 lines
Quoted 3 lines
    disk = ['vdev=xvdb,target=/tmp/disk.img']

Is this a bug?

No, it is expected, check the docs for the disk format strings.

(User questions should go to xen-users@)

Thanks for your answer.

I checked: http://xenbits.xen.org/docs/4.4-testing/misc/xl-disk-configuration.txt

And I think here is what you referred to:

Quoted 8 lines
    where each diskspec is in this form:
        
       [<key>=<value>|<flag>,]*,
         [<target>, [<format>, [<vdev>, [<access>]]]],
         [<key>=<value>|<flag>,]*
         [target=<target>]

That means disk positional parameter also has orders.

Well, yes, that's what positional means.

Quoted 1 line

I missed this point before.

More importantly you are apparently still missing:

When this parameter is specified by name, ie with the "target="
syntax in the configuration file, it consumes the whole rest of the <diskspec> including trailing whitespaces. Therefore in that case it must come last

Ian.

#4 lore raw
Quoted 44 lines · Ian Campbell
Quoted 30 lines · Zhigang Wang
Quoted 15 lines · Ian Campbell
Quoted 14 lines · Zhigang Wang

Hi,

xl create cannot parse::

    disk = ['target=/tmp/disk.img,vdev=xvdb']

Error::

    # xl create vm.cfg 
    Parsing config from vm.cfg
    vm.cfg: config parsing error in disk specification: no vdev specified in `target=/tmp/disk.img,vdev=xvdb'

But can parse::

Quoted 7 lines
Quoted 3 lines
    disk = ['vdev=xvdb,target=/tmp/disk.img']

Is this a bug?

No, it is expected, check the docs for the disk format strings.

(User questions should go to xen-users@)

Thanks for your answer.

I checked: http://xenbits.xen.org/docs/4.4-testing/misc/xl-disk-configuration.txt

And I think here is what you referred to:

Quoted 8 lines
    where each diskspec is in this form:
        
       [<key>=<value>|<flag>,]*,
         [<target>, [<format>, [<vdev>, [<access>]]]],
         [<key>=<value>|<flag>,]*
         [target=<target>]

That means disk positional parameter also has orders.

Well, yes, that's what positional means.

Quoted 1 line

I missed this point before.

Quoted 8 lines

More importantly you are apparently still missing:

When this parameter is specified by name, ie with the "target="
syntax in the configuration file, it consumes the whole rest of the <diskspec> including trailing whitespaces. Therefore in that case it must come last

Ian.

Sorry. Will read more carefully next time.

Zhigang