Commit Graph
2358 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain fecde045d3 [Xend] Do network startup earlier.
Xend tries to rebuild the network configuration such as bridges and
vlan interfaces  (in those bridges) when starting. Unfortunately this
fails on the first startup since the network script has not run, yet,
and for example created peth0. When restarting xend it works due to
the peth0 being there then. This patch moves the initialization of the
network to an earlier time in the xend initialization process to
mitigate this problem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-27 09:04:35 +01:00
kfraser@localhost.localdomain 61cd58b400 [XEND] Fix for creating VLANs using the Xen-API
Recent changes to the setup of the peth0 interface have resulted in a
change of its MAC address. Previously it seems to have had a MAC
address of 'fe:ff:ff:ff:ff:ff', but now it has the same MAC address as
eth0. As a consequence to this the Xen-API code to create VLANs
(PIF.create_VLAN("peth0",...)) does not work anymore, since peth0 can
not be identified according to this previous criteria of fake MAC
address. This patch fixes this issue by identifying it through the
prefix 'peth'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-27 09:03:35 +01:00
kfraser@localhost.localdomain bf9e4257b3 [ACM] Check a domain's authorization to run.
A domain is only authorized to run if it has a superset of Simple Type
Enforcement Types in its VM label compared to that of Domain-0, which
itself may not have all STEs available in a policy. This patch adds a
check for this into Xend and the necessary code support into Xen.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-27 09:01:15 +01:00
kfraser@localhost.localdomain e313dc3ed8 Add domain name check and UUID check to 'xm new' command.
Add a domain name check and a UUID check to xm new command. The check
logic is as follows:

 - If the UUID is not specified
       - If a VM with same name exists
           => Update the config for that existing VM
       - Else no vm with same name exists
           => Define a brand new VM with auto-generated UUID
 - Else UUID is specified
       - If a VM with same UUID exists
             - If name is different
                   => Error
             - Else if name is same
                   => Update the config for that existing VM
       - Else no VM with same UUID exists
             - If name is different
                   => Define a branch new VM with that name
             - Else if name is same
                   => Error

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-24 18:05:04 +01:00
Tim Deegan f6c12fc6b6 [HVM] Control qemu's state-save via xenstore, instead of SIGUSR1
This lets us verify that qemu has indeed stopped processing before
we start saving guest memory.  Also allow qemu to continue processing
after the save has happened, instead of exiting immediately.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-24 14:52:16 +01:00
kfraser@localhost.localdomain 9d53b5f351 Improve xm vcpu-list command for inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-19 17:17:25 +01:00
kfraser@localhost.localdomain bd99184d54 xend: Give back memory to dom0 after a failed auto-balloon attempt.
Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
2007-07-19 17:15:49 +01:00
kfraser@localhost.localdomain fbf9c4996c [xend / libxen] Add support for labeling of virtual network interfaces.
This patch adds labeling of virtual network interfaces to xend and
makes this manageable through the Xen-API.  It's a feature that is
only usable if ACM is enabled in Xen and xend is used through the
xen-api. A labeled virtual network interface will be plugged into a
bridge where other domains with the same-labeled network interface are
connected to, so that only same-colored domains can communicate with
each other. The bridge should be connected to the outside world using
VLAN for isolation, extending the isolation beyond the local machine.
If a virtual machine is labeled with a VM label that only has one
Simple Type Enforcement Type then it is not necessary to label the
virtual network interface, but the color of the network interface is
determined from the VM's label. If, however, a virtual machine is
labeled with a VM label that has multiple Simple Type Enforcement
Types, then the explicit labeling of each virtual network interface is
required. To specify the label of a network interface, the vif line in
the VM's configuration file has been extended with parameters similar
use for specifying the label of the VM:

vif = ['policy=<policy name>,label=<resource label>']

This labels the VIF of the virtual machine for usage under the policy
'policy name' and labels it with the label 'resource label'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-19 16:59:48 +01:00
kfraser@localhost.localdomain 080ea11ff4 [xend][xen-api] Save new memory values in domain config when calling
VM.set_memory_[dynamic|static]_[min|max] via Xen API.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2007-07-18 10:10:04 +01:00
kfraser@localhost.localdomain a157ca83eb [Xend] More security-related fixes
This patch provides some more fixes related to the recent
security-related extensions to xend.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-18 10:09:06 +01:00
kfraser@localhost.localdomain b60125e83e Improve xm uptime command for inactive managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-17 10:36:33 +01:00
kfraser@localhost.localdomain f0a8a3f3fb [VTPM] Make vTPM hotplug scripts use the UUID of the vTPM instance
Make the vTPM hotplug script use the UUID of the vTPM instance for
associating it with its instance number rather than the name of the
domain.
Also change the cleanup in the xm test to use the atexit mechanism
rather than explicitly calling a function to clean up.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-17 10:33:26 +01:00
kfraser@localhost.localdomain 98ee5b6406 [Xend] Fix problem when destroying VMs using the Xen-API
When domains are destroyed/suspend-resume/migration using the Xen-API
things break due to the domid not having been reset. This patch fixes
this. This is the best place I found for fixing this problem. I could
not push this line into _stateSet() for the case of DOM_STATE_HALTED
and left a comment regarding this.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-13 13:43:29 +01:00
kfraser@localhost.localdomain 2b0134dd5a [ACM-security] Some fixes to tools.
- Allow multiple ChineseWallTypes in a VM labels
- check for surfacing exceptions in the python code
- check for array sizes in the XML DOM in python
- properly display the labels when doing 'xm list --label' in xm's
non-Xen-API mode
- rely on the security checking hooks in xend to check access to the
block interface rather than doing this in xm.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-12 16:07:28 +01:00
kfraser@localhost.localdomain 7263c43515 Merge with ia64 xen tree. 2007-07-12 09:53:58 +01:00
kfraser@localhost.localdomain 82bc60ea2e [xend] Fix xm trigger command for inactive managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-11 10:54:06 +01:00
kfraser@localhost.localdomain cff6d529f2 xend: Fix 'xm dumpcore' for inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-11 10:53:32 +01:00
kfraser@localhost.localdomain d7839765dc [XM] Tools support for extensions of the Xen-API for managing security policies
This patch adds a couple of new commands for using the Xen-API
extensions for security policies. Older tools are converted to support
going through the Xen-API for their operations rather than doing the
operations directly in their own code.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-11 10:49:43 +01:00
Alex Williamson 2cae8465ac merge with xen-unstable.hg 2007-07-10 08:39:26 -06:00
kfraser@localhost.localdomain 5410c03342 xend: Fix xm pause/unpause for inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-10 10:15:01 +01:00
kfraser@localhost.localdomain 503e2ed481 xend: Count CPUs rather than relying on a static
nodes/sockets/cores/threads relationship.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-07-10 10:13:16 +01:00
kfraser@localhost.localdomain a75c57c971 xm: Improve help message for vif creation.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-10 10:11:14 +01:00
kfraser@localhost.localdomain 13adac8e15 xend: Missing last line from Xen_API security patch.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-09 19:28:54 +01:00
kfraser@localhost.localdomain 476959a14a Add accel option to vif xend config.
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
2007-07-09 18:10:48 +01:00
kfraser@localhost.localdomain 184e1b098b [Xen-API] Extension of the Xen-API for managing Xen Security Policies
This patch implements extensions for managing security policies in
xend. The XSPolicy and ACMPolicy classes provide the interface for the
Xen-API and implement functionality for setting, updating and
activating of a Xen security policy as well as labeling of virtual
machines and resources such as block devices. Labeling of network
devices will follow.

The acmpolicy class implements a compiler for translating an XML
policy into their binary format and provides functionality for
comparing a current policy against a new one when changing/updating a
policy.

The xspolicyadmin class administers the policy of the system.

Some of the xend-internal code deals with transforming the labeling
information from the S-Expression format into the new Xen-API
format. This is similar to much of the other code that is already
there.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-09 14:51:44 +01:00
kfraser@localhost.localdomain ba302f5c07 Fix xm save command for a inactive managed domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-09 09:41:45 +01:00
kfraser@localhost.localdomain ddc75a75d9 Better error message for 'xm sysrq' on inactive domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-09 09:38:35 +01:00
kfraser@localhost.localdomain c4d1247d00 hvm: Add global default keymap setting
Add global default keymap setting to be used when a VM does not have
a keymap configuration set.

Signed-off-by: Pat Campbell <plc@novell.com>
2007-07-06 16:16:57 +01:00
kfraser@localhost.localdomain be259653f3 Extended the physinfo sysctl to export NUMA cpu_to_node topology info.
Print this in 'xm info'.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-06 16:12:07 +01:00
kfraser@localhost.localdomain fefb7c8d3b xend: Fix xm block/network-attach command for inactive managed domain
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-06 14:41:05 +01:00
kfraser@localhost.localdomain 4c9048d9dc xend: Fix op_domain_sched_credit_set() in SrvDomain.py
This patch adds "cap" into op_domain_sched_credit_set().
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-06 14:39:21 +01:00
kfraser@localhost.localdomain 365e87562a Improve xm sched-credit command for inactive managed domains
Allows to change the scheduler parameters of inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-06 14:34:54 +01:00
kfraser@localhost.localdomain 2fc4a5a032 xend: Save modified scheduler params of managed guests to config.sxp.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-03 10:21:21 +01:00
Alex Williamson 19472a02dd merge with xen-unstable.hg 2007-07-02 12:19:26 -06:00
Alex Williamson f563c36712 [IA64] Fix NVRAM data cannot be saved when guest execute "reboot"
Also fix "xm reboot" instruction in Xend.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2007-07-02 09:38:51 -06:00
Ian Campbell 4cb346f848 Fix 15435:ab95b9764b20.
The changeset did not consider about ":cdrom" and "ioemu:"
of a disk definition.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-02 08:42:13 +01:00
Keir Fraser 0cf4932910 xm: Fix xm block-detach error message duplication.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-01 22:25:27 +01:00
Keir Fraser e0ccefb2fb xm: Fix a typo for xm network-detach.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-01 22:23:16 +01:00
Keir Fraser c32cff27ba xend: Pass information to user when failing migrate due to PCI dev.
When failing a migration / save due to the domain owning a PCI device
make sure that we tell the user what went wrong!

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
2007-07-01 22:10:38 +01:00
Keir Fraser 450f5b5b9e xend: Don't allow migrate with assigned PCI devs.
This can potentially cause a whole machine crash, which I think has
been seen in the wild.  The case in the wild was caused by xendomains
auto-resuming domains on reboot, so it wasn't even operator error.

There's no sane way to migrate or suspend domains with PCI devs,
so I disallow it completely.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
2007-07-01 22:10:13 +01:00
Ian Campbell 1dd1b5a9f6 Add a duplication definition check for devices.
This patch adds a duplication definition check for devices.
It checks the following definitions.
 - vbd : uname and device name
 - vif : mac

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-06-29 14:38:18 +01:00
Keir Fraser 9659b6cb45 xend: Fix irq-permissions setting during domain creation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-28 20:35:50 +01:00
kfraser@localhost.localdomain d40dbdf39f tools: Adjust tools' path calculation.
I'm suggesting this change to make another tiny step towards the
ability to run the tools e.g. out of the build tree (so that multiple
different Xen versions can co-exist without the requirement to
re-install the respective version with each boot).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-06-20 17:07:15 +01:00
kfraser@localhost.localdomain 7d698de822 Fix xm vcpu-set command for managed domains, to take effect immediately.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-06-20 14:43:41 +01:00
kfraser@localhost.localdomain a705b24a9d hvm: Ensure ioemu sees media-change events even when media filename
remains constant my writing a dummy blank string first.
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2007-06-20 14:41:27 +01:00
Keir Fraser dd34063f08 xend: Revert 15252:31ee1768e911 ("Make device detach wait for detach to complete").
Has a bad interaction with 12520 in destroyDevice(), where devid is
not an integer as expected.

I'm not sure which of these changesets is really the bogus one, but
this one went in later so it loses. :-)

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-16 11:18:44 +01:00
Alex Williamson b51cbb0e12 merge with xen-unstable.hg 2007-06-15 13:33:11 -06:00
Keir Fraser b19760e244 xend: Replace tabs with 8 whitespaces in DevController.py
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-06-15 10:01:32 +01:00
Keir Fraser 70c1fbfecd Update Solaris balloon ioctl value
The balloon ioctl value should use a 32-bit value instead of a 16-bit
value to distinguish itself from other ioctls.

Signed-off-by: Ryan Scott <ryan.scott@sun.com>
2007-06-15 09:18:42 +01:00
kfraser@localhost.localdomain eee0df9243 xenapi: Implement VM.set_VCPUs_at_startup and VM.set_VCPUs_max XenAPI
methods in xend.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2007-06-13 11:28:13 +01:00