Commit Graph
3229 Commits
Author SHA1 Message Date
Brendan Cully 167c73522e remus: use plug qdisc for network buffering instead of queue
It was renamed in the pvops [kernel] tree.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-07 19:13:55 +01:00
Ian Campbell 5545b07a5c libxl+xend: use correct paths for PV console when running bootloader
Makes "{xl,xm} create -c GUEST" work again with pygrub in interactive
mode which was broken by 21994:2e08ec0028e4

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-07 18:50:55 +01:00
Miroslav Rezanina 47e13da0a1 xend: reserve vtd_mem on guest restore
There's need for free vtd_mem more memory for guest with
xen-unstable c/s 17529.  This memory is freed when guest is
created, but is not freed when guest is restored. So restore
guest fails due  to not enough of memory for guest.

Following patch uses same calculation of memory to free in guest
restore as is in guest creation.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-03 18:22:31 +01:00
Michael Young 4053efae85 tools/python: fix xm list for Python 2.7
This patch fixes
  Unexpected error: <type 'exceptions.AttributeError'>
This is due to xmlrpc changes in Python 2.7.  This patch should
fixe it for both old and new versions.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-19 17:09:30 +01:00
Christoph Egger d83eb7f21e xend: remove non-ASCII characters.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-17 15:23:36 +01:00
Lutz Dube Lutz.Dube@ts.fujitsu.com 1ecf910c9b Values of cpu_weight and cpu_cap are lost after xend restart
For managed domains in state 'halted' I always get default values
for cpu_cap / cpu_weight after xend restart.
This is because the names of parameters differ between a SXP file to
create a VM (here the parameter names are cpu_cap / cpu_weight) and
a SXP file of a managed VM (here vcpus_params (cap 0) (weight 0)).
But XendConfig.py reads only cpu_cap / cpu_weight and if not found,
default values are used.
 
The patch reads first vcpus_params (cap, weight), if not found then cpu_cap,
cpu_weight and if both parameters are missing it uses the default values.
 
Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-16 17:14:10 +01:00
eXeC001er 3484b6c6c6 Fix "Error: Device 51952 not connected" error when using pygrub
The following is the process of booting a DomU with 'mounted-blktap2' (VHD
for example) and 'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'
2. Pygrub get info for load DomU
3. Disconnect boot-device from Dom0
4. Boot DomU

During step 3 the created device is disconnected from Dom0, but
xenstore does not scrape away after the device is disconnected so you
get the following error:

    "Error: Device /dev/xvdp (51952, tap2) is already connected."

During step 3 xend calls destroyDevice always with 'tap' as argument.

Signed-off-by: eXeC001er <execooler@gmail.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-16 17:11:30 +01:00
Ian Campbell fa2244104b libxc: disable xc_ptrace on x86 Linux
It has been unused since 21732:eb34666befcc.

Removing the include of sys/ptrace.h and threaddb.h exposed a few
places which were using time(2) or gettimeofday(2) without including
time.h or sys/time.h respectively and were relying on an include.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-13 14:25:56 +01:00
Ian Jackson a0b0302a08 tools/python: Remove non-ASCII characters introduced by fffedd3d70e1.
fffedd3d70e1 introduced into tools/python/xen/util/vscsi_util.py
high-bit-set characters which appear to be UTF-8 for non-breaking
spaces.  Replace them with spaces to avoid getting a Python syntax
error.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-12 17:06:21 +01:00
"Dube, Lutz" bb3bac1c3b Exception in xen/util/vscsi_util.py while starting xend
We have pscsi device with long scsi ids like 15:0:11:101.
In this case lsscsi prints no "blank" between id and type,
so the following split of the string returns wrong output.
The field physical_HCTL is set to 15:0:11:101]dis.
The patch replaces char "]" by "] ", so split() will return the right
physical_HTCL.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-11 13:18:05 +01:00
Kuwamura Shin'ya 51e8df94ba xend: fix SyntaxError for Python 2.4 or earlier
21866:e017930af272 causes SyntaxError on Python 2.4 or earlier, since
the syntax "true_value if condition else false_value" was introduced
by Python 2.5.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-29 16:40:47 +01:00
Lutz Dube d0e15577d3 xend (XenAPI): Error in Xend-API method VM_set_actions_after_crash
Xend-API defines the method VM_set_actions_after_crash with valid
action names coredump_and_destroy, coredump_and_restart,... . These
values have to be converted into internal representation
"coredump-destroy", "coredump-restart", ...  otherwise start of the
domain is rejected.  Same error occurs, if I try to create a VM using
the Xend-API with actions_after_crash set to coredump_and_destroy.

Could you please apply my patch to xen-4-0-testing, too.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Acked-by: Jim Fehlig <jfehlig@novell.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-27 16:53:00 +01:00
"Dube, Lutz" c290fa1c4b tools/xend: Fix performance of xend with more than 10000 FC device paths
On server startup xend start or a later xend restart needs approx. 30 min to
start/restart. Without attached FC devices xend start/restart needs only some
seconds.

server type: Fujitsu Primergy RX600-S5

The time gets lost in xen/xend/XendNode.py line 329 while calling
vscsi_util.get_all_scsi_device().

329         for pscsi_record in vscsi_util.get_all_scsi_devices():
330             scsi_id = pscsi_record['scsi_id']
331             if scsi_id:
332                 saved_HBA_uuid = None

I think, in most cases we don't need all the PSCSI devices registered in
xend, but only a few of it.
So a good solution for this perforamce issue is to scan only the SCSI device
paths we need, controlled by a new option in xend-config.sxp.

I have made a patch to allow specification of scsi devices we need in xend
in the config file xend-config.sxp.
The new options pscsi-device-mask expects a list of device ids oder partial
device ids like the option of lsscsi, e.g.
(pscsi-device-mask ('<partial-dev-id1' 'partial-dev-id2' ...))

Without this option set in xend-config.sxp or if lsscsi is not support, all
device paths are process like today.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Comment from Masaki Kanno <kanno.masaki@jp.fujitsu.com>: "Well done"
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-23 17:34:35 +01:00
Stefano Stabellini 19ea926cbc Improve balloon support for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-07-19 12:22:04 +01:00
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