Commit Graph
3215 Commits
Author SHA1 Message Date
Ian Jackson 8582d429a1 xm: Do not check path of kernel if bootloader is specified
When create DomU, if bootloader is specified, 'kernel/ramdisk' will be
used by bootloader when boots DomU. So it is needless to check the
path is existent or not.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2010-07-15 16:32:50 +01:00
Keir Fraser c9de4c5c3c xend: Continue domain building even if memshr extensions are not
present in the hypervisor.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-08 09:56:10 +01:00
Ian Jackson fa5685207c tools/xend: Revert 21541:7ff0e885b5c3 "a few blktap2 fixes"
Following discussion on xen-devel.  This changeset is doubtful and in
any case incomplete.
2010-06-29 16:21:20 +01:00
Ian Jackson b616bee08b tools/xend, xm: add a command to get the state of VMs
add a command "domstate" to get the state of Vms, which may have one state of
{'shutoff', 'idle','shutdown','running','crashed','paused' or 'paused by
admin"}.

For case of pause, I distinguish it into two conditions. One is "paused" the
other is "paused by admin".
"pasued by admin" means that users pause a domain voluntary by "xm paused
VM" or " API"

Signed-off-by James (Song Wei) <jsong@novell.com>
2010-06-29 14:52:51 +01:00
Ian Jackson f3fdbe7359 tools/python: sxp parser: show empty string
This patch makes the sxp parser show empty string.

Test case:
 import sxp
 sxp.show(sxp.from_string('(a "")'))
 sxp.show(sxp.from_string("(a '')"))

Without this patch:
 (a )(a )
With this patch:
 (a '')(a '')

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2010-06-28 16:49:45 +01:00
Ian Jackson a2fab4fce5 xend: Fix up check "mac" address sooner change
In changeset 21653,
         dev_type = sxp.name(dev_config)
should not have been moved, otherwise, the checking "mac"
paragraph is of no use.

(The original patch as submitted was correct but I had to make the
change manually as it had been mangled.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by Chunyan Liu <CYLiu@novell.com>
2010-06-25 15:13:11 +01:00
Ian Jackson b418a191ab python/xc: [PATCH 3/3] add flask capabilities in python xc bindings
The flask library is small, and putting everything in libxenctrl make
relying on flask functionalities in libxl easier.

libflask is left for compatibility purpose, but should be considered
deprecated, and remove in the near future. all flask_ symbols are now
xc_flask_ symbols in libxenctrl.

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-06-22 16:37:53 +01:00
Ian Jackson c1acfe560b Check "mac" address sooner in device_create function, before doing device_add.
In XendDomainInfo.py device_create function, when device type is
"vif", it has a paragraph to check the validity of "mac"
address. Before checking validity, device_add has been done. But after
checking validity, if the mac address is invlid, it raises VmError and
exits directly without doing clean work like removing the device item
from config info. This will cause that the incorrect mac address is
saved into VM Config file and VM fails to restart. If check "mac"
validity before doing device_add, there will be no problem.

Signed-off-by Chunyan Liu <CYLiu@novell.com>
2010-06-22 16:07:00 +01:00
Ian Jackson b9ae83b6e2 python/xc: do not crash xend if /proc/xen/privcmd cannot be opened
If /proc/xen/privcmd cannot be opened,
start xend occurs Segmentation fault.
Add check to fix it.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-06-22 16:00:08 +01:00
Keir Fraser df992155c8 xend: fix "xm list hangs"
If a command hold domains_lock, "xm list" would hang for waiting for
the lock. Such as creating many VMs at a script (such as 20), command
of "xm list" could hang for long time(10 mins).  I think domains_lock
here only protect update().  So, we shouldn't do update before command
of "list" really get this lock, but xm do need show the domain's
information quickly. In this patch, if command couldn't get the
domains_lock after 20 times trying, "xm list" would show the
information of VMs without update().

Signed-off-by: James Song (Wei) <jsong@novell.com>
2010-06-21 09:58:17 +01:00
Keir Fraser 56d6b7ac5d python/xc: fix out of bounds array access
Writing a NUL terminator here isn't even necessary, since snprintf()
already guarantees proper termination.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-06-15 13:27:14 +01:00
Keir Fraser d2a6ffdc54 xend: Remove use of non-existent xc.handle() function.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-09 07:55:19 +01:00
Keir Fraser 9622dc5498 blktap2: Port Xend to the tap-ctl interface.
Signed-off-by: Jake Wires <jake.wires@citrix.com>
2010-06-08 08:05:43 +01:00
Keir Fraser ffa84dc13b xend: A few blktap2 fixes
1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is
already connected." (xenstore does not clean after DomU stoped)
2. Bug fix for error: "File 'vhd:/path/.../disk.img' doesn't exist."
(not correct parsing)
3. Bug fix for error: "Error: Device 51952 not connected" (in config
file for DomU we should be use prefix "tap2:tapdisk:xxx" for devices
from (aio, ram, qcow, vhd, remus) or "tap:tapdisk:xxx" for devices
from (sync, vmdk, qcow2, ioemu))
4. Bug fix for error: "Disk is not accessible" (if use 'tap2'-device
type, then '/dev/xpvd' may not be accessible immediately after its
creation)

Signed-off-by: eXeC001er <execooler@gmail.com>
2010-06-07 07:19:43 +01:00
Keir Fraser 92dbb84764 [VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
Added additional sleep time between FLR and PCI config restore.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2010-06-04 10:17:19 +01:00
Keir Fraser 8567eb4c32 xend: PoD check should be for HVM domain only.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2010-06-01 07:05:22 +01:00
Keir Fraser 0b086b2583 xend: Remove broken bits of NUMA code.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-01 06:55:23 +01:00
Keir Fraser 5cc436c1d2 libxc: eliminate static variables, use xentoollog; API change
This patch eliminate the global variables in libxenctrl (used for
logging and error reporting).

Instead the information which was in the global variables is now in a
new xc_interface* opaque structure, which xc_interface open returns
instead of the raw file descriptor; furthermore, logging is done via
xentoollog.

There are three new parameters to xc_interface_open to control the
logging, but existing callers can just pass "0" for all three to get
the old behaviour.

All libxc callers have been adjusted accordingly.

Also update QEMU_TAG for corresponding qemu change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:30:19 +01:00
Keir Fraser 221bac1943 tools: Fix time offset when localtime=0
localtime can be stored in vm config as a string, resulting in
incorrect calculation of rtc_timeoffset.  Cast localtime to int
to ensure rtc_timeoffset is calculated properly.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2010-05-26 08:15:31 +01:00
Keir Fraser e13255b6c5 xend: Add interface name definition support for xend-relocation-address
Add a new feature for xend-relocation-address option to support
definition by interface name which can be useful for people having
e.g. a cluster environment with multiple network interfaces on all of
the machines with only one reserved to be registered to a private
cluster network. This way they won't need to specify the relocation
address manually on all the machines but just simple providing the
interface name to get the IP address from would do the job (all the
machines have to have this interface named the same to make it
working, of course).

Technically it reads the interface name and gets its IP address using
ioctl call of SIOCGIFADDR and if the interface doesn't have the
address, i.e. if non-existing interface or hostname was provided the
original ifname is returned to preserve the old behaviour.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2010-05-25 09:08:34 +01:00
Keir Fraser e6cbaaddae xend: Fix getStubdomDomid function
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-15 08:31:42 +01:00
Keir Fraser dc21ec2b12 xm: explicitly differentiate between tap and tap2 in config parsing.
From: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
2010-05-11 08:31:16 +01:00
Keir Fraser 62dcdb74d8 Remus: fix missing import in device.py
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-10 09:25:46 +01:00
Keir Fraser ac56b9955e xend: support blktap2 in xend blkif utils
Support tap2 device type in xend blkif utils parse method.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2010-05-07 09:27:40 +01:00
Keir Fraser c177a9f122 xm: Add exception handling when launching vncviewer
Also replaces the call to 'puts' with 'print' as the former is
undefined in python

Signed-off-by: Goncalo Gomes <Goncalo.Gomes@eu.Citrix.com>
2010-05-06 11:13:22 +01:00
Keir Fraser d475c41771 xend: fix bug in option parsing
If you enable legacy tcp xmlrpc in xend's config but omit to enable
ssl then a backtrace is generated when starting xend.

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
2010-05-04 12:23:54 +01:00
Keir Fraser 335c738c44 Change the global suspend event channel lock file to a per-domain lock file
This allows multiple guests to be migrated or protected by Remus
simultaneously.

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 12:12:28 +01:00
Keir Fraser 1edbc90d99 xm: catch TypeError if xenconsole is nonexistent
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-04 12:10:54 +01:00
Keir Fraser 61cf67606a Remus: use IFB for net buffer on newer kernels
IMQ does not work with ebtables on 2.6.31, and IFB is not a
third-party patch.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 09:36:05 +01:00
Keir Fraser c7a94e935c Remus: add file locking and modprobe utility functions
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 09:35:42 +01:00
Keir Fraser ad195de617 Remus: include device name in vif objects
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 09:35:18 +01:00
Keir Fraser 4bab5e8047 Remus: fix VM stringification
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 09:34:50 +01:00
Keir Fraser a47cb321e9 Remus: move device handling into its own module
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 09:34:23 +01:00
Keir Fraser c6a0974ed9 Remus: python netlink fixes
Fix deprecation warning in Qdisc class under python 2.6.
Fix rtattr length and padding (rta_len is unaligned).
Null-terminate qdisc name in rtnl messages.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 09:30:53 +01:00
Keir Fraser 422376d6e2 cpupools, xend: Add missing file sxputils.py
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-04-26 06:50:39 +01:00
Keir Fraser 8149e93337 cpupools, xend: Add missing file XendCPUPool.py
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-04-23 15:04:26 +01:00
Keir Fraser 261d19559d Revert 21224:a7947fd90328 "xend: earlier remove the backend of tapdisk device"
Consensus is that this is not the correct fix.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-04-23 08:37:19 +01:00
Keir Fraser 3dc27ee385 xend: earlier remove the backend of tapdisk device in
xenstore to release the resource allocated in backend driver
lies in dom0'kernel

Blktapctl thread will use qemu-dm connection instead of tapdisk-ioemu
in the case of FV VM. We found the resource like memory allocated for
this Guest can't be free for backend driver couldn't be closed in qemu-dm.

This patch would  remove the backend of tapdisk device earlier in
xenstore to triger qemu-dm to notify the backend driver to release the
resource allocated.
I have tested this patch at the case of
1, save && restore
2, destory && shutdown
3, snapshot

Signed-off-by: James ( Song Wei ) <jsong@novell.com>
2010-04-22 09:44:29 +01:00
Keir Fraser 77af399e7f xend: don't drop device config on domain start failure
If domain creation in xend fails before devices are configured, e.g.
insufficient memory, device config is dropped from xend's managed
domain config.

Once xend is restarted, the domain's devices are lost.

This patch fixes a bug in XendConfig where only the device
controller was consulted for device configuration.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2010-04-22 09:42:37 +01:00
Keir Fraser 832656a179 cpupools [4/6]: python/xend changes
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-04-21 12:50:32 +01:00
Keir Fraser 04dffa0be9 xend: support 'ioemu' subtype in tap protocol specification
blktapctrl supports both 'tapdisk' and 'ioemu' subtypes in tap
protocol specification.  Support the 'ioemu' subtype in xend
BlktapController as well.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2010-04-19 08:59:14 +01:00
Keir Fraser a667809cd4 xend: fix best NUMA node allocation
Since we moved several NUMA info fields from physinfo into separate
functions/structures, we must adapt the node picking algorithm, too.
Currently xm create complains about undefined hash values.
The patch uses the new Python xc binding to get the information and
create a reverse mapping for node_to_cpu, since we now only have a
cpu_to_node field.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2010-04-15 17:36:16 +01:00
Keir Fraser 254a13846c xend: make NUMA in xm info optional (dependent on new -n switch)
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2010-04-15 13:16:17 +01:00
Keir Fraser d8ffa3fa6b xend: Fix numainfo/topologyinfo loop iterators in Xc extension.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2010-04-15 12:29:48 +01:00
Keir Fraser 1844bfe6f8 Fix changeset 21153:d2d8805868f1 (xend can't start)
21153 forgets to update the format string so xend can't start.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2010-04-15 12:28:33 +01:00
Keir Fraser 82e84243c3 Remus: fix alignment bug in python rtnl library
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-04-15 08:42:40 +01:00
Keir Fraser 3ac51fc221 credit2: Add toolstack options to control credit2 scheduler parameters
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-04-14 12:10:19 +01:00
Keir Fraser 66ff9844c1 Clean up numa-info sysctl.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-04-13 13:27:46 +01:00
Keir Fraser 645f5ea7cb Topology-info sysctl cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-04-13 09:38:54 +01:00
Keir Fraser 81f77532b5 sysctl: Remove sockets_per_node field from physinfo command.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-04-13 08:37:16 +01:00