Commit Graph
2637 Commits
Author SHA1 Message Date
Keir Fraser 50cd7ffdad xend: Use get_config_string for 'keymap' and 'resource-label-change-script'.
Signed-off-by: Juergen Keil <jk@tools.de>
2008-06-09 09:42:51 +01:00
Keir Fraser a7cd0e3f91 acm: check for duplicate labels and types
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-09 09:37:56 +01:00
Keir Fraser 4c46d69b29 acm: Allow remove of labels from suspended domains.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-09 09:37:22 +01:00
Keir Fraser 3e22cc46bb xm: Set device_model option value default to None.
If device_model is set to '', xend will fail to execute the device
model.  If None, xend will detect it and set a sensible qemu-dm path
instead.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:36:27 +01:00
Keir Fraser b630504504 xm on xenapi: Enable more platform configurations
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:36:07 +01:00
Keir Fraser 72c4148247 xm: Fix formatting of xm block-list output.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-05 10:31:17 +01:00
Keir Fraser cea190c247 Fix blkif.py for virsh start
I defined a cdrom to a guest domain as follows.

  ",hdc:cdrom,r"

When the guest domain was created by using xm create command, uname
of the cdrom was ''.  Then creating the guest domain succeeded.

[2008-06-03 15:23:41 xend.XendDomainInfo 25956] DEBUG
(XendDomainInfo:200)
XendDomainInfo.create(['vm', ['name', 'rhel5.2ga_hvm_lvol1'],
<<snip>>
['device', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode',
'r']]],
<<snip>>

But, when the guest domain was created by using virsh start command,
uname of the cdrom was None.  Then creating the guest domain failed.

[2008-06-03 15:22:10 xend.XendDomainInfo 25559] DEBUG
(XendDomainInfo:200)
XendDomainInfo.create(['vm', ['name', 'rhel5.2ga_hvm_lvol1'],
<<snip>>
['device', ['vbd', ['dev', 'hdc:cdrom'], ['mode', 'r']]],
<<snip>>

This patch fixes to be able to create guest domains by both xm create
command and virsh start command.

FYI:
"if uname is None:" --> "if uname == '':" --> "if not uname:"
   till CS#17625             current           by this patch

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-05 10:30:29 +01:00
Keir Fraser 85745512c5 xend: implement VM_hard_reboot of XenAPI.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-03 09:33:41 +01:00
Keir Fraser 8a41cd8573 xend: Add node parameter to do_migrate() for HTTP interface
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-29 13:38:31 +01:00
Keir Fraser 491c0ade25 iommu: Handle sibling device assignment correctly
Domctl interface is extended to allow libxc retrieve device group
information from hypervisor. Vendor-specific iommu_ops is also
extended by adding a new operation "get_device_group_id()", which is
currently a null pointer but could be implemented later for vt-d.

Error will be raised from tools side when user trying to assign PCI
device with a sibling device being driven by dom0. User will keep
being prompted until he has hidden the entire device group (at least,
the sibling devices driven by dom0) in dom0 kernel
parameter. Hopefully this framework could be flexible enough to
support both amd iommu and vt-d.

The following 2 cases are not covered by this patch, but should be
easy to handle.
* Checking for hot-plug devices (maybe we can delay calling
ImageHandler.signalDeviceModel() until all checks are done?)
* Checking for splitted device group between different passthru
domains

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-05-28 14:41:23 +01:00
Keir Fraser 863d18e20d Revert 17731:eafb252f141.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-27 11:50:43 +01:00
Keir Fraser 91df8a74b6 xend: fix a typo in domain_migrate().
- @rtype:  ->  @type node:

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-27 10:31:55 +01:00
Keir Fraser 3ebb3ee816 xend: add a reset button to Web interface.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-27 10:31:25 +01:00
Keir Fraser 056f122d52 xend: take care of dead qemu-dm process
This patch fix xend as when fatal error happened (e.g. qemu-dm process
was killed) log error message then mark that domain as crashed, do
what specified on crashed in the domain config file. Added some code in
xend to check those crashed hvm DM status each 30 seconds.

Signed-off-by: Xiaowei Hu <xiaowei.hu@oracle.com>
2008-05-26 08:53:25 +01:00
Keir Fraser 11b6a5dbe0 Fix XendAPI VM_migrate parameters
This patch removes unused resource parameter and fixes the default
value for domain_migrate. Also removes tab indent in XendOptions.py.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-26 08:26:37 +01:00
Keir Fraser a9f43ccc9e Handle IOMMU device assignment for PV guests
Added more informative error codes for device assignment domctls.
Introduced python bindings for device assignment and enable xend to
also perform IOMMU device assignment when assigning PCI devices.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:45:37 +01:00
Keir Fraser 407c970b52 xend: Import TRIGGER_S3RESUME and HVM_PARAM_ACPI_S_STATE into XendDomain.py.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 10:57:03 +01:00
Keir Fraser eea031f921 Add -s --ssl option to xm migrate
This patch adds -s --ssl option to xm migrate. It will override
xend-relocation-ssl setting in /etc/xen/xend-config.sxp.

When mix deploy xen 3.2 and xen 3.3 servers, it's convenient to have a
command line option rather than modify /etc/xen/xend-config.sxp every
time.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 10:42:11 +01:00
Keir Fraser d6f7e230eb Make ssl relocation server listen on different port
This patch makes ssl relocation server listen on 8003 if enabled.

Whether to start ssl relocation server now controlled by
xend-relocation-ssl-server. So ssl and non-ssl relocation server can
run simultaneously. You can also only start ssl server or only start
non-ssl relocation server.

When mix deploy xen 3.2 server (has no ssl support) and 3.3 servers,
start ssl and non-ssl relocation server simultaneously can keep
backward compatibility.

It's also more reasonable to have separate ports for ssl and non-ssl.

In this patch, also renames xend-relocation-tls to xend-relocation-ssl.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 10:41:44 +01:00
Keir Fraser 45ea543412 xend: fix automatic vcpu NUMA placement
The automatic NUMA placement code (find_relaxed_node) in
XendDomainInfo.py contains several bugs:
1. The domain just created shall not be considered in the load
calculation.
2. Nodes with too less memory for the domain must be considered during
the load calculation phase and abandoned later, currently these nodes
win with a load of 0.
3. CPUs which are offline shall not be considered in load calculation.
4. (Integer-)Dividing the load value by the number of cores per node
may conceal subtle load differences resulting in a non-optimal node to
be chosen.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2008-05-22 15:11:06 +01:00
Keir Fraser da61293b33 xend: Remove XendLogging dependency from a couple of generally useful
support modules.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-21 10:57:08 +01:00
Keir Fraser 306921aa6f xend: Support HVM S3 resume.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:50:45 +01:00
Keir Fraser 4f050d52f5 xend: Fix bugzilla bug #1253.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-20 14:18:32 +01:00
Keir Fraser 07a57a397e xm migrate: Better error report when attempt to migrate non-running domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-20 09:43:02 +01:00
Keir Fraser a7b0dfd0b3 Fix showing of CPU Affinity by xm vcpu-list
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-19 09:46:02 +01:00
Keir Fraser b93de169c3 xend: Device configurations of suspended virtual machines are inaccessible
The device configurations of suspended virtual machines are
inaccessible even though for example the UUIDs of the VIFs and VBDs
are known and returned when VM.get_VIFs()/get_VBDs() is called, though
when trying to access their records for example, then handle is
reported as being invalid. This patch fixes this.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-15 16:40:51 +01:00
Keir Fraser a295f2a1c6 ia64: fix domain restore
A domain fails to restore on IA64 since cset 17524:18727843db60.
This patch fixes it temporarily. Guest CPUID configuration for IA64
might be implemented in the future.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-05-14 13:25:19 +01:00
Keir Fraser 09951b66a6 xend: fix block protocol mismatch on save/restore
The protocol field of the blkif interface is correct at startup for a
guest of a different mode from dom0 (eg. 32-bit dom0, 64-bit guest).
However, this property is not persisted on save, so a later restore
(or migrate) will setup the block interface with the wrong mode.

Signed-off-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
2008-05-14 09:19:05 +01:00
Keir Fraser 04cd40bbf6 [Xend/security] Refactor the code that recalculates the label during a policy update
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-13 12:46:45 +01:00
Keir Fraser ef6666a9b0 Xend: Fix blkif type check for tap devices.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-05-13 12:43:24 +01:00
Keir Fraser 8a588ca061 Fix guest boot if set empty cdrom in config file
This is because function "uname = config.get('uname', '')" returns '',
rather than None, if uname is not in config variable.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
2008-05-13 10:19:54 +01:00
Keir Fraser be2dc0b642 XM/XenAPI: Add cdrom support when creating domains by xm through Xen API.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-05-13 09:48:55 +01:00
Keir Fraser 61341026d9 XM/XenAPI: Add blktap support when creating domains by xm through Xen API.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-05-13 09:48:40 +01:00
Keir Fraser a6cd3290d8 Further minor ssl relo fixes.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-13 09:20:23 +01:00
Keir Fraser 6c922a2cef Fix relocation ssl/tls support
* Make a wrapper of read/write sock.fileno().

 * Makes pyOpenSSL an optional package.

 * Implement reference:
   http://twistedmatrix.com/trac/browser/trunk/twisted/internet/tcp.py

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-13 09:19:07 +01:00
Keir Fraser 499681128c xend: Add syntax check for block devices
If we define wrong values to a disk parameter in domain configuration
files, we get an error message or a guest OS panic.

 1. If we define a wrong disk type, xm create command error occurs
    about 100 seconds later.
      e.g.  disk=['xyz:/xen/root-vm1.img,hda1,w']

 2. If we forget a disk type, a guest OS panic occurs.
      e.g.  disk=['/xen/root-vm1.img,hda1,w']

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-12 11:19:09 +01:00
Keir Fraser 126d4342c6 xend: Fix and improve error handling for failed suspend/migrate
This has been broken since cset 16964:5d84464dc1fc
Also deal better with very early errors (close sender side socket)

Signed-off-by: Steven Hand <steven.hand@cl.cam.ac.uk>
2008-05-08 14:33:31 +01:00
Keir Fraser 1aa3c54a31 Remove defunct powerpc port.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-08 13:40:40 +01:00
Keir Fraser 5e5a6aa9be Xend: Fix handling of vnc params.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-05-08 11:20:04 +01:00
Keir Fraser ef4c89d294 xend: Improve "cpus" parameter to be able to define CPU affinities for each VCPU
If we define the form of list of string to "cpus" parameter,
different CPU affinities are set for each VCPU as follows.

 # grep cpus /etc/xen/vm1
 cpus = ["2", "3"]
 vcpus = 2
 # xm create vm1
 Using config file "/etc/xen/vm1".
 Started domain vm1
 # xm vcpu-list vm1
 Name                                ID  VCPU   CPU State   Time(s)
 CPU Affinity
 vm1                                  1     0     2   r--       3.5 2
 vm1                                  1     1     3   -b-       3.2 3

If we define the form of string to "cpus" parameter as before,
a same CPU affinity is set for each VCPU as follows.

 # grep cpus /etc/xen/vm2
 cpus = "2,3"
 vcpus = 2
 # xm create vm2
 Using config file "/etc/xen/vm2".
 Started domain vm2
 # xm vcpu-list vm2
 Name                                ID  VCPU   CPU State   Time(s)
 CPU Affinity
 vm2                                  2     0     3   -b-       3.0
 2-3
 vm2                                  2     1     2   r--       2.6
 2-3

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-08 11:15:58 +01:00
Keir Fraser ed2e517bac XM/XenAPI: Enable Console other_config parameters to be passed through Xen API.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-05-07 14:16:48 +01:00
Keir Fraser d4a7565965 msix: Further fixes to Python arithmetic.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-07 09:17:52 +01:00
Keir Fraser 9787d88dcf xend: Only import OpenSSL package when it is required.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-06 15:31:15 +01:00
Keir Fraser 89266413bf xend: Refactor security.on() call
I am refactoring the security.on() call to return the actual type of
the security module that is found to be enabled rather than just
returning True or False.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-06 10:05:52 +01:00
Keir Fraser d60778fcdc Calculation of MSI-X table size needs to be masked.
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-05 10:12:44 +01:00
Keir Fraser b404bb0ba9 Remove unimplemented xm migrate --resource option.
Signed-off-by: Gary Pennington <gary.pennington@sun.com>
2008-05-01 16:35:49 +01:00
Keir Fraser 84736d7607 Accept decimal block device IDs
Solaris uses a simple indexing scheme for block devices. Parts of xend
translate them as hexadecimal (such as block-attach), and decimal, or
unconverted, elsewhere (such as block-detach). Harmonise these
interfaces by allowing decimal specifications.

Also allow Solaris-style block device names.

Signed-off-by: John Levon <john.levon@sun.com>
2008-05-01 16:35:28 +01:00
Keir Fraser 1d45c8ef8c x86 hvm cpuid: fix some problem with the hvm's cpuid configuration.
- When we overwrite a cpuid's input, apply the default policy
    for the other registers.
  - For the python binding, get unsigned long instead long.
  - Fix the multiple inputs cpuid's configuration parsing.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-05-01 16:08:36 +01:00
Keir Fraser 46ac8f31a0 MSI 4/6: remove io_mem permission for MSI-X, since MSI-X
facilities are allocted through and located in PCI BAR.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:32:10 +01:00
Keir Fraser ca0074e519 MSI 2/6: change the pirq to be per-domain
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:30:22 +01:00