* src/virsh.c: add a number of interface related commands:
iface-list, iface-name, iface-mac, iface-dumpxml, iface-define,
iface-undefine, iface-edit, iface-start and iface-destroy
Unlike the pty monitor (which we know exists since we scrape its path from
stdout), we have no way of knowing that the unix monitor socket should exist/
be initialized. As a result, some of my KVM guests randomly fail to start on
F10 host.
Try to open the unix socket in a 3 second timeout loop. Ignore EACCES (path
does not exist if a first time run) and ECONNREFUSED (leftover socket from
a previous run hasn't been removed yet). Fixes things for me.
Have storage building functions be definitions of
virStorageBackendBuildVolFrom: we will need to do this in the future anyways
if we ever support the flags attribute.
Break out separate functions for
- Determining the supported '*-img' tool,
- The tool's associated create function,
- Desired function for cloning (CreateXMLFrom).
This will be eventually used to unify cloning across all backends.
Currently, if no format is specified for a new disk volume, we pass the
invalid value "none" as the FS type to 'parted mkpart'.
There doesn't seem to be a way to have parted not format the drive, so
just default to using 'ext2' in this case: this shouldn't cause any harm,
since we are creating a new partition in the first place.
* configure.in: Add --with-qemu-user and --with-qemu-group args
* libvirt.spec.in: use 'qemu' for user/group for Fedora >= 12
* qemud/libvirtd_qemu.arg, qemud/test_libvirtd_qemu.aug,
src/qemu.conf: Add 'user' and 'group' args for configuration
* src/Makefile.am: Create %localstatedir/cache/libvirt/qemu
* src/qemu_conf.c, src/qemu_conf.h: Load user/group from config
* src/qemu_driver.c: Change user ID/group ID when launching QEMU
guests. Change user/group ownership on disks/usb/pci devs.
Put memory dumps in %localstatedir/cache/libvirt/qemu
* src/util.c, src/util.h: Add convenient APIs for converting
username/groupname to user ID / group ID
* src/driver.h: add new driver functions virDrvNumOfDefinedInterfaces
and virDrvListDefinedInterfaces
* src/libvirt.c: implements the entry points, calling new driver
functions
* qemud/remote.c qemud/remote_dispatch_args.h qemud/remote_protocol.[chx]
qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_ret.h
qemud/remote_dispatch_table.h src/remote_internal.c: implement the
client/server side of the RPC
* include/libvirt/libvirt.h[.in]: adds signatures for the new exported
functions virConnectNumOfDefinedInterfaces and
virConnectListDefinedInterfaces
* src/libvirt_public.syms: export the new symbols
Remove redundant error reporting functions which obscured the
filename/line number reporting. Removed code which created a
virDomain/virNetwork object, since those are silently dropped
in error reporting functions now
* src/remote_internal.c: Remove error() and errorf() in favour of
macros, and remove server_error in favour of direct call
Splits up the 'call' method moving generic IO code out into
separate method to allow it to be easily reused for sending
data streams
* src/remote_internal.c: Split 'call' into two methods, the first
with same name serializes a set of method arguments into a
message, the second 'remoteIO' takes a pre-serialized messages,
sends it and awaits a reply
* src/remote_internal.c: Rename processCallRecvMsg to
processCallDispatch, and move code specific to method replies
into processCallDispatchReply, and rename processCallAsyncEvent
to processCallDispatchMessage
The 'remote_message_header' struct has a mis-leadingly named
field 'direction'. It is really a reflection of the type of
message, and some types can be sent in either direction. Thus
the field is more accurately named 'type'. No function change.
* qemud/remote_protocol.x: Rename 'direction' to 'type' in
'remote_message_header. Write better docs describing the
message header field semantics & usage
* qemud/remote_protocol.c, qemud/remote_protocol.h: Regenerate
* qemud/remote.c, qemud/dispatch.c, src/remote_internal.c
Update to reflect rename of 'direction' to 'type'
The naming convention for structs used in the RPC layer is for
incoming requests to be called XXXX_args, and the associated
outgoing reply to be called XXXX_ret. Asynchronously emitted
messages (eg events) are re-using the XXXX_ret naming scheme.
This patch changes that such that async messages are XXXX_msg,
and stops adding entries for them in the dispatch table, avoiding
the need for a dummy no-op implementation.
* qemud/remote.c: Remove dummy remoteDispatchDomainEvent, no
longer required. Update to replace remote_domain_event_ret
with xdr_remote_domain_event_msg
* qemud/remote_protocol.x: Rename remote_domain_event_ret to
remote_domain_event_msg
* qemud/remote_generate_stubs.pl: Adding handling for new
XXX_msg structs.
* src/remote_internal.c: Rename remote_domain_event_ret to
remote_domain_event_msg
* qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_ret.h,
qemud/remote_dispatch_table.h, qemud/remote_protocol.h,
qemud/remote_protocol.c: auto-regenerate
* src/virsh.c: adds cd and pwd commands to virsh useful for save and
restore commands
* docs/virsh.pod virsh.1: update the documentation
* AUTHORS: add Paolo Bonzini
by running this command:
git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
This is in preparation for a more strict make syntax-check
rule that will detect trailing blank lines.
* src/remote_internal.c: Disable libvirtd autostart if the
LIBVIRT_AUTOSTART=0 env variable is set
* src/libvirt.c: Document environment variables can impact
the virConnectOpen API
* src/interface_conf.c src/interface_conf.h: the import and export
routines and the internal APIs
* src/Makefile.am: hook the new file in the makefiles
* src/libvirt_private.syms: export a few private symbols internally
* po/POTFILES.in: the new file contains translatable strings
* qemud/remote.c: Send back the actual libvirt connection error
rather than formatting a generic error for security driver
methods
* src/libvirt.c: Fix virDomainGetSecurityLabel, and
virNodeGetSecurityModel to correctly set the error on
the virConnectPtr object, and raise a full error rather
than warning when not supported
The 'pipe' character type wasn't documented.
TCP uses a <protocol> element, not <wire>
We weren't doing strict validation for protocol and source mode values.
* src/domain_conf.c: replace open coded chr type parsing with
virDomainChrTypeFromString(), retaining the existing semantics
where unknown types are silently mapped to the "null" type and
"pty" is used if none is specified
We keep support for the pty based monitor so that we can re-connect
to VMs started by older versions of libvirtd.
* src/domain_conf.c: handle formatting and parsing unix monitors
* src/qemu_driver.c: add qemudOpenMonitorUnix(), remove the monitor
pty path searching from qemudFindCharDevicePTYs(), switch
qemudStartVMDaemon() and qemuDomainXMLToNative() to using a unix
monitor
* tests/qemuxml2argvtest.c: switch to using a unix monitor
* tests/qemuxml2argvdata/qemuxml2argv-*.args: update test data
There are no functional changes in this patch apart from adding the
monitor type to the state XML.
The patch mostly consists of switching to use virDomainChrDef every
where to describe the monitor.
* src/domain_conf.h: replace monitorpath with monitor_chr
* src/domain_conf.c: handle parsing the monitor type and initializing
monitor chr
* src/qemu_conf.[ch]: make qemudBuildCommandLine take a
virDomainChrDefPtr and use that to build the -monitor parameter
* src/qemu_driver.c: split pty specific and common code from
qemudOpenMonitor, have qemudStartVMDaemon() initialize monitor_chr
* tests/qemuxml2argvtest.c: update for qemudBuildCommandLine() change
* src/qemu_driver.c: vm->monitorpath is already initialized in the case
of re-connect, so move the initialization for the normal startup case
out of the common code
* src/qemu_conf.c, src/qemu_conf.h: Use -vga or -std-vga
when starting guests if video card is present
* tests/qemuhelptest.c: Change to use constants instead
of hardcoded hex numbers, and add VGA support
* tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args,
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml,
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml,
tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml: Add <video>
element for testing graphics adapter
* tests/qemuxml2argvtest.c: Add QEMUD_CMD_FLAG_VGA flag
* tests/qemuxml2xmltest.c: Add missing graphics-vnc-sasl/tls tests
* docs/schemas/domain.rng: Define <video> element schema
* src/domain_conf.c, src/domain_conf.h, src/libvirt_private.syms:
Add parsing and formatting for <video> element
* src/network_driver.c src/node_device.c src/storage_driver.c:
many places in the code reported 'No xxx with matching name" after
a Lookup error without reporting the name used by the failed lookup