This commit is contained in:
parent
b850275d12
commit
4c207325e4
@ -1,7 +1,16 @@
|
|||||||
Index: 2007-04-18/tools/check/Makefile
|
|
||||||
===================================================================
|
# HG changeset patch
|
||||||
--- 2007-04-18.orig/tools/check/Makefile 2006-12-14 22:49:54.000000000 +0100
|
# User kfraser@localhost.localdomain
|
||||||
+++ 2007-04-18/tools/check/Makefile 2007-04-24 16:32:39.000000000 +0200
|
# Date 1179219794 -3600
|
||||||
|
# Node ID e72e94d2987cfa20d3ac6b34972d0ce639efb1fa
|
||||||
|
# Parent e1d9d2884245461576631134db46dda67994989b
|
||||||
|
tools: check for curl-devel and libxml2-devel
|
||||||
|
when they are required for LIBXENAPI_BINDINGS.
|
||||||
|
|
||||||
|
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
|
--- a/tools/check/Makefile Tue May 15 10:01:14 2007 +0100
|
||||||
|
+++ b/tools/check/Makefile Tue May 15 10:03:14 2007 +0100
|
||||||
@@ -7,7 +7,7 @@ all: build
|
@@ -7,7 +7,7 @@ all: build
|
||||||
# Check this machine is OK for building on.
|
# Check this machine is OK for building on.
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
@ -20,10 +29,8 @@ Index: 2007-04-18/tools/check/Makefile
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
Index: 2007-04-18/tools/check/check_curl
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||||
===================================================================
|
+++ b/tools/check/check_curl Tue May 15 10:03:14 2007 +0100
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ 2007-04-18/tools/check/check_curl 2007-04-24 16:41:08.000000000 +0200
|
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,38 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+# CHECK-BUILD CHECK-INSTALL
|
+# CHECK-BUILD CHECK-INSTALL
|
||||||
@ -63,10 +70,8 @@ Index: 2007-04-18/tools/check/check_curl
|
|||||||
+rm -f $tmpfile
|
+rm -f $tmpfile
|
||||||
+
|
+
|
||||||
+exit $RC
|
+exit $RC
|
||||||
Index: 2007-04-18/tools/check/check_xml2
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||||
===================================================================
|
+++ b/tools/check/check_xml2 Tue May 15 10:03:14 2007 +0100
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ 2007-04-18/tools/check/check_xml2 2007-04-24 16:41:16.000000000 +0200
|
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,38 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+# CHECK-BUILD CHECK-INSTALL
|
+# CHECK-BUILD CHECK-INSTALL
|
||||||
@ -106,3 +111,4 @@ Index: 2007-04-18/tools/check/check_xml2
|
|||||||
+rm -f $tmpfile
|
+rm -f $tmpfile
|
||||||
+
|
+
|
||||||
+exit $RC
|
+exit $RC
|
||||||
|
|
@ -1,7 +1,21 @@
|
|||||||
Index: xen-3.1-testing/docs/man/xm.pod.1
|
|
||||||
===================================================================
|
# HG changeset patch
|
||||||
--- xen-3.1-testing.orig/docs/man/xm.pod.1
|
# User kfraser@localhost.localdomain
|
||||||
+++ xen-3.1-testing/docs/man/xm.pod.1
|
# Date 1183729502 -3600
|
||||||
|
# Node ID daa07db3ca845c9b08415d19a4d888902abf8321
|
||||||
|
# Parent d49e6a814d9a4cc8b136b599b77557920abd7921
|
||||||
|
docs: update xm man page
|
||||||
|
|
||||||
|
- Fixed description of "Mem" column in "xm list" output.
|
||||||
|
- Added a bit of text for the credit scheduler.
|
||||||
|
- Described the --force option to block-detach.
|
||||||
|
- Made formatting and spelling more consistent.
|
||||||
|
- etc...
|
||||||
|
|
||||||
|
Signed-off-by: Charles Coffing <ccoffing@novell.com>
|
||||||
|
|
||||||
|
--- a/docs/man/xm.pod.1 Fri Jul 06 14:43:51 2007 +0100
|
||||||
|
+++ b/docs/man/xm.pod.1 Fri Jul 06 14:45:02 2007 +0100
|
||||||
@@ -4,7 +4,7 @@ xm - Xen management user interface
|
@@ -4,7 +4,7 @@ xm - Xen management user interface
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
@ -11,17 +25,19 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
@@ -13,46 +13,50 @@ domains. The program can be used to crea
|
@@ -13,46 +13,50 @@ domains. It can also be used to list cur
|
||||||
domains. It can also be used to list current domains, enable or pin
|
domains. It can also be used to list current domains, enable or pin
|
||||||
VCPUs, and attach or detach virtual block devices.
|
VCPUs, and attach or detach virtual block devices.
|
||||||
|
|
||||||
-The basic structure of every xm command is almost always:
|
-The basic structure of every xm command is almost always:
|
||||||
+The basic structure of every B<xm> command is almost always:
|
-
|
||||||
|
|
||||||
- xm <subcommand> <domain-id> [OPTIONS]
|
- xm <subcommand> <domain-id> [OPTIONS]
|
||||||
+=over 2
|
-
|
||||||
|
|
||||||
-Where I<subcommand> is one of the sub commands listed below, I<domain-id>
|
-Where I<subcommand> is one of the sub commands listed below, I<domain-id>
|
||||||
|
+The basic structure of every B<xm> command is almost always:
|
||||||
|
+
|
||||||
|
+=over 2
|
||||||
|
+
|
||||||
+B<xm> I<subcommand> I<domain-id> [I<OPTIONS>]
|
+B<xm> I<subcommand> I<domain-id> [I<OPTIONS>]
|
||||||
+
|
+
|
||||||
+=back
|
+=back
|
||||||
@ -77,22 +93,24 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
have a traditional log in console this will look much like a normal
|
have a traditional log in console this will look much like a normal
|
||||||
text log in screen.
|
text log in screen.
|
||||||
|
|
||||||
@@ -63,15 +67,15 @@ The attached console will perform much l
|
@@ -63,15 +67,15 @@ so running curses based interfaces over
|
||||||
so running curses based interfaces over the console B<is not
|
so running curses based interfaces over the console B<is not
|
||||||
advised>. Vi tends to get very odd when using it over this interface.
|
advised>. Vi tends to get very odd when using it over this interface.
|
||||||
|
|
||||||
-=item B<create> I<[-c]> I<configfile> I<[name=value]>..
|
-=item B<create> I<[-c]> I<configfile> I<[name=value]>..
|
||||||
+=item B<create> [B<-c>] I<configfile> [I<name>=I<value>]..
|
-
|
||||||
|
|
||||||
-The create sub command requires a configfile and can optional take a
|
-The create sub command requires a configfile and can optional take a
|
||||||
|
+=item B<create> [B<-c>] I<configfile> [I<name>=I<value>]..
|
||||||
|
+
|
||||||
+The create sub command requires a config file and can optionally take a
|
+The create sub command requires a config file and can optionally take a
|
||||||
series of name value pairs that add to or override variables defined
|
series of name value pairs that add to or override variables defined
|
||||||
in the config file. See L<xmdomain.cfg> for full details of that file
|
in the config file. See L<xmdomain.cfg> for full details of that file
|
||||||
format, and possible options used in either the configfile or
|
format, and possible options used in either the configfile or
|
||||||
-Name=Value combinations.
|
-Name=Value combinations.
|
||||||
+I<name>=I<value> combinations.
|
-
|
||||||
|
|
||||||
-Configfile can either be an absolute path to a file, or a relative
|
-Configfile can either be an absolute path to a file, or a relative
|
||||||
|
+I<name>=I<value> combinations.
|
||||||
|
+
|
||||||
+I<configfile> can either be an absolute path to a file, or a relative
|
+I<configfile> can either be an absolute path to a file, or a relative
|
||||||
path to a file located in /etc/xen.
|
path to a file located in /etc/xen.
|
||||||
|
|
||||||
@ -214,7 +232,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
=item B<mem-set> I<domain-id> I<mem>
|
=item B<mem-set> I<domain-id> I<mem>
|
||||||
|
|
||||||
@@ -252,20 +258,20 @@ Set the domain's used memory using the b
|
@@ -252,20 +258,20 @@ operation requires cooperation from the
|
||||||
operation requires cooperation from the domain operating system, there
|
operation requires cooperation from the domain operating system, there
|
||||||
is no guarantee that it will succeed.
|
is no guarantee that it will succeed.
|
||||||
|
|
||||||
@ -224,10 +242,11 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
careful when using this command on running domains.
|
careful when using this command on running domains.
|
||||||
|
|
||||||
-=item B<migrate> I<domain-id> I<host> I<[options]>
|
-=item B<migrate> I<domain-id> I<host> I<[options]>
|
||||||
+=item B<migrate> I<domain-id> I<host> [I<OPTIONS>]
|
-
|
||||||
|
|
||||||
-Migrate a domain to another Host machine. B<Xend> must be running on
|
-Migrate a domain to another Host machine. B<Xend> must be running on
|
||||||
-other host machine, it must be running the same version of xen, it
|
-other host machine, it must be running the same version of xen, it
|
||||||
|
+=item B<migrate> I<domain-id> I<host> [I<OPTIONS>]
|
||||||
|
+
|
||||||
+Migrate a domain to another host machine. Xend must be running on
|
+Migrate a domain to another host machine. Xend must be running on
|
||||||
+other host machine, it must be running the same version of Xen, it
|
+other host machine, it must be running the same version of Xen, it
|
||||||
must have the migration TCP port open and accepting connections from
|
must have the migration TCP port open and accepting connections from
|
||||||
@ -258,7 +277,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
Set maximum Mbs allowed for migrating the domain. This ensures that
|
Set maximum Mbs allowed for migrating the domain. This ensures that
|
||||||
the network link is not saturated with migration traffic while
|
the network link is not saturated with migration traffic while
|
||||||
@@ -293,7 +299,7 @@ Pause a domain. When in a paused state
|
@@ -293,7 +299,7 @@ allocated resources such as memory, but
|
||||||
allocated resources such as memory, but will not be eligible for
|
allocated resources such as memory, but will not be eligible for
|
||||||
scheduling by the Xen hypervisor.
|
scheduling by the Xen hypervisor.
|
||||||
|
|
||||||
@ -267,7 +286,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
Reboot a domain. This acts just as if the domain had the B<reboot>
|
Reboot a domain. This acts just as if the domain had the B<reboot>
|
||||||
command run from the console. The command returns as soon as it has
|
command run from the console. The command returns as soon as it has
|
||||||
@@ -301,18 +307,18 @@ executed the reboot action, which may be
|
@@ -301,18 +307,18 @@ domain actually reboots.
|
||||||
domain actually reboots.
|
domain actually reboots.
|
||||||
|
|
||||||
The behavior of what happens to a domain when it reboots is set by the
|
The behavior of what happens to a domain when it reboots is set by the
|
||||||
@ -280,12 +299,14 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
-=item B<-a, --all>
|
-=item B<-a, --all>
|
||||||
+=item B<-a>, B<--all>
|
-
|
||||||
|
|
||||||
-Reboot all domains
|
-Reboot all domains
|
||||||
+Reboot all domains.
|
-
|
||||||
|
|
||||||
-=item B<-w, --wait>
|
-=item B<-w, --wait>
|
||||||
|
+=item B<-a>, B<--all>
|
||||||
|
+
|
||||||
|
+Reboot all domains.
|
||||||
|
+
|
||||||
+=item B<-w>, B<--wait>
|
+=item B<-w>, B<--wait>
|
||||||
|
|
||||||
Wait for reboot to complete before returning. This may take a while,
|
Wait for reboot to complete before returning. This may take a while,
|
||||||
@ -299,7 +320,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
=item B<save> I<domain-id> I<state-file>
|
=item B<save> I<domain-id> I<state-file>
|
||||||
|
|
||||||
@@ -334,16 +340,16 @@ This is roughly equivalent to doing a hi
|
@@ -334,16 +340,16 @@ with all the same limitations. Open net
|
||||||
with all the same limitations. Open network connections may be
|
with all the same limitations. Open network connections may be
|
||||||
severed upon restore, as TCP timeouts may have expired.
|
severed upon restore, as TCP timeouts may have expired.
|
||||||
|
|
||||||
@ -319,7 +340,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
created.
|
created.
|
||||||
|
|
||||||
B<OPTIONS>
|
B<OPTIONS>
|
||||||
@@ -386,7 +392,7 @@ Attempting to set the VCPUs to a number
|
@@ -386,7 +392,7 @@ configured VCPU count is an error. Tryi
|
||||||
configured VCPU count is an error. Trying to set VCPUs to < 1 will be
|
configured VCPU count is an error. Trying to set VCPUs to < 1 will be
|
||||||
quietly ignored.
|
quietly ignored.
|
||||||
|
|
||||||
@ -355,7 +376,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
Clears Xen's message buffer.
|
Clears Xen's message buffer.
|
||||||
|
|
||||||
@@ -431,8 +437,8 @@ Print information about the Xen host in
|
@@ -431,8 +437,8 @@ reporting a Xen bug, please provide this
|
||||||
reporting a Xen bug, please provide this information as part of the
|
reporting a Xen bug, please provide this information as part of the
|
||||||
bug report.
|
bug report.
|
||||||
|
|
||||||
@ -366,7 +387,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
host : talon
|
host : talon
|
||||||
release : 2.6.12.6-xen0
|
release : 2.6.12.6-xen0
|
||||||
@@ -470,36 +476,36 @@ B<FIELDS>
|
@@ -470,36 +476,36 @@ Not all fields will be explained here, b
|
||||||
Not all fields will be explained here, but some of the less obvious
|
Not all fields will be explained here, but some of the less obvious
|
||||||
ones deserve explanation:
|
ones deserve explanation:
|
||||||
|
|
||||||
@ -378,22 +399,26 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
field in /proc/cpuinfo on a normal Linux machine.
|
field in /proc/cpuinfo on a normal Linux machine.
|
||||||
|
|
||||||
-=item I<free_memory>
|
-=item I<free_memory>
|
||||||
+=item B<free_memory>
|
-
|
||||||
|
|
||||||
-Available memory (in MB) not allocated to Xen, or any other Domains.
|
-Available memory (in MB) not allocated to Xen, or any other Domains.
|
||||||
+Available memory (in MB) not allocated to Xen, or any other domains.
|
-
|
||||||
|
|
||||||
-=item I<xen_caps>
|
-=item I<xen_caps>
|
||||||
+=item B<xen_caps>
|
-
|
||||||
|
|
||||||
-The xen version, architecture. Architecture values can be one of:
|
-The xen version, architecture. Architecture values can be one of:
|
||||||
|
+=item B<free_memory>
|
||||||
|
+
|
||||||
|
+Available memory (in MB) not allocated to Xen, or any other domains.
|
||||||
|
+
|
||||||
|
+=item B<xen_caps>
|
||||||
|
+
|
||||||
+The Xen version and architecture. Architecture values can be one of:
|
+The Xen version and architecture. Architecture values can be one of:
|
||||||
x86_32, x86_32p (i.e. PAE enabled), x86_64, ia64.
|
x86_32, x86_32p (i.e. PAE enabled), x86_64, ia64.
|
||||||
|
|
||||||
-=item I<xen_changeset>
|
-=item I<xen_changeset>
|
||||||
+=item B<xen_changeset>
|
-
|
||||||
|
|
||||||
-The xen mercurial changeset id. Very useful for determining exactly
|
-The xen mercurial changeset id. Very useful for determining exactly
|
||||||
|
+=item B<xen_changeset>
|
||||||
|
+
|
||||||
+The Xen mercurial changeset id. Very useful for determining exactly
|
+The Xen mercurial changeset id. Very useful for determining exactly
|
||||||
what version of code your Xen system was built from.
|
what version of code your Xen system was built from.
|
||||||
|
|
||||||
@ -412,7 +437,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
domains. Xentop is a curses interface, and reasonably self
|
domains. Xentop is a curses interface, and reasonably self
|
||||||
explanatory.
|
explanatory.
|
||||||
|
|
||||||
@@ -508,13 +514,41 @@ explanatory.
|
@@ -508,12 +514,40 @@ explanatory.
|
||||||
=head1 SCHEDULER SUBCOMMANDS
|
=head1 SCHEDULER SUBCOMMANDS
|
||||||
|
|
||||||
Xen ships with a number of domain schedulers, which can be set at boot
|
Xen ships with a number of domain schedulers, which can be set at boot
|
||||||
@ -424,7 +449,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
FIXME: we really need a scheduler expert to write up this section.
|
FIXME: we really need a scheduler expert to write up this section.
|
||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
+
|
||||||
+=item B<sched-credit> [ B<-d> I<domain-id> [ B<-w>[B<=>I<WEIGHT>] | B<-c>[B<=>I<CAP>] ] ]
|
+=item B<sched-credit> [ B<-d> I<domain-id> [ B<-w>[B<=>I<WEIGHT>] | B<-c>[B<=>I<CAP>] ] ]
|
||||||
+
|
+
|
||||||
+Set credit scheduler parameters. The credit scheduler is a
|
+Set credit scheduler parameters. The credit scheduler is a
|
||||||
@ -452,10 +477,9 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
+no upper cap.
|
+no upper cap.
|
||||||
+
|
+
|
||||||
+=back
|
+=back
|
||||||
+
|
|
||||||
=item B<sched-sedf> I<period> I<slice> I<latency-hint> I<extratime> I<weight>
|
=item B<sched-sedf> I<period> I<slice> I<latency-hint> I<extratime> I<weight>
|
||||||
|
|
||||||
Set Simple EDF (Earliest Deadline First) scheduler parameters. This
|
|
||||||
@@ -546,7 +580,7 @@ Flag for allowing domain to run in extra
|
@@ -546,7 +580,7 @@ Flag for allowing domain to run in extra
|
||||||
|
|
||||||
=item I<weight>
|
=item I<weight>
|
||||||
@ -496,11 +520,17 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
=back
|
=back
|
||||||
|
|
||||||
-=item B<block-detach> I<domain-id> I<devid>
|
-=item B<block-detach> I<domain-id> I<devid>
|
||||||
+=item B<block-detach> I<domain-id> I<devid> [B<--force>]
|
-
|
||||||
|
|
||||||
-Destroy a domain's virtual block device. devid B<must> be the device
|
-Destroy a domain's virtual block device. devid B<must> be the device
|
||||||
-id given to the device by domain 0. You will need to run I<xm
|
-id given to the device by domain 0. You will need to run I<xm
|
||||||
-block-list> to determine that number.
|
-block-list> to determine that number.
|
||||||
|
-
|
||||||
|
-FIXME: this is currently B<broken>. Even though a block device is
|
||||||
|
-removed from domU, it appears to still be allocated in the domain 0.
|
||||||
|
-
|
||||||
|
-=item B<block-list> I<[-l|--long]> I<domain-id>
|
||||||
|
+=item B<block-detach> I<domain-id> I<devid> [B<--force>]
|
||||||
|
+
|
||||||
+Detach a domain's virtual block device. I<devid> may be the symbolic
|
+Detach a domain's virtual block device. I<devid> may be the symbolic
|
||||||
+name or the numeric device id given to the device by domain 0. You
|
+name or the numeric device id given to the device by domain 0. You
|
||||||
+will need to run B<xm block-list> to determine that number.
|
+will need to run B<xm block-list> to determine that number.
|
||||||
@ -510,11 +540,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
+or is still using the device), the detach will fail. The B<--force>
|
+or is still using the device), the detach will fail. The B<--force>
|
||||||
+parameter will forcefully detach the device, but may cause IO errors
|
+parameter will forcefully detach the device, but may cause IO errors
|
||||||
+in the domain.
|
+in the domain.
|
||||||
|
+
|
||||||
-FIXME: this is currently B<broken>. Even though a block device is
|
|
||||||
-removed from domU, it appears to still be allocated in the domain 0.
|
|
||||||
-
|
|
||||||
-=item B<block-list> I<[-l|--long]> I<domain-id>
|
|
||||||
+=item B<block-list> [B<-l>|B<--long>] I<domain-id>
|
+=item B<block-list> [B<-l>|B<--long>] I<domain-id>
|
||||||
|
|
||||||
List virtual block devices for a domain. The returned output is
|
List virtual block devices for a domain. The returned output is
|
||||||
@ -525,10 +551,11 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
-=item B<network-attach> I<domain-id> I<[script=scriptname]> I<[ip=ipaddr]>
|
-=item B<network-attach> I<domain-id> I<[script=scriptname]> I<[ip=ipaddr]>
|
||||||
-I<[mac=macaddr]> I<[bridge=bridge-name]> I<[backend=bedomain-id]>
|
-I<[mac=macaddr]> I<[bridge=bridge-name]> I<[backend=bedomain-id]>
|
||||||
|
-
|
||||||
|
-Creates a new network device in the domain specified by domain-id. It
|
||||||
+=item B<network-attach> I<domain-id> [B<script=>I<scriptname>] [B<ip=>I<ipaddr>]
|
+=item B<network-attach> I<domain-id> [B<script=>I<scriptname>] [B<ip=>I<ipaddr>]
|
||||||
+[B<mac=>I<macaddr>] [B<bridge=>I<bridge-name>] [B<backend=>I<bedomain-id>]
|
+[B<mac=>I<macaddr>] [B<bridge=>I<bridge-name>] [B<backend=>I<bedomain-id>]
|
||||||
|
+
|
||||||
-Creates a new network device in the domain specified by domain-id. It
|
|
||||||
+Creates a new network device in the domain specified by I<domain-id>. It
|
+Creates a new network device in the domain specified by I<domain-id>. It
|
||||||
takes the following optional options:
|
takes the following optional options:
|
||||||
|
|
||||||
@ -541,9 +568,10 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
Use the specified script name to bring up the network. Defaults to
|
Use the specified script name to bring up the network. Defaults to
|
||||||
-the default setting in xend-config.sxp for I<vif-script>.
|
-the default setting in xend-config.sxp for I<vif-script>.
|
||||||
+the default setting in xend-config.sxp for B<vif-script>.
|
-
|
||||||
|
|
||||||
-=item I<ip=ipaddr>
|
-=item I<ip=ipaddr>
|
||||||
|
+the default setting in xend-config.sxp for B<vif-script>.
|
||||||
|
+
|
||||||
+=item B<ip=>I<ipaddr>
|
+=item B<ip=>I<ipaddr>
|
||||||
|
|
||||||
Passes the specified IP Address to the adapter on creation.
|
Passes the specified IP Address to the adapter on creation.
|
||||||
@ -563,14 +591,15 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
The name of the bridge to attach the vif to, in case you have more
|
The name of the bridge to attach the vif to, in case you have more
|
||||||
-than one. This defaults to
|
-than one. This defaults to
|
||||||
+than one. This defaults to xenbr0.
|
-
|
||||||
|
|
||||||
-=item I<backend=bedomain-id>
|
-=item I<backend=bedomain-id>
|
||||||
|
+than one. This defaults to xenbr0.
|
||||||
|
+
|
||||||
+=item B<backend=>I<bedomain-id>
|
+=item B<backend=>I<bedomain-id>
|
||||||
|
|
||||||
The backend domain id. By default this is domain 0.
|
The backend domain id. By default this is domain 0.
|
||||||
|
|
||||||
@@ -705,17 +742,17 @@ I<devid> is the virtual interface device
|
@@ -705,17 +742,17 @@ FIXME: this is currently B<broken>. Net
|
||||||
FIXME: this is currently B<broken>. Network devices aren't completely
|
FIXME: this is currently B<broken>. Network devices aren't completely
|
||||||
removed from domain 0.
|
removed from domain 0.
|
||||||
|
|
||||||
@ -601,7 +630,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
List vnets.
|
List vnets.
|
||||||
|
|
||||||
@@ -762,7 +799,7 @@ subcommands described below. Currently,
|
@@ -762,7 +799,7 @@ interpret labels:
|
||||||
interpret labels:
|
interpret labels:
|
||||||
|
|
||||||
(1) Simple Type Enforcement: Labels are interpreted to decide access
|
(1) Simple Type Enforcement: Labels are interpreted to decide access
|
||||||
@ -634,32 +663,36 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
is 'dom'. The labels are arranged in alphabetical order.
|
is 'dom'. The labels are arranged in alphabetical order.
|
||||||
|
|
||||||
-=item B<addlabel> I<label> dom I<configfile> [I<policy>]
|
-=item B<addlabel> I<label> dom I<configfile> [I<policy>]
|
||||||
+=item B<addlabel> I<label> B<dom> I<configfile> [I<policy>]
|
-
|
||||||
|
|
||||||
-=item B<addlabel> I<label> res I<resource> [I<policy>]
|
-=item B<addlabel> I<label> res I<resource> [I<policy>]
|
||||||
|
+=item B<addlabel> I<label> B<dom> I<configfile> [I<policy>]
|
||||||
|
+
|
||||||
+=item B<addlabel> I<label> B<res> I<resource> [I<policy>]
|
+=item B<addlabel> I<label> B<res> I<resource> [I<policy>]
|
||||||
|
|
||||||
Adds the security label with name I<label> to a domain
|
Adds the security label with name I<label> to a domain
|
||||||
I<configfile> (dom) or to the global resource label file for the
|
I<configfile> (dom) or to the global resource label file for the
|
||||||
@@ -841,17 +878,17 @@ currently enforced access control policy
|
@@ -841,17 +878,17 @@ verifies that the I<policy> definition s
|
||||||
verifies that the I<policy> definition supports the specified I<label>
|
verifies that the I<policy> definition supports the specified I<label>
|
||||||
name.
|
name.
|
||||||
|
|
||||||
-=item B<rmlabel> dom I<configfile>
|
-=item B<rmlabel> dom I<configfile>
|
||||||
+=item B<rmlabel> B<dom> I<configfile>
|
-
|
||||||
|
|
||||||
-=item B<rmlabel> res I<resource>
|
-=item B<rmlabel> res I<resource>
|
||||||
+=item B<rmlabel> B<res> I<resource>
|
-
|
||||||
|
|
||||||
-Works the same as the I<addlabel> command (above), except that this
|
-Works the same as the I<addlabel> command (above), except that this
|
||||||
|
+=item B<rmlabel> B<dom> I<configfile>
|
||||||
|
+
|
||||||
|
+=item B<rmlabel> B<res> I<resource>
|
||||||
|
+
|
||||||
+Works the same as the B<addlabel> command (above), except that this
|
+Works the same as the B<addlabel> command (above), except that this
|
||||||
command will remove the label from the domain I<configfile> (dom) or
|
command will remove the label from the domain I<configfile> (dom) or
|
||||||
the global resource label file (res).
|
the global resource label file (res).
|
||||||
|
|
||||||
-=item B<getlabel> dom I<configfile>
|
-=item B<getlabel> dom I<configfile>
|
||||||
+=item B<getlabel> B<dom> I<configfile>
|
-
|
||||||
|
|
||||||
-=item B<getlabel> res I<resource>
|
-=item B<getlabel> res I<resource>
|
||||||
|
+=item B<getlabel> B<dom> I<configfile>
|
||||||
|
+
|
||||||
+=item B<getlabel> B<res> I<resource>
|
+=item B<getlabel> B<res> I<resource>
|
||||||
|
|
||||||
Shows the label for the given I<configfile> or I<resource>
|
Shows the label for the given I<configfile> or I<resource>
|
||||||
@ -713,7 +746,7 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
|
|
||||||
xm block-attach homebanking phy:hda6 sda2 w
|
xm block-attach homebanking phy:hda6 sda2 w
|
||||||
|
|
||||||
@@ -1010,7 +1047,7 @@ Note that labeled resources cannot be us
|
@@ -1010,7 +1047,7 @@ off. Any attempt to use labeled resourc
|
||||||
off. Any attempt to use labeled resources with security turned off
|
off. Any attempt to use labeled resources with security turned off
|
||||||
will result in a failure with a corresponding error message. The
|
will result in a failure with a corresponding error message. The
|
||||||
solution is to enable security or, if security is no longer desired,
|
solution is to enable security or, if security is no longer desired,
|
||||||
@ -740,3 +773,4 @@ Index: xen-3.1-testing/docs/man/xm.pod.1
|
|||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
B<xmdomain.cfg>(5), B<xentop>(1)
|
B<xmdomain.cfg>(5), B<xentop>(1)
|
||||||
|
|
13
32on64-extra-mem.patch
Normal file
13
32on64-extra-mem.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: xen-3.0.4-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.0.4-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
+++ xen-3.0.4-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
@@ -1431,7 +1431,7 @@ class XendDomainInfo:
|
||||||
|
xc.domain_setmaxmem(self.domid, maxmem)
|
||||||
|
|
||||||
|
# Make sure there's enough RAM available for the domain
|
||||||
|
- balloon.free(memory + shadow)
|
||||||
|
+ balloon.free(memory + shadow + 512)
|
||||||
|
|
||||||
|
# Set up the shadow memory
|
||||||
|
shadow_cur = xc.shadow_mem_control(self.domid, shadow / 1024)
|
27
README.SuSE
27
README.SuSE
@ -28,6 +28,7 @@ Hypervisor and Tools" icon in YaST.
|
|||||||
|
|
||||||
If you want to install and manage VMs graphically, be sure the following
|
If you want to install and manage VMs graphically, be sure the following
|
||||||
optional packages are also installed:
|
optional packages are also installed:
|
||||||
|
vm-install (Optional, to install VMs)
|
||||||
python-gtk (Optional, to install VMs graphically)
|
python-gtk (Optional, to install VMs graphically)
|
||||||
virt-manager (Optional, to manage VMs graphically)
|
virt-manager (Optional, to manage VMs graphically)
|
||||||
tightvnc (Optional, to view VMs outside virt-manager)
|
tightvnc (Optional, to view VMs outside virt-manager)
|
||||||
@ -41,7 +42,7 @@ kernel, you will boot the Xen hypervisor and a slightly changed Linux kernel.
|
|||||||
This Linux kernel runs in the first virtual machine and will drive most of
|
This Linux kernel runs in the first virtual machine and will drive most of
|
||||||
your hardware.
|
your hardware.
|
||||||
|
|
||||||
This approach is called para-virtualization, since it is a partial
|
This approach is called paravirtualization, since it is a partial
|
||||||
virtualization (the Linux kernel needs to be changed slightly, to make the
|
virtualization (the Linux kernel needs to be changed slightly, to make the
|
||||||
virtualization easier). It results in very good performance (consult
|
virtualization easier). It results in very good performance (consult
|
||||||
http://www.cl.cam.ac.uk/research/srg/netos/xen/performance.html) but has the
|
http://www.cl.cam.ac.uk/research/srg/netos/xen/performance.html) but has the
|
||||||
@ -170,7 +171,7 @@ Consult the online documentation for more information.
|
|||||||
|
|
||||||
Creating a VM with vm-install
|
Creating a VM with vm-install
|
||||||
-----------------------------
|
-----------------------------
|
||||||
The vm-install program (part of the xen-tools package, and accessible
|
The vm-install program (part of the vm-install package, and accessible
|
||||||
through YaST's Control Center) is the recommended method to create VMs. This
|
through YaST's Control Center) is the recommended method to create VMs. This
|
||||||
program handles creating both the VM's configuration file and disk(s). It can
|
program handles creating both the VM's configuration file and disk(s). It can
|
||||||
help install any operating system, not just SUSE.
|
help install any operating system, not just SUSE.
|
||||||
@ -188,10 +189,10 @@ from _all_ VMs. Never try to share a filesystem that is mounted read-write;
|
|||||||
filesystem corruption will result. For sharing writable data between VMs, use
|
filesystem corruption will result. For sharing writable data between VMs, use
|
||||||
NFS or other networked or cluster filesystems.
|
NFS or other networked or cluster filesystems.
|
||||||
|
|
||||||
Xen does not yet properly support removable media in VMs, so installing an
|
Xen does not yet properly support removable media in paravirtual VMs, so
|
||||||
operating system from CDs can be difficult. Consult the online documentation
|
installing such an operating system from CDs can be difficult. Consult the
|
||||||
for some detailed work-arounds. We recommend using a network installation
|
online documentation for some detailed work-arounds. We recommend using a
|
||||||
source, a DVD, or a DVD ISO.
|
network installation source, a DVD, or a DVD ISO.
|
||||||
|
|
||||||
When defining the virtual network adapter(s), we recommend using a static MAC
|
When defining the virtual network adapter(s), we recommend using a static MAC
|
||||||
for the VM rather than allowing Xen to randomly select one each time the VM
|
for the VM rather than allowing Xen to randomly select one each time the VM
|
||||||
@ -243,8 +244,8 @@ the VM server's filesystem, so that it can be used to bootstrap the new VM.
|
|||||||
See /etc/xen/examples/xmexample.domUloader for an example.
|
See /etc/xen/examples/xmexample.domUloader for an example.
|
||||||
|
|
||||||
Next, make a copy of one of the /etc/xen/examples/* files, and modify it to
|
Next, make a copy of one of the /etc/xen/examples/* files, and modify it to
|
||||||
suit your needs. For para-virtualized VMs, start with
|
suit your needs. For paravirtualized VMs, start with
|
||||||
/etc/xen/examples/xmexample1; for fully-virtualized VMs, start with
|
/etc/xen/examples/xmexample1; for fully virtualized VMs, start with
|
||||||
/etc/xen/examples/xmexample.hvm. You'll need to change (at very least) the
|
/etc/xen/examples/xmexample.hvm. You'll need to change (at very least) the
|
||||||
"name" and "disk" parameters.
|
"name" and "disk" parameters.
|
||||||
|
|
||||||
@ -275,20 +276,20 @@ Have a look at the other xm commands by typing "xm help". Note that most xm
|
|||||||
commands must be done as root.
|
commands must be done as root.
|
||||||
|
|
||||||
|
|
||||||
Using the Mouse via VNC in Fully-Virtual Mode
|
Using the Mouse via VNC in Fully Virtual Mode
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
In a fully virtualized VM, the mouse may be emulated as a PS/2 mouse, USB
|
In a fully virtualized VM, the mouse may be emulated as a PS/2 mouse, USB
|
||||||
mouse, or USB tablet. The vm-install tool selects the best emulation that is
|
mouse, or USB tablet. The vm-install tool selects the best emulation that is
|
||||||
known to be automatically detected and supported by the operating system.
|
known to be automatically detected and supported by the operating system.
|
||||||
|
|
||||||
However, when accessing some fully-virtualized operating systems via VNC, the
|
However, when accessing some fully virtualized operating systems via VNC, the
|
||||||
mouse may be difficult to control if the VM is emulating a PS/2 mouse. PS/2
|
mouse may be difficult to control if the VM is emulating a PS/2 mouse. PS/2
|
||||||
provides mouse deltas, but VNC only provides absolute coordinates. In such
|
provides mouse deltas, but VNC only provides absolute coordinates. In such
|
||||||
cases, you may want to manually switch the operating system and VM to use a
|
cases, you may want to manually switch the operating system and VM to use a
|
||||||
USB tablet.
|
USB tablet.
|
||||||
|
|
||||||
Emulation of a SummaSketch graphics tablet is provided for this reason. To
|
Emulation of a SummaSketch graphics tablet is provided for this reason. To
|
||||||
use the Summa emulation, you will need to configure your fully-virtualized OS.
|
use the Summa emulation, you will need to configure your fully virtualized OS.
|
||||||
Note that the virtual tablet is connected to the second virtual serial port
|
Note that the virtual tablet is connected to the second virtual serial port
|
||||||
(/dev/ttyS1 or COM2).
|
(/dev/ttyS1 or COM2).
|
||||||
|
|
||||||
@ -325,9 +326,9 @@ Then re-import the configuration into xend:
|
|||||||
xm new my-vm
|
xm new my-vm
|
||||||
|
|
||||||
|
|
||||||
HVM Console in Fully-Virtual Mode
|
HVM Console in Fully Virtual Mode
|
||||||
---------------------------------
|
---------------------------------
|
||||||
When running a VM in fully-virtual mode, a special console is available that
|
When running a VM in fully virtual mode, a special console is available that
|
||||||
provides some additional ways to control the VM. Press Ctrl-Alt-2 to access
|
provides some additional ways to control the VM. Press Ctrl-Alt-2 to access
|
||||||
the console; press Ctrl-Alt-1 to return to the VM. While at the console,
|
the console; press Ctrl-Alt-1 to return to the VM. While at the console,
|
||||||
type "help" for help.
|
type "help" for help.
|
||||||
|
774
cdrom-removable.patch
Normal file
774
cdrom-removable.patch
Normal file
@ -0,0 +1,774 @@
|
|||||||
|
Index: xen-3.1-testing/tools/ioemu/block.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.1-testing.orig/tools/ioemu/block.c 2007-07-17 08:02:01.000000000 -0600
|
||||||
|
+++ xen-3.1-testing/tools/ioemu/block.c 2007-07-17 08:05:58.000000000 -0600
|
||||||
|
@@ -185,6 +185,13 @@
|
||||||
|
uint8_t *buf;
|
||||||
|
size_t bufsize = 1024;
|
||||||
|
|
||||||
|
+ if ( strcmp(filename, "/dev/cdrom") == 0) {
|
||||||
|
+ drv = bdrv_find_format("raw");
|
||||||
|
+ if (drv != NULL) {
|
||||||
|
+ return(drv);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
|
||||||
|
if (fd < 0) {
|
||||||
|
buf = NULL;
|
||||||
|
@@ -536,21 +543,11 @@
|
||||||
|
return bs->read_only;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int bdrv_is_inserted(BlockDriverState *bs)
|
||||||
|
-{
|
||||||
|
- return bs->inserted;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
int bdrv_is_locked(BlockDriverState *bs)
|
||||||
|
{
|
||||||
|
return bs->locked;
|
||||||
|
}
|
||||||
|
|
||||||
|
-void bdrv_set_locked(BlockDriverState *bs, int locked)
|
||||||
|
-{
|
||||||
|
- bs->locked = locked;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void bdrv_set_change_cb(BlockDriverState *bs,
|
||||||
|
void (*change_cb)(void *opaque), void *opaque)
|
||||||
|
{
|
||||||
|
@@ -697,8 +694,10 @@
|
||||||
|
fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
|
||||||
|
if (fd < 0) {
|
||||||
|
fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
|
||||||
|
- if (fd < 0)
|
||||||
|
- return -1;
|
||||||
|
+ if (fd < 0 && strstart(filename, "/dev/cd", NULL))
|
||||||
|
+ fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE | O_NONBLOCK );
|
||||||
|
+ if (fd < 0)
|
||||||
|
+ return -1;
|
||||||
|
bs->read_only = 1;
|
||||||
|
}
|
||||||
|
#ifdef _BSD
|
||||||
|
@@ -769,8 +768,97 @@
|
||||||
|
BDRVRawState *s = bs->opaque;
|
||||||
|
bs->total_sectors = 0;
|
||||||
|
close(s->fd);
|
||||||
|
+ s->fd = -1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#include <linux/cdrom.h>
|
||||||
|
+#include <sys/ioctl.h>
|
||||||
|
+static int raw_is_inserted(BlockDriverState *bs)
|
||||||
|
+{
|
||||||
|
+ BDRVRawState *s = bs->opaque;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ switch(bs->removable) {
|
||||||
|
+ case BDRV_TYPE_CDROM:
|
||||||
|
+ ret = ioctl(s->fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
|
||||||
|
+ if (ret == CDS_DISC_OK) {
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ if (ret == -1) { // iso case
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int raw_media_changed(BlockDriverState *bs)
|
||||||
|
+{
|
||||||
|
+ int ret = 0;
|
||||||
|
+
|
||||||
|
+ switch(bs->removable) {
|
||||||
|
+ case BDRV_TYPE_CDROM:
|
||||||
|
+ {
|
||||||
|
+ if( bs->media_changed == 1 )
|
||||||
|
+ {
|
||||||
|
+ ret = 1;
|
||||||
|
+ bs->media_changed = 0;
|
||||||
|
+ }
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+ default:
|
||||||
|
+ return -ENOTSUP;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static int raw_eject(BlockDriverState *bs, int eject_flag)
|
||||||
|
+{
|
||||||
|
+ char cmd[sizeof(bs->device_name) + 32];
|
||||||
|
+
|
||||||
|
+ switch(bs->removable) {
|
||||||
|
+ case BDRV_TYPE_CDROM:
|
||||||
|
+ if (eject_flag) {
|
||||||
|
+ sprintf(cmd, "eject %s", bs->filename);
|
||||||
|
+ if (system(cmd) == -1) {
|
||||||
|
+ perror("CDROMEJECT");
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ sprintf(cmd, "eject -t %s", bs->filename);
|
||||||
|
+ if (system(cmd) == -1) {
|
||||||
|
+ perror("CDROMCLOSETRAY");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ return -ENOTSUP;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int raw_set_locked(BlockDriverState *bs, int locked)
|
||||||
|
+{
|
||||||
|
+ BDRVRawState *s = bs->opaque;
|
||||||
|
+
|
||||||
|
+ switch(bs->removable) {
|
||||||
|
+ case BDRV_TYPE_CDROM:
|
||||||
|
+ if (ioctl (s->fd, CDROM_LOCKDOOR, locked) < 0) {
|
||||||
|
+ /* Note: an error can happen if the distribution automatically
|
||||||
|
+ mounts the CD-ROM */
|
||||||
|
+ // perror("CDROM_LOCKDOOR");
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ return -ENOTSUP;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#include <winioctl.h>
|
||||||
|
@@ -850,6 +938,12 @@
|
||||||
|
raw_close,
|
||||||
|
raw_create,
|
||||||
|
raw_flush,
|
||||||
|
+
|
||||||
|
+ /* removable device support */
|
||||||
|
+ .bdrv_is_inserted = raw_is_inserted,
|
||||||
|
+ .bdrv_media_changed = raw_media_changed,
|
||||||
|
+ .bdrv_eject = raw_eject,
|
||||||
|
+ .bdrv_set_locked = raw_set_locked,
|
||||||
|
};
|
||||||
|
|
||||||
|
void bdrv_init(void)
|
||||||
|
@@ -866,3 +960,96 @@
|
||||||
|
bdrv_register(&bdrv_vpc);
|
||||||
|
bdrv_register(&bdrv_vvfat);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+/**************************************************************/
|
||||||
|
+/* removable device support */
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Return TRUE if the media is present
|
||||||
|
+ */
|
||||||
|
+int bdrv_is_inserted(BlockDriverState *bs)
|
||||||
|
+{
|
||||||
|
+ BlockDriver *drv = bs->drv;
|
||||||
|
+ int ret;
|
||||||
|
+ if (!drv)
|
||||||
|
+ return 0;
|
||||||
|
+ if (!drv->bdrv_is_inserted)
|
||||||
|
+ return 1;
|
||||||
|
+ ret = drv->bdrv_is_inserted(bs);
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Return TRUE if the media changed since the last call to this
|
||||||
|
+ * function.
|
||||||
|
+ */
|
||||||
|
+int bdrv_media_changed(BlockDriverState *bs)
|
||||||
|
+{
|
||||||
|
+ BlockDriver *drv = bs->drv;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ if (!drv || !drv->bdrv_media_changed)
|
||||||
|
+ ret = -ENOTSUP;
|
||||||
|
+ else
|
||||||
|
+ ret = drv->bdrv_media_changed(bs);
|
||||||
|
+ if (ret == -ENOTSUP)
|
||||||
|
+ ret = bs->media_changed;
|
||||||
|
+ bs->media_changed = 0;
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * If eject_flag is TRUE, eject the media. Otherwise, close the tray
|
||||||
|
+ */
|
||||||
|
+void bdrv_eject(BlockDriverState *bs, int eject_flag)
|
||||||
|
+{
|
||||||
|
+
|
||||||
|
+ int ret = 0;
|
||||||
|
+ char cmd[sizeof(bs->device_name) + 32];
|
||||||
|
+ BlockDriver *drv = bs->drv;
|
||||||
|
+
|
||||||
|
+ switch(bs->removable) {
|
||||||
|
+ case BDRV_TYPE_CDROM:
|
||||||
|
+ if (eject_flag) {
|
||||||
|
+ sprintf(cmd, "eject %s", bs->filename);
|
||||||
|
+ if (system(cmd) == -1) {
|
||||||
|
+ perror("CDROMEJECT");
|
||||||
|
+ ret = -ENOTSUP;
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ sprintf(cmd, "eject -t %s", bs->filename);
|
||||||
|
+ if (system(cmd) == -1) {
|
||||||
|
+ perror("CDROMCLOSETRAY");
|
||||||
|
+ ret = -ENOTSUP;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ if (!drv || !drv->bdrv_eject) {
|
||||||
|
+ ret = -ENOTSUP;
|
||||||
|
+ } else {
|
||||||
|
+ ret = drv->bdrv_eject(bs, eject_flag);
|
||||||
|
+ }
|
||||||
|
+ if (ret == -ENOTSUP) {
|
||||||
|
+ if (eject_flag)
|
||||||
|
+ bdrv_close(bs);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ //return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Lock or unlock the media (if it is locked, the user won't be able
|
||||||
|
+ * to eject it manually).
|
||||||
|
+ */
|
||||||
|
+void bdrv_set_locked(BlockDriverState *bs, int locked)
|
||||||
|
+{
|
||||||
|
+ BlockDriver *drv = bs->drv;
|
||||||
|
+
|
||||||
|
+ bs->locked = locked;
|
||||||
|
+ if (drv && drv->bdrv_set_locked) {
|
||||||
|
+ drv->bdrv_set_locked(bs, locked);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
Index: xen-3.1-testing/tools/ioemu/block_int.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.1-testing.orig/tools/ioemu/block_int.h 2007-05-17 09:51:09.000000000 -0600
|
||||||
|
+++ xen-3.1-testing/tools/ioemu/block_int.h 2007-07-17 08:05:58.000000000 -0600
|
||||||
|
@@ -41,6 +41,13 @@
|
||||||
|
int nb_sectors, int *pnum);
|
||||||
|
int (*bdrv_set_key)(BlockDriverState *bs, const char *key);
|
||||||
|
int (*bdrv_make_empty)(BlockDriverState *bs);
|
||||||
|
+
|
||||||
|
+ /* removable device specific */
|
||||||
|
+ int (*bdrv_is_inserted)(BlockDriverState *bs);
|
||||||
|
+ int (*bdrv_media_changed)(BlockDriverState *bs);
|
||||||
|
+ int (*bdrv_eject)(BlockDriverState *bs, int eject_flag);
|
||||||
|
+ int (*bdrv_set_locked)(BlockDriverState *bs, int locked);
|
||||||
|
+
|
||||||
|
struct BlockDriver *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -65,6 +72,7 @@
|
||||||
|
char backing_file[1024]; /* if non zero, the image is a diff of
|
||||||
|
this file image */
|
||||||
|
int is_temporary;
|
||||||
|
+ int media_changed;
|
||||||
|
|
||||||
|
BlockDriverState *backing_hd;
|
||||||
|
|
||||||
|
Index: xen-3.1-testing/tools/ioemu/hw/ide.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.1-testing.orig/tools/ioemu/hw/ide.c 2007-05-17 09:51:09.000000000 -0600
|
||||||
|
+++ xen-3.1-testing/tools/ioemu/hw/ide.c 2007-07-17 08:05:58.000000000 -0600
|
||||||
|
@@ -278,6 +278,7 @@
|
||||||
|
#define ASC_ILLEGAL_OPCODE 0x20
|
||||||
|
#define ASC_LOGICAL_BLOCK_OOR 0x21
|
||||||
|
#define ASC_INV_FIELD_IN_CMD_PACKET 0x24
|
||||||
|
+#define ASC_MEDIA_CHANGED 0x28
|
||||||
|
#define ASC_MEDIUM_NOT_PRESENT 0x3a
|
||||||
|
#define ASC_SAVING_PARAMETERS_NOT_SUPPORTED 0x39
|
||||||
|
|
||||||
|
@@ -393,6 +394,7 @@
|
||||||
|
} PCIIDEState;
|
||||||
|
|
||||||
|
#define DMA_MULTI_THREAD
|
||||||
|
+#undef DMA_MULTI_THREAD
|
||||||
|
|
||||||
|
#ifdef DMA_MULTI_THREAD
|
||||||
|
|
||||||
|
@@ -1341,7 +1343,6 @@
|
||||||
|
} else {
|
||||||
|
ide_atapi_cmd_error(s, SENSE_NOT_READY,
|
||||||
|
ASC_MEDIUM_NOT_PRESENT);
|
||||||
|
- xenstore_check_new_media_present(1000);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GPCMD_MODE_SENSE_10:
|
||||||
|
@@ -1530,7 +1531,10 @@
|
||||||
|
|
||||||
|
if (eject && !start) {
|
||||||
|
/* eject the disk */
|
||||||
|
- bdrv_close(s->bs);
|
||||||
|
+ bdrv_eject(s->bs, 1);
|
||||||
|
+ } else if (eject && start) {
|
||||||
|
+ /* close the tray */
|
||||||
|
+ bdrv_eject(s->bs, 0);
|
||||||
|
}
|
||||||
|
ide_atapi_cmd_ok(s);
|
||||||
|
}
|
||||||
|
Index: xen-3.1-testing/tools/ioemu/xenstore.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.1-testing.orig/tools/ioemu/xenstore.c 2007-05-17 09:51:09.000000000 -0600
|
||||||
|
+++ xen-3.1-testing/tools/ioemu/xenstore.c 2007-07-17 08:05:58.000000000 -0600
|
||||||
|
@@ -82,7 +82,7 @@
|
||||||
|
char **e = NULL;
|
||||||
|
char *buf = NULL, *path;
|
||||||
|
char *fpath = NULL, *bpath = NULL,
|
||||||
|
- *dev = NULL, *params = NULL, *type = NULL;
|
||||||
|
+ *dev = NULL, *params = NULL, *type = NULL, *media_present = NULL;
|
||||||
|
int i, is_scsi;
|
||||||
|
unsigned int len, num, hd_index;
|
||||||
|
|
||||||
|
@@ -170,6 +170,11 @@
|
||||||
|
bdrv_set_type_hint(bs_table[hd_index], BDRV_TYPE_CDROM);
|
||||||
|
if (pasprintf(&buf, "%s/params", bpath) != -1)
|
||||||
|
xs_watch(xsh, buf, dev);
|
||||||
|
+ if (pasprintf(&buf, "%s/media-present", bpath) != -1) {
|
||||||
|
+ free(media_present);
|
||||||
|
+ media_present = xs_read(xsh, XBT_NULL, buf, &len);
|
||||||
|
+ xs_watch(xsh, buf, "media_present");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
/* open device now if media present */
|
||||||
|
if (params[0]) {
|
||||||
|
@@ -313,7 +318,7 @@
|
||||||
|
|
||||||
|
void xenstore_process_event(void *opaque)
|
||||||
|
{
|
||||||
|
- char **vec, *image = NULL;
|
||||||
|
+ char **vec, *image = NULL, *media_present = NULL;
|
||||||
|
unsigned int len, num, hd_index;
|
||||||
|
|
||||||
|
vec = xs_read_watch(xsh, &num);
|
||||||
|
@@ -325,6 +330,40 @@
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!strcmp(vec[XS_WATCH_TOKEN], "media_present")) {
|
||||||
|
+ media_present = xs_read(xsh, XBT_NULL, vec[XS_WATCH_PATH], &len);
|
||||||
|
+ if (media_present) {
|
||||||
|
+ BlockDriverState *bs;
|
||||||
|
+ char *buf = NULL, *cp = NULL, *path = NULL, *dev = NULL;
|
||||||
|
+
|
||||||
|
+ path = strdup(vec[XS_WATCH_PATH]);
|
||||||
|
+ cp = strstr(path, "media-present");
|
||||||
|
+ if (cp){
|
||||||
|
+ *(cp-1) = '\0';
|
||||||
|
+ pasprintf(&buf, "%s/dev", path);
|
||||||
|
+ dev = xs_read(xsh, XBT_NULL, buf, &len);
|
||||||
|
+ if (dev) {
|
||||||
|
+ bs = bdrv_find(dev);
|
||||||
|
+ if (!bs) {
|
||||||
|
+ term_printf("device not found\n");
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+ if (strcmp(media_present, "0") == 0 && bs) {
|
||||||
|
+ bdrv_close(bs);
|
||||||
|
+ }
|
||||||
|
+ else if (strcmp(media_present, "1") == 0 && bs != NULL && bs->drv == NULL) {
|
||||||
|
+ if (bdrv_open(bs, bs->filename, 0 /* snapshot */) < 0) {
|
||||||
|
+ fprintf(stderr, "qemu: could not open hard disk image '%s'\n",
|
||||||
|
+ bs->filename);
|
||||||
|
+ }
|
||||||
|
+ bs->media_changed = 1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (strncmp(vec[XS_WATCH_TOKEN], "hd", 2) ||
|
||||||
|
strlen(vec[XS_WATCH_TOKEN]) != 3)
|
||||||
|
goto out;
|
||||||
|
Index: xen-3.1-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ xen-3.1-testing/tools/python/xen/xend/server/HalDaemon.py 2007-07-17 08:05:58.000000000 -0600
|
||||||
|
@@ -0,0 +1,228 @@
|
||||||
|
+#!/usr/bin/env python
|
||||||
|
+# -*- mode: python; -*-
|
||||||
|
+#============================================================================
|
||||||
|
+# This library is free software; you can redistribute it and/or
|
||||||
|
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
|
||||||
|
+# License as published by the Free Software Foundation.
|
||||||
|
+#
|
||||||
|
+# This library is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+# Lesser General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU Lesser General Public
|
||||||
|
+# License along with this library; if not, write to the Free Software
|
||||||
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
+#============================================================================
|
||||||
|
+# Copyright (C) 2007 Pat Campbell <plc@novell.com>
|
||||||
|
+# Copyright (C) 2007 Novell Inc.
|
||||||
|
+#============================================================================
|
||||||
|
+
|
||||||
|
+"""hald (Hardware Abstraction Layer Daemon) watcher for Xen management
|
||||||
|
+ of removable block device media.
|
||||||
|
+
|
||||||
|
+"""
|
||||||
|
+
|
||||||
|
+import gobject
|
||||||
|
+import dbus
|
||||||
|
+import dbus.glib
|
||||||
|
+import os
|
||||||
|
+import types
|
||||||
|
+import sys
|
||||||
|
+import signal
|
||||||
|
+import traceback
|
||||||
|
+from xen.xend.xenstore.xstransact import xstransact, complete
|
||||||
|
+from xen.xend.xenstore.xsutil import xshandle
|
||||||
|
+from xen.xend import PrettyPrint
|
||||||
|
+from xen.xend import XendLogging
|
||||||
|
+from xen.xend.XendLogging import log
|
||||||
|
+
|
||||||
|
+class HalDaemon:
|
||||||
|
+ """The Hald block device watcher for XEN
|
||||||
|
+ """
|
||||||
|
+
|
||||||
|
+ """Default path to the log file. """
|
||||||
|
+ logfile_default = "/var/log/xen/hald.log"
|
||||||
|
+
|
||||||
|
+ """Default level of information to be logged."""
|
||||||
|
+ loglevel_default = 'INFO'
|
||||||
|
+
|
||||||
|
+ def __init__(self):
|
||||||
|
+
|
||||||
|
+ XendLogging.init(self.logfile_default, self.loglevel_default)
|
||||||
|
+ log.debug( "%s", "__init__")
|
||||||
|
+
|
||||||
|
+ self.udi_dict = {}
|
||||||
|
+ self.debug = 0
|
||||||
|
+ self.dbpath = "/local/domain/0/backend/vbd"
|
||||||
|
+ self.bus = dbus.SystemBus()
|
||||||
|
+ self.hal_manager_obj = self.bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/Manager')
|
||||||
|
+ self.hal_manager = dbus.Interface( self.hal_manager_obj, 'org.freedesktop.Hal.Manager')
|
||||||
|
+ self.gatherBlockDevices()
|
||||||
|
+ self.registerDeviceCallbacks()
|
||||||
|
+
|
||||||
|
+ def run(self):
|
||||||
|
+ log.debug( "%s", "In new run" );
|
||||||
|
+ try:
|
||||||
|
+ self.mainloop = gobject.MainLoop()
|
||||||
|
+ self.mainloop.run()
|
||||||
|
+ except KeyboardInterrupt, ex:
|
||||||
|
+ log.debug('Keyboard exception handler: %s', ex )
|
||||||
|
+ self.mainloop.quit()
|
||||||
|
+ except Exception, ex:
|
||||||
|
+ log.debug('Generic exception handler: %s', ex )
|
||||||
|
+ self.mainloop.quit()
|
||||||
|
+
|
||||||
|
+ def __del__(self):
|
||||||
|
+ log.debug( "%s", "In del " );
|
||||||
|
+ self.unRegisterDeviceCallbacks()
|
||||||
|
+ self.mainloop.quit()
|
||||||
|
+
|
||||||
|
+ def shutdown(self):
|
||||||
|
+ log.debug( "%s", "In shutdown now " );
|
||||||
|
+ self.unRegisterDeviceCallbacks()
|
||||||
|
+ self.mainloop.quit()
|
||||||
|
+
|
||||||
|
+ def stop(self):
|
||||||
|
+ log.debug( "%s", "In stop now " );
|
||||||
|
+ self.unRegisterDeviceCallbacks()
|
||||||
|
+ self.mainloop.quit()
|
||||||
|
+
|
||||||
|
+ def gatherBlockDevices(self):
|
||||||
|
+
|
||||||
|
+ # Get all the current devices from hal and save in a dictionary
|
||||||
|
+ try:
|
||||||
|
+ device_names = self.hal_manager.GetAllDevices()
|
||||||
|
+ i = 0;
|
||||||
|
+ for name in device_names:
|
||||||
|
+ #log.debug("device name, device=%s",name)
|
||||||
|
+ dev_obj = self.bus.get_object ('org.freedesktop.Hal', name)
|
||||||
|
+ dev = dbus.Interface (dev_obj, 'org.freedesktop.Hal.Device')
|
||||||
|
+ dev_properties = dev_obj.GetAllProperties(dbus_interface="org.freedesktop.Hal.Device")
|
||||||
|
+ if dev_properties.has_key('block.device'):
|
||||||
|
+ dev_str = dev_properties['block.device']
|
||||||
|
+ dev_major = dev_properties['block.major']
|
||||||
|
+ dev_minor = dev_properties['block.minor']
|
||||||
|
+ udi_info = {}
|
||||||
|
+ udi_info['device'] = dev_str
|
||||||
|
+ udi_info['major'] = dev_major
|
||||||
|
+ udi_info['minor'] = dev_minor
|
||||||
|
+ udi_info['udi'] = name
|
||||||
|
+ self.udi_dict[i] = udi_info
|
||||||
|
+ i = i + 1
|
||||||
|
+ except Exception, ex:
|
||||||
|
+ print >>sys.stderr, 'Exception gathering block devices:', ex
|
||||||
|
+ log.warn("Exception gathering block devices (%s)",ex)
|
||||||
|
+
|
||||||
|
+ #
|
||||||
|
+ def registerDeviceCallbacks(self):
|
||||||
|
+ # setup the callbacks for when the gdl changes
|
||||||
|
+ self.hal_manager.connect_to_signal('DeviceAdded', self.device_added_callback)
|
||||||
|
+ self.hal_manager.connect_to_signal('DeviceRemoved', self.device_removed_callback)
|
||||||
|
+
|
||||||
|
+ #
|
||||||
|
+ def unRegisterDeviceCallbacks(self):
|
||||||
|
+ # setup the callbacks for when the gdl changes
|
||||||
|
+ self.hal_manager.remove_signal_receiver(self.device_added_callback,'DeviceAdded')
|
||||||
|
+ self.hal_manager.remove_signal_receiver(self.device_removed_callback,'DeviceRemoved')
|
||||||
|
+
|
||||||
|
+ #
|
||||||
|
+ def device_removed_callback(self,udi):
|
||||||
|
+ log.debug('UDI %s was removed',udi)
|
||||||
|
+ self.show_dict(self.udi_dict)
|
||||||
|
+ for key in self.udi_dict:
|
||||||
|
+ udi_info = self.udi_dict[key]
|
||||||
|
+ if udi_info['udi'] == udi:
|
||||||
|
+ device = udi_info['device']
|
||||||
|
+ major = udi_info['major']
|
||||||
|
+ minor = udi_info['minor']
|
||||||
|
+ self.change_xenstore( "remove", device, major, minor)
|
||||||
|
+
|
||||||
|
+ # Adds device to dictionary if not already there
|
||||||
|
+ def device_added_callback(self,udi):
|
||||||
|
+ log.debug('UDI %s was added', udi)
|
||||||
|
+ self.show_dict(self.udi_dict)
|
||||||
|
+ dev_obj = self.bus.get_object ('org.freedesktop.Hal', udi)
|
||||||
|
+ dev = dbus.Interface (dev_obj, 'org.freedesktop.Hal.Device')
|
||||||
|
+ device = dev.GetProperty ('block.device')
|
||||||
|
+ major = dev.GetProperty ('block.major')
|
||||||
|
+ minor = dev.GetProperty ('block.minor')
|
||||||
|
+ udi_info = {}
|
||||||
|
+ udi_info['device'] = device
|
||||||
|
+ udi_info['major'] = major
|
||||||
|
+ udi_info['minor'] = minor
|
||||||
|
+ udi_info['udi'] = udi
|
||||||
|
+ already = 0
|
||||||
|
+ cnt = 0;
|
||||||
|
+ for key in self.udi_dict:
|
||||||
|
+ info = self.udi_dict[key]
|
||||||
|
+ if info['udi'] == udi:
|
||||||
|
+ already = 1
|
||||||
|
+ break
|
||||||
|
+ cnt = cnt + 1
|
||||||
|
+ if already == 0:
|
||||||
|
+ self.udi_dict[cnt] = udi_info;
|
||||||
|
+ log.debug('UDI %s was added, device:%s major:%s minor:%s index:%d\n', udi, device, major, minor, cnt)
|
||||||
|
+ self.change_xenstore( "add", device, major, minor)
|
||||||
|
+
|
||||||
|
+ # Debug helper, shows dictionary contents
|
||||||
|
+ def show_dict(self,dict=None):
|
||||||
|
+ if self.debug == 0 :
|
||||||
|
+ return
|
||||||
|
+ if dict == None :
|
||||||
|
+ dict = self.udi_dict
|
||||||
|
+ for key in dict:
|
||||||
|
+ log.debug('udi_info %s udi_info:%s',key,dict[key])
|
||||||
|
+
|
||||||
|
+ # Set or clear xenstore media-present depending on the action argument
|
||||||
|
+ # for every vbd that has this block device
|
||||||
|
+ def change_xenstore(self,action, device, major, minor):
|
||||||
|
+ domains = xstransact.List(self.dbpath)
|
||||||
|
+ log.debug('domains: %s', domains)
|
||||||
|
+ for domain in domains: # for each domain
|
||||||
|
+ devices = xstransact.List( self.dbpath + '/' + domain)
|
||||||
|
+ log.debug('devices: %s',devices)
|
||||||
|
+ for device in devices: # for each vbd device
|
||||||
|
+ str = device.split('/')
|
||||||
|
+ vbd_type = None;
|
||||||
|
+ vbd_physical_device = None
|
||||||
|
+ vbd_media = None
|
||||||
|
+ vbd_device_path = self.dbpath + '/' + domain + '/' + device
|
||||||
|
+ listing = xstransact.List(vbd_device_path)
|
||||||
|
+ for entry in listing: # for each entry
|
||||||
|
+ item = self.dbpath + '/' + entry
|
||||||
|
+ value = xstransact.Read( vbd_device_path + '/' + entry)
|
||||||
|
+ log.debug('%s=%s',item,value)
|
||||||
|
+ if item.find('media-present') != -1:
|
||||||
|
+ vbd_media = item;
|
||||||
|
+ vbd_media_path = item
|
||||||
|
+ if item.find('physical-device') != -1:
|
||||||
|
+ vbd_physical_device = value;
|
||||||
|
+ if item.find('type') != -1:
|
||||||
|
+ vbd_type = value;
|
||||||
|
+ if vbd_type is not None and vbd_physical_device is not None and vbd_media is not None :
|
||||||
|
+ inode = vbd_physical_device.split(':')
|
||||||
|
+ imajor = inode[0]
|
||||||
|
+ iminor = inode[1]
|
||||||
|
+ log.debug("action:%s major:%s- minor:%s- imajor:%s- iminor:%s- inode: %s",
|
||||||
|
+ action,major,minor, imajor, iminor, inode)
|
||||||
|
+ if int(imajor) == int(major) and int(iminor) == int(minor):
|
||||||
|
+ if action == "add":
|
||||||
|
+ xs_dict = {'media': "1"}
|
||||||
|
+ xstransact.Write(vbd_device_path, 'media-present', "1" )
|
||||||
|
+ log.debug("wrote xenstore media-present 1 path:%s",vbd_media_path)
|
||||||
|
+ else:
|
||||||
|
+ xstransact.Write(vbd_device_path, 'media-present', "0" )
|
||||||
|
+ log.debug("wrote xenstore media 0 path:%s",vbd_media_path)
|
||||||
|
+
|
||||||
|
+def mylog( fmt, *args):
|
||||||
|
+ f = open('/tmp/haldaemon.log', 'a')
|
||||||
|
+ print >>f, "HalDaemon ", fmt % args
|
||||||
|
+ f.close()
|
||||||
|
+
|
||||||
|
+if __name__ == "__main__":
|
||||||
|
+ watcher = HalDaemon()
|
||||||
|
+ watcher.run()
|
||||||
|
+ print 'Falling off end'
|
||||||
|
+
|
||||||
|
+
|
||||||
|
Index: xen-3.1-testing/tools/python/xen/xend/server/Hald.py
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ xen-3.1-testing/tools/python/xen/xend/server/Hald.py 2007-07-17 08:05:58.000000000 -0600
|
||||||
|
@@ -0,0 +1,113 @@
|
||||||
|
+#============================================================================
|
||||||
|
+# This library is free software; you can redistribute it and/or
|
||||||
|
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
|
||||||
|
+# License as published by the Free Software Foundation.
|
||||||
|
+#
|
||||||
|
+# This library is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+# Lesser General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU Lesser General Public
|
||||||
|
+# License along with this library; if not, write to the Free Software
|
||||||
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
+#============================================================================
|
||||||
|
+# Copyright (C) 2007 Pat Campbell <plc@novell.com>
|
||||||
|
+# Copyright (C) 2007 Novell Inc.
|
||||||
|
+#============================================================================
|
||||||
|
+
|
||||||
|
+import errno
|
||||||
|
+import types
|
||||||
|
+import os
|
||||||
|
+import sys
|
||||||
|
+import time
|
||||||
|
+import signal
|
||||||
|
+from traceback import print_exc
|
||||||
|
+
|
||||||
|
+from xen.xend.XendLogging import log
|
||||||
|
+
|
||||||
|
+class Hald:
|
||||||
|
+ def __init__(self):
|
||||||
|
+ self.ready = False
|
||||||
|
+ self.running = True
|
||||||
|
+
|
||||||
|
+ def run(self):
|
||||||
|
+ """Starts the HalDaemon process
|
||||||
|
+ """
|
||||||
|
+ self.ready = True
|
||||||
|
+ try:
|
||||||
|
+ myfile = self.find("xen/xend/server/HalDaemon.py")
|
||||||
|
+ args = (["python", myfile ])
|
||||||
|
+ self.pid = self.daemonize("python", args )
|
||||||
|
+ #log.debug( "%s %s pid:%d", "Hald.py starting ", args, self.pid )
|
||||||
|
+ except:
|
||||||
|
+ self.pid = -1
|
||||||
|
+ log.debug("Unable to start HalDaemon process")
|
||||||
|
+
|
||||||
|
+ def shutdown(self):
|
||||||
|
+ """Shutdown the HalDaemon process
|
||||||
|
+ """
|
||||||
|
+ log.debug("%s pid:%d", "Hald.shutdown()", self.pid)
|
||||||
|
+ self.running = False
|
||||||
|
+ self.ready = False
|
||||||
|
+ if self.pid != -1:
|
||||||
|
+ try:
|
||||||
|
+ os.kill(self.pid, signal.SIGINT)
|
||||||
|
+ except:
|
||||||
|
+ print_exc()
|
||||||
|
+
|
||||||
|
+ def daemonize(self,prog, args):
|
||||||
|
+ """Runs a program as a daemon with the list of arguments. Returns the PID
|
||||||
|
+ of the daemonized program, or returns 0 on error.
|
||||||
|
+ Copied from xm/create.py instead of importing to reduce coupling
|
||||||
|
+ """
|
||||||
|
+ r, w = os.pipe()
|
||||||
|
+ pid = os.fork()
|
||||||
|
+
|
||||||
|
+ if pid == 0:
|
||||||
|
+ os.close(r)
|
||||||
|
+ w = os.fdopen(w, 'w')
|
||||||
|
+ os.setsid()
|
||||||
|
+ try:
|
||||||
|
+ pid2 = os.fork()
|
||||||
|
+ except:
|
||||||
|
+ pid2 = None
|
||||||
|
+ if pid2 == 0:
|
||||||
|
+ os.chdir("/")
|
||||||
|
+ for fd in range(0, 256):
|
||||||
|
+ try:
|
||||||
|
+ os.close(fd)
|
||||||
|
+ except:
|
||||||
|
+ pass
|
||||||
|
+ os.open("/dev/null", os.O_RDWR)
|
||||||
|
+ os.dup2(0, 1)
|
||||||
|
+ os.dup2(0, 2)
|
||||||
|
+ os.execvp(prog, args)
|
||||||
|
+ os._exit(1)
|
||||||
|
+ else:
|
||||||
|
+ w.write(str(pid2 or 0))
|
||||||
|
+ w.close()
|
||||||
|
+ os._exit(0)
|
||||||
|
+ os.close(w)
|
||||||
|
+ r = os.fdopen(r)
|
||||||
|
+ daemon_pid = int(r.read())
|
||||||
|
+ r.close()
|
||||||
|
+ os.waitpid(pid, 0)
|
||||||
|
+ #log.debug( "daemon_pid: %d", daemon_pid )
|
||||||
|
+ return daemon_pid
|
||||||
|
+
|
||||||
|
+ def find(self,path, matchFunc=os.path.isfile):
|
||||||
|
+ """Find a module in the sys.path
|
||||||
|
+ From web page: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52224
|
||||||
|
+ """
|
||||||
|
+ for dirname in sys.path:
|
||||||
|
+ candidate = os.path.join(dirname, path)
|
||||||
|
+ if matchFunc(candidate):
|
||||||
|
+ return candidate
|
||||||
|
+ raise Error("Can't find file %s" % path)
|
||||||
|
+
|
||||||
|
+if __name__ == "__main__":
|
||||||
|
+ watcher = Hald()
|
||||||
|
+ watcher.run()
|
||||||
|
+ time.sleep(10)
|
||||||
|
+ watcher.shutdown()
|
||||||
|
Index: xen-3.1-testing/tools/python/xen/xend/server/SrvServer.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.1-testing.orig/tools/python/xen/xend/server/SrvServer.py 2007-05-17 09:51:10.000000000 -0600
|
||||||
|
+++ xen-3.1-testing/tools/python/xen/xend/server/SrvServer.py 2007-07-17 08:05:58.000000000 -0600
|
||||||
|
@@ -57,6 +57,7 @@
|
||||||
|
|
||||||
|
from SrvRoot import SrvRoot
|
||||||
|
from XMLRPCServer import XMLRPCServer
|
||||||
|
+from xen.xend.server.Hald import Hald
|
||||||
|
|
||||||
|
xoptions = XendOptions.instance()
|
||||||
|
|
||||||
|
@@ -248,6 +249,8 @@
|
||||||
|
if xoptions.get_xend_unix_xmlrpc_server():
|
||||||
|
servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False))
|
||||||
|
|
||||||
|
+ servers.add(Hald())
|
||||||
|
+
|
||||||
|
|
||||||
|
def create():
|
||||||
|
root = SrvDir()
|
@ -1,14 +1,21 @@
|
|||||||
/var/log/xen/xend.log /var/log/xen/xend-debug.log {
|
compress
|
||||||
|
missingok
|
||||||
|
|
||||||
|
/var/log/xen/xend*.log {
|
||||||
rotate 5
|
rotate 5
|
||||||
size 1M
|
size 1M
|
||||||
notifempty
|
notifempty
|
||||||
missingok
|
copytruncate
|
||||||
nocompress
|
}
|
||||||
|
|
||||||
|
/var/log/xen/domain-builder-ng.log /var/log/xen/xen-hotplug.log {
|
||||||
|
rotate 2
|
||||||
|
size 100K
|
||||||
|
notifempty
|
||||||
copytruncate
|
copytruncate
|
||||||
}
|
}
|
||||||
|
|
||||||
/var/log/xen/qemu-dm.*.log {
|
/var/log/xen/qemu-dm.*.log {
|
||||||
rotate 0
|
rotate 0
|
||||||
missingok
|
|
||||||
monthly
|
monthly
|
||||||
}
|
}
|
||||||
|
15
rtl8139-data-corruption.patch
Normal file
15
rtl8139-data-corruption.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Bugzilla #254646
|
||||||
|
|
||||||
|
Index: xen-3.0.4-testing/tools/ioemu/hw/rtl8139.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.0.4-testing.orig/tools/ioemu/hw/rtl8139.c
|
||||||
|
+++ xen-3.0.4-testing/tools/ioemu/hw/rtl8139.c
|
||||||
|
@@ -754,7 +754,7 @@ static void rtl8139_write_buffer(RTL8139
|
||||||
|
int wrapped = MOD2(s->RxBufAddr + size, s->RxBufferSize);
|
||||||
|
|
||||||
|
/* write packet data */
|
||||||
|
- if (wrapped && s->RxBufferSize < 65536 && !rtl8139_RxWrap(s))
|
||||||
|
+ if (wrapped && !(s->RxBufferSize < 65536 && rtl8139_RxWrap(s)))
|
||||||
|
{
|
||||||
|
DEBUG_PRINT((">>> RTL8139: rx packet wrapped in buffer at %d\n", size-wrapped));
|
||||||
|
|
@ -1,110 +0,0 @@
|
|||||||
Index: xen-3.1-testing/tools/firmware/vmxassist/vm86.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.1-testing.orig/tools/firmware/vmxassist/vm86.c
|
|
||||||
+++ xen-3.1-testing/tools/firmware/vmxassist/vm86.c
|
|
||||||
@@ -40,7 +40,7 @@ enum vm86_mode mode = 0;
|
|
||||||
static struct regs saved_rm_regs;
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
-int traceset = 0;
|
|
||||||
+int traceset = 0xffffffff;
|
|
||||||
|
|
||||||
char *states[] = {
|
|
||||||
"<VM86_REAL>",
|
|
||||||
@@ -164,6 +164,35 @@ address(struct regs *regs, unsigned seg,
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+panic_eip(struct regs *regs, char *fmt, ...)
|
|
||||||
+{
|
|
||||||
+ va_list ap;
|
|
||||||
+ va_start(ap, fmt);
|
|
||||||
+ vprintf(fmt, ap);
|
|
||||||
+ printf("\n");
|
|
||||||
+ va_end(ap);
|
|
||||||
+#ifdef DEBUG
|
|
||||||
+ if (regs->eflags & EFLAGS_VM) {
|
|
||||||
+ unsigned int range = 20;
|
|
||||||
+ unsigned int eip = address(regs, regs->cs, regs->eip);
|
|
||||||
+ unsigned int start = (eip < range) ? 0 : eip - range;
|
|
||||||
+ unsigned int stop = (eip > 0x100000 - range) ? 0x100000 : eip + range;
|
|
||||||
+ int size = (stop - start);
|
|
||||||
+ unsigned int i;
|
|
||||||
+ unsigned char data[size];
|
|
||||||
+
|
|
||||||
+ printf("Dumping %x..%x eip=%x\n", start, stop, eip);
|
|
||||||
+ for (i = start; i < stop; ++i)
|
|
||||||
+ data[i-start] = *(unsigned char *) i;
|
|
||||||
+ hexdump(data, size);
|
|
||||||
+ }
|
|
||||||
+#else
|
|
||||||
+ regs = regs;
|
|
||||||
+#endif
|
|
||||||
+ halt();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
#ifdef DEBUG
|
|
||||||
void
|
|
||||||
trace(struct regs *regs, int adjust, char *fmt, ...)
|
|
||||||
@@ -1636,7 +1665,7 @@ emulate(struct regs *regs)
|
|
||||||
/* detect the case where we are not making progress */
|
|
||||||
if (nemul == 0 && prev_eip == regs->eip) {
|
|
||||||
flteip = address(regs, MASK16(regs->cs), regs->eip);
|
|
||||||
- panic("Unknown opcode at %04x:%04x=0x%x",
|
|
||||||
+ panic_eip(regs, "Unknown opcode at %04x:%04x=0x%x",
|
|
||||||
MASK16(regs->cs), regs->eip, flteip);
|
|
||||||
} else
|
|
||||||
prev_eip = regs->eip;
|
|
||||||
@@ -1662,7 +1691,7 @@ trap(int trapno, int errno, struct regs
|
|
||||||
if (mode == VM86_REAL)
|
|
||||||
return;
|
|
||||||
if (mode != VM86_REAL_TO_PROTECTED)
|
|
||||||
- panic("not in real-to-protected mode");
|
|
||||||
+ panic_eip(regs, "not in real-to-protected mode");
|
|
||||||
emulate(regs);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@@ -1672,7 +1701,7 @@ trap(int trapno, int errno, struct regs
|
|
||||||
if (regs->eflags & EFLAGS_VM) {
|
|
||||||
/* emulate any 8086 instructions */
|
|
||||||
if (mode == VM86_PROTECTED)
|
|
||||||
- panic("unexpected protected mode");
|
|
||||||
+ panic_eip(regs, "unexpected protected mode");
|
|
||||||
emulate(regs);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Index: xen-3.1-testing/tools/firmware/rombios/rombios.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.1-testing.orig/tools/firmware/rombios/rombios.c
|
|
||||||
+++ xen-3.1-testing/tools/firmware/rombios/rombios.c
|
|
||||||
@@ -131,18 +131,18 @@
|
|
||||||
//
|
|
||||||
// BCC Bug: find a generic way to handle the bug of #asm after an "if" (fixed in 0.16.7)
|
|
||||||
|
|
||||||
-#define DEBUG_ROMBIOS 0
|
|
||||||
+#define DEBUG_ROMBIOS 1
|
|
||||||
|
|
||||||
-#define DEBUG_ATA 0
|
|
||||||
-#define DEBUG_INT13_HD 0
|
|
||||||
-#define DEBUG_INT13_CD 0
|
|
||||||
-#define DEBUG_INT13_ET 0
|
|
||||||
-#define DEBUG_INT13_FL 0
|
|
||||||
-#define DEBUG_INT15 0
|
|
||||||
-#define DEBUG_INT16 0
|
|
||||||
-#define DEBUG_INT1A 0
|
|
||||||
-#define DEBUG_INT74 0
|
|
||||||
-#define DEBUG_APM 0
|
|
||||||
+#define DEBUG_ATA 1
|
|
||||||
+#define DEBUG_INT13_HD 1
|
|
||||||
+#define DEBUG_INT13_CD 1
|
|
||||||
+#define DEBUG_INT13_ET 1
|
|
||||||
+#define DEBUG_INT13_FL 1
|
|
||||||
+#define DEBUG_INT15 1
|
|
||||||
+#define DEBUG_INT16 1
|
|
||||||
+#define DEBUG_INT1A 1
|
|
||||||
+#define DEBUG_INT74 1
|
|
||||||
+#define DEBUG_APM 1
|
|
||||||
|
|
||||||
#define BX_CPU 3
|
|
||||||
#define BX_USE_PS2_MOUSE 1
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: xen-3.0.5-testing/tools/python/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.0.5-testing.orig/tools/python/Makefile
|
|
||||||
+++ xen-3.0.5-testing/tools/python/Makefile
|
|
||||||
@@ -6,7 +6,7 @@ all: build
|
|
||||||
|
|
||||||
# For each new supported translation, add its name here, eg 'fr_FR'
|
|
||||||
# to cause the .po file to be built & installed, eg
|
|
||||||
-LINGUAS :=
|
|
||||||
+LINGUAS := $(shell find xen/xm/messages/ -name '*.po' | sed -e 's,.*/\([^/]*\)/[^/]*$$,\1,')
|
|
||||||
POPACKAGE := xen-xm
|
|
||||||
PODIR := xen/xm/messages
|
|
||||||
POTFILE := $(PODIR)/xen-xm.pot
|
|
13
xen.changes
13
xen.changes
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 19 13:41:15 MDT 2007 - ccoffing@novell.com
|
||||||
|
|
||||||
|
- BuildRequires LibVNCServer-devel
|
||||||
|
- Rotate all logs.
|
||||||
|
- Fix network data corruption on Win2003 with rtl8139. (#254646)
|
||||||
|
- Xen fails to create VM due to "out of memory" errors. (#280637)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 17 08:23:18 MDT 2007 - plc@novell.com
|
||||||
|
|
||||||
|
- Added CDROM removable media patch from 3.0.4
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 6 14:34:20 MDT 2007 - ccoffing@novell.com
|
Fri Jul 6 14:34:20 MDT 2007 - ccoffing@novell.com
|
||||||
|
|
||||||
|
67
xen.spec
67
xen.spec
@ -21,7 +21,7 @@ Name: xen
|
|||||||
# openSUSE 10.3 kernel is not yet ready...
|
# openSUSE 10.3 kernel is not yet ready...
|
||||||
%define with_kmp 0
|
%define with_kmp 0
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: LibVNCServer SDL-devel autoconf automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel openssl openssl-devel python-devel transfig
|
BuildRequires: LibVNCServer-devel SDL-devel autoconf automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel openssl openssl-devel python-devel transfig
|
||||||
%if %suse_version >= 1030
|
%if %suse_version >= 1030
|
||||||
BuildRequires: texlive texlive-latex
|
BuildRequires: texlive texlive-latex
|
||||||
%else
|
%else
|
||||||
@ -34,7 +34,7 @@ BuildRequires: glibc-32bit glibc-devel-32bit
|
|||||||
BuildRequires: kernel-source kernel-syms xorg-x11
|
BuildRequires: kernel-source kernel-syms xorg-x11
|
||||||
%endif
|
%endif
|
||||||
Version: 3.1.0_15042
|
Version: 3.1.0_15042
|
||||||
Release: 9
|
Release: 12
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
@ -58,23 +58,27 @@ Source17: sysconfig.xend
|
|||||||
Source18: network-multi
|
Source18: network-multi
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
Patch0: 15048-localtime.diff
|
Patch0: 15048-localtime.diff
|
||||||
Patch1: 15157_xend_device_destroy.patch
|
Patch1: 15059-check-libvncserver.patch
|
||||||
Patch2: 15173-32on64-runstate.patch
|
Patch2: 15060-check-xenapi.patch
|
||||||
Patch3: 15183-32on64-multicall.patch
|
Patch3: 15061-kill-sh_mapcache.patch
|
||||||
Patch4: 15189-pmtimer.patch
|
Patch4: 15157_xend_device_destroy.patch
|
||||||
Patch5: 15190-clocksource-opt.patch
|
Patch5: 15173-32on64-runstate.patch
|
||||||
Patch6: 15250_xend_device_destroy.patch
|
Patch6: 15183-32on64-multicall.patch
|
||||||
Patch7: 15273_libxenapi.patch
|
Patch7: 15189-pmtimer.patch
|
||||||
Patch8: 15274_xenapi.patch
|
Patch8: 15190-clocksource-opt.patch
|
||||||
Patch9: 15275_xenapi.patch
|
Patch9: 15250_xend_device_destroy.patch
|
||||||
Patch10: 15389-32on64-memop-error-path.patch
|
Patch10: 15273_libxenapi.patch
|
||||||
Patch11: 15390-32on64-setup-error-path.patch
|
Patch11: 15274_xenapi.patch
|
||||||
Patch12: 15391-32on64-setup-pgtable.patch
|
Patch12: 15275_xenapi.patch
|
||||||
Patch13: 15410-domain-restore.patch
|
Patch13: 15389-32on64-memop-error-path.patch
|
||||||
Patch14: 15416-x86_64-failsafe.patch
|
Patch14: 15390-32on64-setup-error-path.patch
|
||||||
Patch15: 15433-pae-ptwr-check.patch
|
Patch15: 15391-32on64-setup-pgtable.patch
|
||||||
Patch16: 15444-vmxassist-p2r.patch
|
Patch16: 15410-domain-restore.patch
|
||||||
Patch17: man-page.diff
|
Patch17: 15416-x86_64-failsafe.patch
|
||||||
|
Patch18: 15433-pae-ptwr-check.patch
|
||||||
|
Patch19: 15444-vmxassist-p2r.patch
|
||||||
|
Patch20: 15480-man-xm.patch
|
||||||
|
Patch21: rtl8139-data-corruption.patch
|
||||||
# Our patches
|
# Our patches
|
||||||
Patch100: xen-config.diff
|
Patch100: xen-config.diff
|
||||||
Patch101: xend-config.diff
|
Patch101: xend-config.diff
|
||||||
@ -87,7 +91,6 @@ Patch108: xen-xmexample.diff
|
|||||||
Patch109: xen-xmexample-nbd.diff
|
Patch109: xen-xmexample-nbd.diff
|
||||||
Patch110: xen-bootloader-dryrun.diff
|
Patch110: xen-bootloader-dryrun.diff
|
||||||
Patch111: xen-domUloader.diff
|
Patch111: xen-domUloader.diff
|
||||||
Patch112: xen-linguas.diff
|
|
||||||
Patch113: xen-network-bridge.diff
|
Patch113: xen-network-bridge.diff
|
||||||
Patch114: xen-no-dummy-nfs-ip.diff
|
Patch114: xen-no-dummy-nfs-ip.diff
|
||||||
Patch115: serial-split.patch
|
Patch115: serial-split.patch
|
||||||
@ -109,7 +112,6 @@ Patch130: xen-generate-foreign-headers.diff
|
|||||||
Patch131: tools-xc_kexec.diff
|
Patch131: tools-xc_kexec.diff
|
||||||
Patch132: tools-kboot.diff
|
Patch132: tools-kboot.diff
|
||||||
Patch133: libxen_permissive.patch
|
Patch133: libxen_permissive.patch
|
||||||
Patch134: xend_multiple_create.patch
|
|
||||||
Patch135: xen-ioemu-hvm-pv-support.diff
|
Patch135: xen-ioemu-hvm-pv-support.diff
|
||||||
Patch136: xenapi-console-protocol.patch
|
Patch136: xenapi-console-protocol.patch
|
||||||
Patch137: xen-disable-qemu-monitor.diff
|
Patch137: xen-disable-qemu-monitor.diff
|
||||||
@ -120,13 +122,11 @@ Patch141: qemu-security-etch1.diff
|
|||||||
Patch142: netfront_mac.patch
|
Patch142: netfront_mac.patch
|
||||||
Patch143: vnc-i18n-keys.diff
|
Patch143: vnc-i18n-keys.diff
|
||||||
Patch144: rpmlint.diff
|
Patch144: rpmlint.diff
|
||||||
|
Patch145: cdrom-removable.patch
|
||||||
# Patches from Jan
|
# Patches from Jan
|
||||||
Patch180: inval-sh-ldt.patch
|
Patch180: inval-sh-ldt.patch
|
||||||
Patch181: 32on64-cpuid.patch
|
Patch181: 32on64-cpuid.patch
|
||||||
Patch182: 32on64-ioemu.patch
|
Patch182: 32on64-ioemu.patch
|
||||||
Patch183: check-libvncserver.patch
|
|
||||||
Patch184: check-xenapi.patch
|
|
||||||
Patch185: kill-sh_mapcache.patch
|
|
||||||
Patch186: intpte_t-cast.patch
|
Patch186: intpte_t-cast.patch
|
||||||
Patch187: ptwr-sanity.patch
|
Patch187: ptwr-sanity.patch
|
||||||
Patch188: hvm-pio-read.patch
|
Patch188: hvm-pio-read.patch
|
||||||
@ -152,7 +152,7 @@ Patch207: x86-machine-check.patch
|
|||||||
Patch208: x86-emul-rf.patch
|
Patch208: x86-emul-rf.patch
|
||||||
Patch209: vmx-check-descr.patch
|
Patch209: vmx-check-descr.patch
|
||||||
Patch210: x86_64-syscall-clear-df.patch
|
Patch210: x86_64-syscall-clear-df.patch
|
||||||
Patch300: xen-enable-hvm-debug.diff
|
Patch211: 32on64-extra-mem.patch
|
||||||
URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
|
URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
ExclusiveArch: %ix86 x86_64 ia64
|
ExclusiveArch: %ix86 x86_64 ia64
|
||||||
@ -543,6 +543,10 @@ Authors:
|
|||||||
%patch15 -p1
|
%patch15 -p1
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
%patch17 -p1
|
%patch17 -p1
|
||||||
|
%patch18 -p1
|
||||||
|
%patch19 -p1
|
||||||
|
%patch20 -p1
|
||||||
|
%patch21 -p1
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
@ -554,7 +558,6 @@ Authors:
|
|||||||
%patch109 -p1
|
%patch109 -p1
|
||||||
%patch110 -p1
|
%patch110 -p1
|
||||||
%patch111 -p1
|
%patch111 -p1
|
||||||
#%patch112 -p1 # po files are misnamed upstream
|
|
||||||
%patch113 -p1
|
%patch113 -p1
|
||||||
%patch114 -p1
|
%patch114 -p1
|
||||||
%patch115 -p1
|
%patch115 -p1
|
||||||
@ -576,7 +579,6 @@ Authors:
|
|||||||
%patch131 -p1
|
%patch131 -p1
|
||||||
%patch132 -p1
|
%patch132 -p1
|
||||||
%patch133 -p1
|
%patch133 -p1
|
||||||
#%patch134 -p1 # check if bug still exists in 3.1.0
|
|
||||||
#%patch135 -p1 # re-port
|
#%patch135 -p1 # re-port
|
||||||
%patch136 -p1
|
%patch136 -p1
|
||||||
%patch137 -p1
|
%patch137 -p1
|
||||||
@ -587,12 +589,10 @@ Authors:
|
|||||||
%patch142 -p1
|
%patch142 -p1
|
||||||
%patch143 -p1
|
%patch143 -p1
|
||||||
%patch144 -p1
|
%patch144 -p1
|
||||||
|
%patch145 -p1
|
||||||
%patch180 -p1
|
%patch180 -p1
|
||||||
%patch181 -p1
|
%patch181 -p1
|
||||||
%patch182 -p1
|
%patch182 -p1
|
||||||
%patch183 -p1
|
|
||||||
%patch184 -p1
|
|
||||||
%patch185 -p1
|
|
||||||
%patch186 -p1
|
%patch186 -p1
|
||||||
%patch187 -p1
|
%patch187 -p1
|
||||||
%patch188 -p1
|
%patch188 -p1
|
||||||
@ -929,6 +929,13 @@ rm -f $RPM_BUILD_ROOT/%pysite/*.egg-info
|
|||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 19 2007 - ccoffing@novell.com
|
||||||
|
- BuildRequires LibVNCServer-devel
|
||||||
|
- Rotate all logs.
|
||||||
|
- Fix network data corruption on Win2003 with rtl8139. (#254646)
|
||||||
|
- Xen fails to create VM due to "out of memory" errors. (#280637)
|
||||||
|
* Tue Jul 17 2007 - plc@novell.com
|
||||||
|
- Added CDROM removable media patch from 3.0.4
|
||||||
* Fri Jul 06 2007 - ccoffing@novell.com
|
* Fri Jul 06 2007 - ccoffing@novell.com
|
||||||
- xensource bug #858: Disable strict aliasing for xenstore, to
|
- xensource bug #858: Disable strict aliasing for xenstore, to
|
||||||
avoid domU hangs.
|
avoid domU hangs.
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
Bugzilla #245253
|
|
||||||
|
|
||||||
Index: xen-3.0.4-testing/tools/python/xen/xend/XendDomain.py
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.0.4-testing.orig/tools/python/xen/xend/XendDomain.py
|
|
||||||
+++ xen-3.0.4-testing/tools/python/xen/xend/XendDomain.py
|
|
||||||
@@ -32,6 +32,7 @@ import threading
|
|
||||||
import xen.lowlevel.xc
|
|
||||||
|
|
||||||
|
|
||||||
+from xen.xend import sxp
|
|
||||||
from xen.xend import XendRoot, XendCheckpoint, XendDomainInfo
|
|
||||||
from xen.xend.PrettyPrint import prettyprint
|
|
||||||
from xen.xend.XendConfig import XendConfig
|
|
||||||
@@ -860,6 +861,11 @@ class XendDomain:
|
|
||||||
self.domains_lock.acquire()
|
|
||||||
try:
|
|
||||||
self._refresh()
|
|
||||||
+ for domid, dom in self.domains.items():
|
|
||||||
+ if (dom.state != DOM_STATE_HALTED and
|
|
||||||
+ (dom.getName() == sxp.child_value(config, 'name') or
|
|
||||||
+ dom.get_uuid() == sxp.child_value(config, 'uuid'))):
|
|
||||||
+ raise XendError("Domain is already running")
|
|
||||||
|
|
||||||
dominfo = XendDomainInfo.create(config)
|
|
||||||
self._add_domain(dominfo)
|
|
Loading…
Reference in New Issue
Block a user