abstract base class, which was never going to work. (This is debugging code
only, so I presume that no-one has used it for a long time, but it's doing no
harm hanging around.)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
entries in vif to guide the configuration. This is much less confusing.
Closes bug #440.
Change the example configuration files to match. Also change them to use the
XenSource OUI in the MAC addresses. Also change xm-test to match.
Remove the obsolete ipaddr configuration entry, and the backend_mac vif config
option.
Remove the preprocess_vifs function, folding it into the configure_vifs
function, and creating a simple comma_sep_kv_to_dict helper.
Remove the configure_vfr method, as it is unused.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
the acceptable connections based upon a regular expression comparison with the
FQDN or the IP address.
Use the hosts-allow facility to restrict access to the relocation socket. This
adds the configuration option xend-relocation-hosts-allow, which takes a
space-separated sequence of regular expressions.
Pass the protocol class instance through to SocketServerConnection, rather than
a new instance of that class. This means that the new instance need not be
passed through SocketListener.acceptConnection.
Make the SocketServerConnection and SocketListener classes start their
corresponding threads and open their sockets (in the case of SocketListener)
automatically. This means that callers do not need to save an instance locally,
just to call run() or listen() on it. This also means that listenTCP and
listenUnix can go -- simply creating a TCPListener or UnixListener instance is
sufficient.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
staying alive to watch the child. If the child crashes, then the parent
starts another one in its place. This provides robustness in the face of
crashes like one currently tracked as bug #411.
Tidy up chunks of SrvDaemon.py on the way past.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
memory reservation and didn't read the comments I left in the code:
# repin domain vcpus if a restricted cpus list is provided
# this is done prior to memory allocation to aide in memory
# distribution for NUMA systems.
This patch moves the pincpu op back to where it was.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
* For setsid to effectively detach a process from the terminal,
the following needs to occur:
fork () Return control to the shell
setsid () New session with no controlling terminal
fork () The session leader (parent) exits and thus
the resulting child process can never regain the terminal
This patch adds the second fork
* The call to self.daemonize(), which now forks, is moved to
run before self.tracing(), as now that it actually disconnects
from the terminal, and thus the prevailing process, the trace
loses the processes created in self.run().
Signed-off-by: Ewan Mellor <ewan@xensource.com>
block inside accept rather than using select to poll and then calling accept
regardless of the outcome of the select call, and then failing because the
socket is non-blocking.
SocketClientConnection, SocketConnector, TCPClientConnection, TCPConnector,
connectTCP, UnixClientConnection, UnixConnector, connectUnix have gone.
loseConnection and stopListening and closeSocket (where they are needed) are
now called close. startListening is now called listen.
Closes bug #379.
Relieves a weight from the shoulders of the universe.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
that there is not sufficient memory available at the moment. Memory may be
about to be freed up by the system after a domain destruction (i.e. the memory
is being scrubbed asynchronously, and will be released soon).
Closes bug #407, bug #429.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
vcpus entry in the image section when using VMX, only add VMX options at all
if the builder is vmx, and issue a warning when overriding the global vcpus
setting with the one from the image.
This removes the duplicated vcpus entries in the domain's sxpr.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Title. 1 is const string "-domain-name", the other is the string of
domain name. At present imagy.py combines these two strings to 1. So
Qemu will fail to recognize it and fail to start.
Signed-off-by: Yongkang You <yongkang.you@intel.com>
CPUs a domains' vcpus can use. The older 'cpu' config option is
prepended to the list of cpus to use and will keep the behavior of
pinning VCPU0.
The cpus option supports ranges and negation, so:
cpus = "0-3,5,^1" produces -> [0,2,3,5]
The list is circular, so in a domain with the following config:
vcpus = 4
cpus = "0,3,7" # Use any of 0, 3, 7 for this domain.
would see vcpus 0-3 pinned to cpus 0,3,7,0 respectively.
Also, the pin operation is moved before the memory reservation as vcpu
to cpu mapping will be helpful for future NUMA work when trying to
allocate pages close to the physical cpus being used.
An update to the display of cpumap was needed to normalize the cpumap
values to the range of possible cpus.
I've also included some text for the xmdomain.cfg(5) man page.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
want to end up with multiple watches on the same path, otherwise we get a
watch event storm after many such reboots or migrates.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This transaction may be starved for a short while, and logging inside the while
loop won't help!
Use new xstransact.complete to tidy up one other transaction.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
the permission checking in xenstored.
Default the store permissions to read/write nobody (apart from the privileged
domain). Create a /local node with these permissions, ready for inheriting by
children. In Xend, create a /vm node with these permissions too, for the same
reason, and set the permissions on /local/domain/<domid> and each device
backend path to allow the guest domain to access these paths appropriately.
Added xstransact.{set_permissions,SetPermissions,mkdir,Mkdir,complete} as
support facilities.
This closes bug #290.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
parsed the same as xm list --long VM. This is only in Python 2.3 -- for
Python 2.2 we keep the old getopt.getopt behaviour.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
server, where it can be used on reboot and migrate as well as create.
Ballooning bugs may still exist (it is unclear) but this is certainly a good
step in the right direction.
Ignore the memory and maxmem entries in the store for dom0 when restarting.
This means that the value in use at the time becomes the configured target.
This should fix the bug whereby dom0_mem settings on the command line are
being overridden by (older) entries in the store.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
dependency between those two classes.
Split the XendDomain constructor into two pieces so that XendDomainInfo can
call XendDomain.instance even during the initial startup of XendDomain.
These two together mean that there is no need for the horrendous hack using
XendRoot.get_component to pass the singleton instance of XendDomain around.
Both XendRoot.get_component and XendRoot.add_component can go.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
xc has access to the page size for the platform and the Python layer does not,
so there was a hardcoded "/ 256" in there.
Rename the "memory" physinfo parameter to "total_memory", to match the usage
elsewhere.
Tidy the code generating the SXP for xm info.
Signed-off-by: Ewan Mellor <ewan@xensource.com>