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] Help on domain creation

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Help on domain creation
From: Ning Wu <ningwu@xxxxxxxxxxxxxx>
Date: Tue, 21 Oct 2003 21:00:26 -0400 (EDT)
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, <steven.hand@xxxxxxxxxxxx>, Xen develop mailing list <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 22 Oct 2003 02:01:04 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: <E1AC3aa-0004jY-00@xxxxxxxxxxxxxxxxxxxx>
Hi,

It is caused by the memory parameter. I lowered the domain1 memory to 32M
and it seems succeeded now. I haven't been able to connect to it. But
that's a different problem. When I try to create domain2 with 16384k, the
problem appears again.

This is the memory parameters I use:
My total physical mem = 128M
domain 0 = 64M
domain 1 = 32M

I knew I can't use 100% of physical memory. Learned that a few days ago
when creating domain0. So I choose to create domain 2 with 16M, and it failed.

64 + 32 + 16 = 112 < 128

It should let me create it. Is there a bug?

[root@oscan18 root]# xenctl script -f/etc/xen-mynewdom
Domain defaults:
   name            XenoLinux2
   size            16384
   vifs            1
   domainImage     /boot/xenolinux.gz
   domainInitRD    null
   rootDevice      /dev/hda5
   rootArgs        rw
   usrDevice       null
   NWIP            169.254.1.0+
   NWGW            169.254.1.0
   NWMask          255.255.0.0
   MaxDomainNumber 1000
   NWNFSServer     169.254.1.0
   NWNFSRoot       null
   XIToolsDir      /usr/local/bin/
   args            init=/linuxrc 4 DOMID=+
Failed to create domain using: /usr/local/bin/xi_create 16384 XenoLinux2
[root@oscan18 root]# xenctl domain list
id: 0 (Domain-0)
  processor: 0
  has cpu: true
  state: 0 running
  mcu advance: 10
  total pages: 16383
id: 1 (XenoLinux2)
  processor: 0
  has cpu: false
  state: 8 suspended
  mcu advance: 10
  total pages: 8192

Then I tried to use 8M for domain2, it succeed.

Yesterday I used domain0=96M and domain1=16M and it also failed.
96+16=112 < 128M

Anyone else has experience on this?


Thanks all for your help!

sincerely,

Ning









On Tue, 21 Oct 2003, Ian Pratt wrote:

>
> > I did run it as root on domain0. The program calls ioctl(,SNDCTL...) and
> > denied access. ??????  What does it do with sound device? The error
> > returned for xi_phys_grant is "invalid argument".
>
> Things have already gone wrong with the xi_build -- let's solve
> that first.
>
> Does /proc/xen exist?
>
> Are you sure you have 98MB of memory free for the new domain?
>
> Thanks,
> Ian
>
>
> > Any ideas?
> >
> > Here is a more complete log:
> > [root@oscan18 root]# id
> > uid=0(root) gid=0(root)
> > groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
> > [root@oscan18 root]# xi_create 98304 XenoLinux
> > ERROR: Error when executing privileged control ioctl (1 = Operation not
> > permitted)
> > [root@oscan18 root]# strace xi_create 98304 XenoLinux
> > execve("/usr/local/bin/xi_create", ["xi_create", "98304", "XenoLinux"],
> > [/* 35 vars */]) = 0
> > uname({sys="Linux", node="oscan18", ...}) = 0
> > brk(0)                                  = 0x8049b7c
> > open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
> > directory)
> > open("/etc/ld.so.cache", O_RDONLY)      = 3
> > fstat64(3, {st_mode=S_IFREG|0644, st_size=13466, ...}) = 0
> > old_mmap(NULL, 13466, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
> > close(3)                                = 0
> > open("/lib/i686/libc.so.6", O_RDONLY)   = 3
> > read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`u\1B4\0"...,
> > 1024) = 1024
> > fstat64(3, {st_mode=S_IFREG|0755, st_size=1401027, ...}) = 0
> > old_mmap(0x42000000, 1264928, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> > 0x42000000
> > mprotect(0x4212c000, 36128, PROT_NONE)  = 0
> > old_mmap(0x4212c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> > 3, 0x12c000) = 0x4212c000
> > old_mmap(0x42131000, 15648, PROT_READ|PROT_WRITE,
> > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42131000
> > close(3)                                = 0
> > munmap(0x40014000, 13466)               = 0
> > brk(0)                                  = 0x8049b7c
> > brk(0x8049bac)                          = 0x8049bac
> > brk(0x804a000)                          = 0x804a000
> > mlock(0xbffff500, 13466)                = 0
> > open("/proc/xeno/privcmd", O_RDWR)      = 3
> > ioctl(3, SNDCTL_DSP_RESET, 0xbffff4e0)  = -1 EPERM (Operation not
> > permitted)
> > write(2, "ERROR: Error when executing priv"..., 83ERROR: Error when
> > executing privileged control ioctl (1 = Operation not permitted)
> > ) = 83
> > close(3)                                = 0
> > munlock(0xbffff500, 292)                = 0
> > _exit(1)                                = ?
> > [root@oscan18 root]# strace /usr/local/bin/xi_phys_grant rw 1 768 48258
> > 29961162 5
> > execve("/usr/local/bin/xi_phys_grant", ["/usr/local/bin/xi_phys_grant",
> > "rw", "1", "768", "48258", "29961162", "5"], [/* 35 vars */]) = 0
> > uname({sys="Linux", node="oscan18", ...}) = 0
> > brk(0)                                  = 0x8049b40
> > open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
> > directory)
> > open("/etc/ld.so.cache", O_RDONLY)      = 3
> > fstat64(3, {st_mode=S_IFREG|0644, st_size=13466, ...}) = 0
> > old_mmap(NULL, 13466, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
> > close(3)                                = 0
> > open("/lib/i686/libc.so.6", O_RDONLY)   = 3
> > read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`u\1B4\0"...,
> > 1024) = 1024
> > fstat64(3, {st_mode=S_IFREG|0755, st_size=1401027, ...}) = 0
> > old_mmap(0x42000000, 1264928, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> > 0x42000000
> > mprotect(0x4212c000, 36128, PROT_NONE)  = 0
> > old_mmap(0x4212c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> > 3, 0x12c000) = 0x4212c000
> > old_mmap(0x42131000, 15648, PROT_READ|PROT_WRITE,
> > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42131000
> > close(3)                                = 0
> > munmap(0x40014000, 13466)               = 0
> > brk(0)                                  = 0x8049b40
> > brk(0x8049b70)                          = 0x8049b70
> > brk(0x804a000)                          = 0x804a000
> > open("/proc/xeno/privcmd", O_RDWR)      = 3
> > ioctl(3, SOUND_PCM_READ_RATE, 0x300)    = 4096
> > close(3)                                = 0
> > open("/proc/xeno/privcmd", O_RDWR)      = 3
> > ioctl(3, SNDCTL_DSP_SYNC, 0xbffff610)   = -1 EINVAL (Invalid argument)
> > write(2, "ERROR: Error when executing priv"..., 77ERROR: Error when
> > executing privileged control ioctl (22 = Invalid argument)
> > ) = 77
> > close(3)                                = 0
> > _exit(1)                                = ?
> > [root@oscan18 root]# uname -a
> > Linux oscan18 2.4.22-xeno #2 Mon Oct 20 16:58:44 EDT 2003
> > i686 unknown
> >
> >
> > On Tue, 21 Oct 2003, Keir Fraser wrote:
> >
> > > > Failed to create domain using: /usr/local/bin/xi_create 98304 XenoLinux
> > > > # /usr/local/bin/xi_create 98304 XenoLinux
> > > > ERROR: Error when executing privileged control ioctl (1 = Operation not
> > > > permitted)
> > > > # ./xenctl physical grant -phda5 -w -n1
> > > > warning: state file not found [/var/lib/xen/vdstate.xml]
> > > > Could not grant physical access using: /usr/local/bin/xi_phys_grant rw 1
> > > > 768 48258 29961162 5
> > >
> > > You need to run xenctl as root.
> > >
> > >  -- Keir
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by OSDN developer relations
> > Here's your chance to show off your extensive product knowledge
> > We want to know what you know. Tell us and you have a chance to win $100
> > http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.sourceforge.net/lists/listinfo/xen-devel
>
>