WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Error creating domain - int argument required

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] Error creating domain - int argument required
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Thu, 22 Sep 2005 17:54:14 +0800
Cc: Kip Macy <kip.macy@xxxxxxxxx>, David F Barrera <dfbp@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ewan Mellor <ewan@xxxxxxxxxxxxx>, Ignatia Suwarna <isuwarna@xxxxxxxxx>
Delivery-date: Thu, 22 Sep 2005 09:52:05 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcW/DbxpRAyOGXy0SPWJrUZjPe18fQATQBDA
Thread-topic: [Xen-devel] Error creating domain - int argument required
this patch fixes the bug that when "cpu" is not set in config file, control panel complains "Error creating domain - int argument required".
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
 
-Xin
 
diff -r a32ee93b3b33 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Sep 21 22:41:34 2005
+++ b/tools/python/xen/xend/image.py    Thu Sep 22 17:46:05 2005
@@ -155,6 +155,8 @@
         if dom <= 0:
             raise VmError('Creating domain failed: name=%s' %
                           self.vm.getName())
+        if cpu is None:
+            cpu = -1;
         log.debug("initDomain: cpu=%d mem_kb=%d ssidref=%d dom=%d", cpu, mem_kb, ssidref, dom)
         xc.domain_setcpuweight(dom, cpu_weight)
         xc.domain_setmaxmem(dom, mem_kb)


From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Kip Macy
Sent: 2005年9月22日 8:36
To: Ewan Mellor
Cc: David F Barrera; xen-devel; Ignatia Suwarna
Subject: Re: [Xen-devel] Error creating domain - int argument required

I found the problem. Your changes to the parsing code earlier today made it less tolerant of unset values where you're expecting a type. Adding cpu=-1 to the command line made the complaints go away.

On line 221 in XendDomainInfo.py you may want to change
        result['cpu']          = get_cfg('cpu',        int)
to
        result['cpu']          = get_cfg('cpu')
and then change the current behaviour for -1 to handle None.

              -Kip

On 9/21/05, Ewan Mellor <ewan@xxxxxxxxxxxxx> wrote:
On Wed, Sep 21, 2005 at 02:54:27PM -0500, David F Barrera wrote:

> On Wed, 2005-09-21 at 12:14 -0700, Ignatia Suwarna wrote:
> > Here is my domU config:
> > kernel="/boot/vmlinuz-2.6.12-1.1447_FC4xenU "
> > memory=64
> > name="rawhide"
> > nics=1
> > disk=['file:/root/fedora.img, sda1, w']
> > root="/dev/sda1"
> > extra="rp selinux=0 3"
> >
> > I also started over with hda1, since there is /dev/hda1, but it gave
> > the same error:
> > Error creating domain, int required.
> >
> > Is this a known issue? Or something wrong with my config??
>
> I think it is a bug. I am seeing this problem, too, using the latest hg
> pull, changeset 6987. I have opened up a bugzilla report on it, #246.
>
> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=246
>
> x335b:/tmp/xen # xm create -c vm1.cfg
> Using config file "vm1.cfg".
> Error: Error creating domain: int argument required
> x335b:/tmp/xen #

Do you have anything useful in /var/log/xend-debug.log?  Type errors like this
usually appear there.

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

Attachment: fix_cpu.patch
Description: fix_cpu.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel