View previous topic :: View next topic |
Author |
Message |
Robert S Guru
Joined: 15 Aug 2004 Posts: 460 Location: Canberra Australia
|
Posted: Tue Sep 19, 2006 1:15 pm Post subject: "/etc/init.d/xendomains stop" does not shut down x |
|
|
I have just installed the xen packages according the instructions on the wiki. I have downloaded a pre-build debian disk image. I have copied a config file into the /etc/xen/auto directory thus:
Quote: | # cat /etc/xen/auto/debian.3-1.xen.cfg
kernel = "/boot/vmlinuz-2.6.16.28-xenU"
memory = 128
name = "debian31"
nics = 1
dhcp = "dhcp"
disk = ['file:/home/robert/debian/debian.3-1.img,sda1,w', 'file:/home/robert/debian/debian.swap,sda2,w']
root = "/dev/sda1 ro"
vif = [ '' ]
|
The domain "debian31" starts up when I do the following:
Quote: | athlon robert # /etc/init.d/xendomains start
* Starting Xen domains from /etc/xen/auto
* Creating screen session to hold domain consoles ... [ ok ]
* Starting domain debian31" ... [ ok ]
athlon robert # /etc/init.d/xendomains status
* status: started
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 256 1 r----- 3498.3
debian31 2 128 1 -b---- 4.4
|
. . . but when I shut the domain down I get the following:
Quote: | athlon robert # /etc/init.d/xendomains stop
* Shutting down Xen domains from /etc/xen/auto
* Not stopping domain debian31" - not running
* Closing screen session xen ...
|
It appears that the domain gets the name 'debian31"' instead of 'debian31'.
Should this be filed as a bug and is there a simple workaround? |
|
Back to top |
|
|
Insanity5902 Veteran
Joined: 23 Jan 2004 Posts: 1228 Location: Fort Worth, Texas
|
|
Back to top |
|
|
Robert S Guru
Joined: 15 Aug 2004 Posts: 460 Location: Canberra Australia
|
Posted: Tue Sep 19, 2006 9:19 pm Post subject: |
|
|
Its 3.0.2-r3. The latest. |
|
Back to top |
|
|
Insanity5902 Veteran
Joined: 23 Jan 2004 Posts: 1228 Location: Fort Worth, Texas
|
|
Back to top |
|
|
Robert S Guru
Joined: 15 Aug 2004 Posts: 460 Location: Canberra Australia
|
Posted: Wed Sep 20, 2006 9:50 am Post subject: |
|
|
Done that. No luck. Any chance of posting your config files(s) to see how it differs from mine? |
|
Back to top |
|
|
Insanity5902 Veteran
Joined: 23 Jan 2004 Posts: 1228 Location: Fort Worth, Texas
|
Posted: Wed Sep 20, 2006 4:22 pm Post subject: |
|
|
Below are the files I think are releavant. The bottom is the init.d script, but only the get_domname function, since that seems to be where the problem seems to be. If you could post your function so we can compare that would be nice.
cat /etc/xen/auto/gentoo
Code: | kernel = "/var/xen/boot/vmlinuz-2.6.16.26-r1"
memory = 512
name = "gentoo"
vif = [ 'ip=69.13.46.105' ]
disk = ['file:/var/xen/gentoo/gentoo.img,sda1,w', 'file:/var/xen/gentoo/gentoo.swap,sda2,w']
root = "/dev/sda1 ro"
extra = "gentoo=nodevfs" |
cat /etc/conf.d/xendomains
Code: | # /etc/conf.d/xendomains
# Directory of domains to boot. AUTODIR should contain one or more symlinks
# to domain config files in /etc/xen
AUTODIR=/etc/xen/auto |
cat /etc/init.d/xendomains
Code: | get_domname() {
local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alpha:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
if [[ -z ${name_from_file} ]] ; then
basename "${1}"
else
echo ${name_from_file}
fi
}
|
_________________ Join the adopt an unanswered post initiative today |
|
Back to top |
|
|
Robert S Guru
Joined: 15 Aug 2004 Posts: 460 Location: Canberra Australia
|
Posted: Wed Sep 20, 2006 9:02 pm Post subject: |
|
|
Thanks. I probably won't get a chance to look at this until the weekend. |
|
Back to top |
|
|
Robert S Guru
Joined: 15 Aug 2004 Posts: 460 Location: Canberra Australia
|
Posted: Fri Sep 22, 2006 10:50 am Post subject: |
|
|
AHA!!
Replace ":alpha:" with ":alnum:"
Code: | local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) |
It doesn't like numeric characters in the domain name. Maybe there's a reason for this?? Conversely I could leave out the numeric characters from the domain name. |
|
Back to top |
|
|
Insanity5902 Veteran
Joined: 23 Jan 2004 Posts: 1228 Location: Fort Worth, Texas
|
Posted: Fri Sep 22, 2006 1:16 pm Post subject: |
|
|
Either way, you might want to take that code snippet and create a bug report so it is documentin in bugzilla, I don't think that would be a big problem. _________________ Join the adopt an unanswered post initiative today |
|
Back to top |
|
|
Robert S Guru
Joined: 15 Aug 2004 Posts: 460 Location: Canberra Australia
|
|
Back to top |
|
|
|