Bug 1089833

Summary: option `cpus="0-3"` works well when you specify it in a configure file, but it give a error feadback when you add it to the command line
Product: [Fedora] Fedora Reporter: Lingfei Kong <lkong>
Component: xenAssignee: Michael Young <m.a.young>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 20CC: bfan, drjones, jforbes, kraxel, leiwang, lkong, m.a.young, virt-maint, vkuznets, wshi, yuliu, zhenwang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-23 20:58:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log file /var/log/xen/xl-${DOMNAME}.log none

Description Lingfei Kong 2014-04-22 04:23:36 UTC
Created attachment 888342 [details]
Log file /var/log/xen/xl-${DOMNAME}.log

Description of problem:
option `cpus="0-3"` works well when you specify it in a configure file, but it
give a error feadback when you add it to the command line.


Version-Release number of selected component (if applicable):
xen-4.3.2-2.fc20
kernel-3.11.10-301.fc20


How reproducible:
100%


Steps to Reproduce:
1. Install a host with xen4
2. Create a guest, add option 'cpus="0-3"' on the command line
# xl -v create hvm-7.0-64-1.cfg cpus="0-3"
Parsing config from hvm-7.0-64-1.cfg
hvm-7.0-64-1.cfg:28: config parsing error near `-3': lexical error
warning: Config file looks like it contains Python code.
warning:  Arbitrary Python is no longer supported.
warning:  See http://wiki.xen.org/wiki/PythonInXlConfig
Failed to parse config: Invalid argument


Actual results:
Failed to create the guest


Expected results:
Guest can be created successfully.

Additional info:
# xl info
host                   : hp-z220-02.qe.lab.eng.nay.redhat.com
release                : 3.11.10-301.fc20.x86_64
version                : #1 SMP Thu Dec 5 14:01:17 UTC 2013
machine                : x86_64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 2
cpu_mhz                : 3392
hw_caps                :
bfebfbff:28100800:00000000:00007f00:77bae3ff:00000000:00000001:00000281
virt_caps              : hvm hvm_directio
total_memory           : 16258
free_memory            : 10185
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 3
xen_extra              : .2
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : 
xen_commandline        : placeholder
cc_compiler            : gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)
cc_compile_by          : mockbuild
cc_compile_domain      : [unknown]
cc_compile_date        : Wed Mar 26 20:46:37 UTC 2014
xend_config_format     : 4

Comment 1 Michael Young 2014-04-23 20:58:19 UTC
As explained here
http://lists.xen.org/archives/html/xen-devel/2014-04/msg03018.html
you need to rephrase your command so that the shell passes on the quotes to the xl command.