This is Kurt Garloff's reworked network-bridge script:
* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
(the ifup may otherwise figure that the veth0 hardware is
NOT the same as the original ${netdev} and not use the same
config -- this happens on SUSE. Charles Coffing tracked this
one down.)
Plus Kurt's avoid-dash patch:
the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.
Plus Charles Duffy's patch to support multiple bridges:
The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.
Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:
network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1
...well, that and set loopback.nloopbacks=2 in the Dom0 kernel
parameters.
Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.
Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).
Plus tidying up inside network-bridge using some helper variables.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
recreation semantics.
Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo. This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.
Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.
TODO: Split the domain introduction into two so that the domain path is
available earlier. At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.
Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef. Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.
Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path. With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.
Fix the printf statement in xenstored in verbose mode that details the
messages being written. This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.
Signed-off-by: Keir Fraser <keir@xensource.com>
that loop completely -- the xc_init_store, initDomainStore calls can all go.
Have xenstored understand where the local domain information goes. Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later. There is still some work required to tidy this up.
Change the uuid module to generate uuids as lists of bytes, not in the
stringified form. Added a unit test for that module.
Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block. The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.
Added a usage statement to xenstored.
Some of this code is by Steven Hand.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.
Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.
Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.
Signed-off-by: Keir Fraser <keir@xensource.com>
which sets the number of active CPUs. Xend then toggles the VCPUs to ensure a
contiguous group of them are enabled.
Added a server command to get VCPU information, and use this info to fix
xm vcpu-list. That xm command now has extra information, too. CPU == -1 is no
longer used as an indicator for a VCPU that is disabled -- a separate state
field is available, and the CPU is set merely to '-'. Individual CPU time is
now available.
Deprecated xm list -v. -v is conventionally used for --verbose, so using it
to list vcpus is confusing. Furthermore, we already have an equivalent command
xm vcpu-list.
Tidied up the horrendous xm list / xm vcpu-list code.
Removed the vcpus field from the dict returned by xc_domain_getinfo, and the
vcpu_to_cpu map from the sxpr returned for xm list.
Move the dom0_enforce_vcpus code into XendDomain.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
n_vcpu field from GETDOMAININFO: replaced with
nr_online_vcpus and max_vcpu_id (both plumbed through to
Python).
TODO: Remove 'vcpus' entry in getdomaininfo Python
dictionary.
TODO: Don't represent 'cpumap' as a bitmap in Python.
It would be more sensible to represent as a list
of integer CPU numbers.
Signed-off-by: Keir Fraser <keir@xensource.com>
creation, allow it to be changed after creation via
DOM0_SETDOMAINHANDLE operation (and libxc
xc_domain_sethandle, and via Pyhton wrapper fn).
Signed-off-by: Keir Fraser <keir@xensource.com>
within Xen. Refactor GETVCPUCONTEXT into an op of the same
name plus a new op GETVCPUINFO. Move the cpumap and cpu info
arrays from GETDOMAININFO and move into new GETVCPUINFO.
Signed-off-by: Keir Fraser <keir@xensource.com>
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
missing import inside blkif. Fix the command parsing for op_device_destroy and
op_device_configure -- the device IDs should be strings, to allow the user to
specify devices by name as well as number.
This is the second half to the fixes for bug #315.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
happen if there are watches in flight at the same time as a deregistration, and
also seems to happen spuriously on xend restart.
This fixes the Invalid token error that has been seen on xend restart.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
because we are already inside the ValueError exception handler, so we know that
the give device identifier is not an integer, and DevController.destroyDevice
only accepts integers. Fixes bug #315.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
the domain, to make it clear that it is a zombie, but this renaming cannot
check the uniqueness of the new name, because this causes a deadlock with
XendDomain. Instead, we allow the name to be non-unique for the case of
zombie domains.
Change the locking in waitForShutdown and state_set to be robust in the face of
exceptions.
Rename the STATE_VM_ constants to STATE_DOM_.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
and xenconsole out of /usr/libexec/xen and into one of /usr/lib/xen/bin or
/usr/lib64/xen/bin. Remove all the PATH hacking inside Xend, and rely upon
the PATH being set correctly from outside. Added an auxbin module for
handling the hacky stuff.
Replace the few /usr/bin/python bang paths with /usr/bin/env python.
Signed-off-by: Ewan Mellor <ewan@xensource.com>