xm's pincpu has a problem handling the cpu parameter if the cpu number
is more than one digit. This patch fixes it.
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
relocate.py, SrvDomain.py, XendDomain.py:
Support vm relocation using XendCheckpoint.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomain.py:
Improve error handling.
XendCheckpoint.py:
Switch restore to use os functions to read from the state file.
Simplify code.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomain.py:
Move save/restore code in seperate file.
XendCheckpoint.py:
Support code for save/restore of domains.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
this patch fixes a wrong email address and replaces a number (errno)
with a defined constant to make it more portable.
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
Nothing but vnet uses libxutil -- move it there.
Makefile, xc.c, setup.py, configure, configure.in, Makefile.in:
This doesn't use libxutil.
Makefile, Makefile.vnet, Rules.mk:
Move libxutil into vnet since it's only used there.
Many files:
mvdir
Implement the parts of vm save which need interaction with xend
as part of xend, instead of using xfrd.
Execute xc_linux_save in a seperate process so that it can't
crash xend. Also handle errors passed from xc_linux_save.
xen_domain.c:
Disable save in xfrd.
xc_save.c:
new file
Makefile:
Add xc_save.
XendDomainInfo.py:
Add suspended state and threading Condition with notification, allowing
easy waiting for state changes.
XendDomain.py:
Implement the parts of vm save which need interaction with xend
as part of xend, instead of using xfrd. Set state to "suspended"
when detecting a suspended domain.
Fix reading output from subprocesses.
Fix ValueError in xen_domain().
xc.c:
Remove python binding for xc_linux_save.
xc_linux_save.c:
Implement the parts of vm save which need interaction with xend
as part of xend, instead of using xfrd. Also run xc_linux_save
in a seperate process.
xc_linux_restore.c:
Flush output so that xend picks it up timely.
Also disable debug output again.
xc.h:
Update xc_linux_save prototype and fix comments for xc_linux_{save,restore}.
ignore:
Add tools/xcutils/xc_save.
xpopen.py:
Exit with 127 if exec fails.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomain.py:
Handle error case where exec fails.
xpopen.py:
Exit with 127 if exec fails.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Execute xc_linux_restore in a seperate process so that it can't
crash xend. Also handle errors passed from xc_linux_restore and
log info messages from xc_linux_restore.
XendDomain.py:
Popen xc_restore instead of calling xc_linux_restore directly.
xc.c:
Add pyxc_handle exporting the file descriptor to the control interface.
Remove xc_linux_restore -- replaced by popen of xc_restore directly
from python.
xc_linux_restore.c:
Enable debug output.
xpopen.py:
Add xpopen functionality:
Optionally exclude a list of file descriptors from being closed, allowing
access to those file descriptors from the command.
Remove unused parts.
xpopen.py, Makefile, xc_restore.c:
new file
Makefile:
Add xcutils subdir.
ignore:
Add tools/xcutils/xc_restore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
better support for vnc in qemu device model:
- different ports for different VMs
- allow reverse connect to a running viewer
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@intel.com>
XendDomain.py, xc.c, xc_linux_restore.c, xc.h:
Move read of pfn to mfn frame list into xc_linux_restore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomainInfo.py, XendDomain.py, xc.c, xc_linux_restore.c, xc.h:
Implement the parts of vm restore which need interaction with xend
as part of xend, instead of using xfrd. The restore functionality
using xfrd was broken anyway since xend didn't handle the callback
channel from xfrd correctly.
xen_domain.c:
Disable restore in xfrd.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomainInfo.py, xc.c, xc_linux_restore.c, xc_domain.c, xc.h:
Split pincpu, setcpuweight, setmaxmem and memory increase reservation
out of xc_domain_create. Add glue to get the missing functions exposed
to python and use.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomain.py:
Remove domain_db cache -- it's tedious to maintain and has zero use since
it gets flushed to the XendDB immediately on every update and it's never
consulted except for maintaining it.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Little blkif interface and xend fixes to make parallax work again.
Also minor debug printing fix to blktap.
Signed-off-by: andrew.warfield@cl.cam.ac.uk
XendDomain.py:
Add XendDomainDict for easy by name lookup.
Don't call self.refresh() from XendDomain.list().
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
console.py, blkif.py, SrvDomainDir.py, XendDomain.py, XendConsole.py:
Rename XendDomain.domains() to XendDomain.list() and rename
XendDomain.domain_by_id to XendDomain.domains.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomainInfo.py:
XendDomain.domain_exists() now returns a truth value, use domain_lookup
instead.
XendDomain.py:
Remove domain_by_name lookup array -- it's tedious to maintain for
hardly any benefits. Also make domain_exists return a truth value.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendRoot.py:
Disable logging to stderr -- the log messages are in /var/log/xend.log
already.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomainInfo.py, XendDomain.py:
Remove DomainShutdown class and store shutdown information in domain's
XendDomainInfo object.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
event.py, XendMigrate.py, EventServer.py:
Use scheduler.{now,later} instead of reactor.callLater.
reactor.py:
Remove reactor.callLater function -- same as scheduler.{now,later}.
EventServer.py:
Cleanup.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomain.py:
Bring back refresh() calls but only run the code cleanup parts
of refresh when necessary.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
scheduler.py:
Simplify scheduler by removing support for cancelling timeouts.
Also add a ``now'' function to run a function in a seperate thread.
XendDomain.py:
g/c gratuitous refresh() calls.
Drive domain restart off the virq signaling that a domain has terminated.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomain.py:
Move code to create dominfo entries for unknown domains into
domain_lookup.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
domain.c:
Send VIRQ_DOM_EXC when domain_destruct removes a domain from
Xen's list of domains.
XendDomain.py:
Now that virq's work, remove periodic domain refresh calls to reap expired
domains.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Many files:
g/c _readline{,s} and use regular readline{,s} functions -- the special
_readline{,s} functions were only needed because of Twisted.
ip.py:
Also use readlines() instead of xreadlines().
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Fix virq delivery in Xend.
xcs.c:
Fix binding to virq's -- setup evtchn binding.
channel.py:
Use VIRQ_DOM_EXC as exported from xc. Also don't bind to virq's we
don't care for or which won't get delivered to us anyway.
xc.c:
Export VIRQ_DOM_EXC to python.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
ip.py:
Make the get_current_ip* functions more robust -- default to look at the
interface which is currently used for the default route instead of eth0.
Fix get_current_ipaddr, get_current_ipmask and get_current_ipgw for
veth0.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Many files:
Make interface to network/block scripts consistent:
- output on stdout is returned to the script caller
- output on stderr is logged at the error level, messages with a '-' prefix
are logged at the debug level and messages with a '*' prefix are logged
at the info level.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>