You need to sign in or sign up before continuing.
- 04 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
* src/conf/domain_conf.c: don't call virDomainObjUnlock twice * src/qemu/qemu_driver.c: relock driver lock if an error occurs in qemuDomainObjBeginJobWithDriver, enter/exit monitor with driver in qemudDomainSave
-
- 23 11月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
Introduce a new type="dir" mode for <disks> that allows use of QEMU's virtual FAT block device driver. eg <disk type='dir' device='floppy'> <source dir='/tmp/test'/> <target dev='fda' bus='fdc'/> <readonly/> </disk> gets turned into -drive file=fat:floppy:/tmp/test,if=floppy,index=0 Only read-only disks are supported with virtual FAT mode * src/conf/domain_conf.c, src/conf/domain_conf.h: Add type="dir" * docs/schemas/domain.rng: Document new disk type * src/xen/xend_internal.c, src/xen/xm_internal.c: Raise error for unsupported disk types * tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args: Fix empty disk file handling * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.args, tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml, tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.args, tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml tests/qemuxml2argvtest.c: Test QEMU vitual FAT driver * src/qemu/qemu_conf.c: Support generating fat:/some/dir type disk args * src/security/security_selinux.c: Temporarily skip labelling of directory based disks
-
- 13 11月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
If the virDomainDefPtr object has an 'id' of -1, then forcably set the VIR_DOMAIN_XML_INACTIVE flag to ensure generated XML does not include any cruft from the previously running guest such as console PTY path, or VNC port. * src/conf/domain_conf.c: Set VIR_DOMAIN_XML_INACTIVE if def->id is -1. Replace checks for def->id == -1 with check against flags & VIR_DOMAIN_XML_INACTIVE.
-
- 12 11月, 2009 1 次提交
-
-
由 pritesh 提交于
* src/conf/domain_conf.h src/conf/domain_conf.c: add the new entry in the enum and lists of virDomainDiskBus * src/qemu/qemu_conf.c: same for virDomainDiskQEMUBus
-
- 10 11月, 2009 3 次提交
-
-
由 Daniel P. Berrange 提交于
Change the QEMU monitor file handle watch to poll for both read & write events, as well as EOF. All I/O to/from the QEMU monitor FD is now done in the event callback thread. When the QEMU driver needs to send a command, it puts the data to be sent into a qemuMonitorMessagePtr object instance, queues it for dispatch, and then goes to sleep on a condition variable. The event thread sends all the data, and then waits for the reply to arrive, putting the response / error data back into the qemuMonitorMessagePtr and notifying the condition variable. There is a temporary hack in the disk passphrase callback to avoid acquiring the domain lock. This avoids a deadlock in the command processing, since the domain lock is still held when running monitor commands. The next commit will remove the locking when running commands & thus allow re-introduction of locking the disk passphrase callback * src/qemu/qemu_driver.c: Temporarily don't acquire lock in disk passphrase callback. To be reverted in next commit * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Remove raw I/O functions, and a generic qemuMonitorSend() for invoking a command * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Remove all low level I/O, and use the new qemuMonitorSend() API. Provide a qemuMonitorTextIOProcess() method for detecting command/reply/prompt boundaries in the monitor data stream
-
由 Daniel P. Berrange 提交于
Add reference counting on the virDomainObjPtr objects. With the forthcoming asynchronous QEMU monitor, it will be neccessary to release the lock on virDomainObjPtr while waiting for a monitor command response. It is neccessary to ensure one thread can't delete a virDomainObjPtr while another is waiting. By introducing reference counting threads can make sure objects they are using are not accidentally deleted while unlocked. * src/conf/domain_conf.h, src/conf/domain_conf.c: Add virDomainObjRef/Unref APIs, remove virDomainObjFree * src/openvz/openvz_conf.c: replace call to virDomainObjFree with virDomainObjUnref
-
由 Matthias Bolte 提交于
-
- 06 11月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
Use this function in the qemu, uml, lxc, and test drivers.
-
- 05 11月, 2009 3 次提交
-
-
由 Matthew Booth 提交于
* include/libvirt/virterror.h src/util/virterror.c: add a new error VIR_ERR_CONFIG_UNSUPPORTED for valid but unsupported configuration options * src/conf/domain_conf.c: Throw an error if guestfwd address isn't IPv4 and cleanup a number of parsing return error values.
-
由 Matthew Booth 提交于
allows the following to be specified in a domain: <channel type='pipe'> <source path='/tmp/guestfwd'/> <target type='guestfwd' address='10.0.2.1' port='4600'/> </channel> * proxy/Makefile.am: add network.c as dep of domain_conf.c * docs/schemas/domain.rng src/conf/domain_conf.[ch]: extend the domain schemas and the parsing/serialization side for the new construct QEmu support will add the following on the qemu command line: -chardev pipe,id=channel0,path=/tmp/guestfwd -net user,guestfwd=tcp:10.0.2.1:4600-chardev:channel0 * src/qemu/qemu_conf.c: Add argument output for channel * tests/qemuxml2(argv|xml)test.c: Add test for <channel> domain syntax
-
由 Matthew Booth 提交于
A character device's target (it's interface in the guest) had only a single property: port. This patch is in preparation for adding targets which require other properties. Since this changes the conf type for character devices this affects a number of drivers: * src/conf/domain_conf.[ch] src/esx/esx_vmx.c src/qemu/qemu_conf.c src/qemu/qemu_driver.c src/uml/uml_conf.c src/uml/uml_driver.c src/vbox/vbox_tmpl.c src/xen/xend_internal.c src/xen/xm_internal.c: target properties are moved into a union in virDomainChrDef, and a targetType field is added to identify which union member should be used. All current code which touches a virDomainChrDef is updated both to use the new union field, and to populate targetType if necessary.
-
- 04 11月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
- Don't duplicate SystemError - Use proper error code in domain_conf - Fix a broken error call in qemu_conf - Don't use VIR_ERR_ERROR in security driver (isn't a valid code in this case)
-
- 03 11月, 2009 4 次提交
-
-
由 Chris Lalancette 提交于
When building with --disable-nls, I got a few messages like this: storage/storage_backend.c: In function 'virStorageBackendCreateQemuImg': storage/storage_backend.c:571: warning: format not a string literal and no format arguments Fix these up. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Daniel P. Berrange 提交于
Rename virDomainIsActive to virDomainObjIsActive, and virInterfaceIsActive to virInterfaceObjIsActive and finally virNetworkIsActive to virNetworkObjIsActive. * src/conf/domain_conf.c, src/conf/domain_conf.h, src/conf/interface_conf.h, src/conf/network_conf.c, src/conf/network_conf.h, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c: Update for renamed APIs.
-
由 Daniel P. Berrange 提交于
Nearly all of the methods in src/util/util.h have error codes that must be checked by the caller to correct detect & report failure. Add ATTRIBUTE_RETURN_CHECK to ensure compile time validation of this * daemon/libvirtd.c: Add explicit check on return value of virAsprintf * src/conf/domain_conf.c: Add missing check on virParseMacAddr return value status & report error * src/network/bridge_driver.c: Add missing OOM check on virAsprintf and report error * src/qemu/qemu_conf.c: Add missing check on virParseMacAddr return value status & report error * src/security/security_selinux.c: Remove call to virRandomInitialize that's done in libvirt.c already * src/storage/storage_backend_logical.c: Add check & log on virRun return status * src/util/util.c: Add missing checks on virAsprintf/Run status * src/util/util.h: Annotate all methods with ATTRIBUTE_RETURN_CHECK if they return an error status code * src/vbox/vbox_tmpl.c: Add missing check on virParseMacAddr * src/xen/xm_internal.c: Add missing checks on virAsprintf * tests/qemuargv2xmltest.c: Remove bogus call to virRandomInitialize()
-
由 Daniel P. Berrange 提交于
The virDomainObjPtr object stores state about a running domain. This object is shared across all drivers so it is not appropriate to include driver specific state here. This patch adds the ability to request a blob of private data per domain object instance. The driver must provide a allocator & deallocator for this purpose THis patch abuses the virCapabilitiesPtr structure for storing the allocator/deallocator callbacks, since it is already being abused for other internal things relating to parsing. This should be moved out into a separate object at some point. * src/conf/capabilities.h: Add privateDataAllocFunc and privateDataFreeFunc fields * src/conf/domain_conf.c: Invoke the driver allocators / deallocators when creating/freeing virDomainObjPtr instances. * src/conf/domain_conf.h: Pass virCapsPtr into virDomainAssignDef to allow access to the driver specific allocator function * src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c: Update for change in virDomainAssignDef contract
-
- 29 10月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
The current virDomainObjListPtr object stores domain objects in an array. This means that to find a particular objects requires O(n) time, and more critically acquiring O(n) mutex locks. The new impl replaces the array with a virHashTable, keyed off UUID. Finding a object based on UUID is now O(1) time, and only requires a single mutex lock. Finding by name/id is unchanged in complexity. In changing this, all code which iterates over the array had to be updated to use a hash table iterator function callback. Several of the functions which were identically duplicating across all drivers were pulled into domain_conf.c * src/conf/domain_conf.h, src/conf/domain_conf.c: Change virDomainObjListPtr to use virHashTable. Add a initializer method virDomainObjListInit, and rename virDomainObjListFree to virDomainObjListDeinit, since its not actually freeing the container, only its contents. Also add some convenient methods virDomainObjListGetInactiveNames, virDomainObjListGetActiveIDs and virDomainObjListNumOfDomains which can be used to implement the correspondingly named public API entry points in drivers * src/libvirt_private.syms: Export new methods from domain_conf.h * src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_conf.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c: Update all code to deal with hash tables instead of arrays for domains
-
- 21 10月, 2009 1 次提交
-
-
由 Richard Jones 提交于
This adds simple support for configuring a guest with a QEMU/KVM virtual hardware watchdog device.
-
- 12 10月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
If one has e.g. <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/bin/qemu-system-x86_64</emulator> <machine>pc-0.11</machine> <machine canonical='pc-0.11'>pc</machine> <machine>pc-0.10</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/kvm</emulator> <machine>pc</machine> <machine>isapc</machine> </domain> </arch> </guest> and start a guest with: <domain type='kvm'> ... <os> <type arch='x86_64'>hvm</type> ... </os> </domain> then the default machine type should be 'pc' and not 'pc-0.11' Issue was reported by Anton Protopopov. * src/capabilities.[ch]: pass the domain type to virCapabilitiesDefaultGuestArch() and use it to look up the default machine type from a specific guest domain if needed. * src/conf/domain_conf.c, src/xen/xm_internal.c: update * tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml: update the domain type to 'kvm' and remove the machine type to check that the default gets looked up correctly
-
- 01 10月, 2009 2 次提交
-
-
由 Daniel Veillard 提交于
* src/conf/domain_conf.c: a simple typo in an XML domain file could lead to a crash, because we called STRPREFIX() on the looked up value without checking it was non-null.
-
由 Florian Vichot 提交于
* src/conf/domain_conf.c: when declaring a <interface type="bridge"> tag, <source> needs a "bridge" attribute, but the parser complains about a missing "dev" attribute.
-
- 30 9月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* docs/schemas/domain.rng: allow one <description> tag in the top level of the <domain> to store user information as text * src/conf/domain_conf.c src/conf/domain_conf.h: extend the structure to store this text, grab it at parse time and save it back when present after <uuid>
-
- 22 9月, 2009 1 次提交
-
-
由 Ryota Ozaki 提交于
* src/conf/domain_conf.c: Don't assume all virDomainObjPtr have a non-NULL monitor_chr field in virDomainObjFormat. * src/lxc/lxc_driver.c: Implement suspend/resume driver APis * src/util/cgroup.c, src/util/cgroup.h: Support the 'freezer' cgroup controller * src/libvirt_private.syms: Export virCgroupSetFreezerState and virCgroupGetFreezerState
-
- 21 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/capabilities.c, src/capabilities.h, src/domain_conf.c, src/domain_conf.h, src/domain_event.c, src/domain_event.h, src/interface_conf.c, src/interface_conf.h, src/network_conf.c, src/network_conf.h, src/node_device_conf.c, src/node_device_conf.h, src/secret_conf.c, src/secret_conf.h, src/storage_conf.c, src/storage_conf.h, src/storage_encryption_conf.c, src/storage_encryption_conf.h: Move to src/conf/ * src/Makefile.am: Add -Isrc/conf to the individual build targets which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS and SELINUX_CFLAGS from global INCLUDES and only have them in build targets which actually need them. Create a libvirt_conf.la convenience library for all config parsers * src/hostusb.h: Remove bogus include of domain_conf.h * tests/Makefile.am: Add -Isrc/conf. Remove bogus -I$builddir/src since it never has any generated header files * daemon/Makefile.am: Add -Isrc/conf * proxy/Makefile.am: Add -Isrc/conf and cope with renamed files * src/hash.c: Remove bogus include of libxml/threads.h
-
- 14 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu_driver.c: Don't trust monitor for vcpu PID info on restart * src/domain_conf.c: Save and load vCPU PID info from domain status file
-
- 08 9月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/domain_conf.c (virDomainSaveXML): Remove use and decl of "err". (virDomainDefParseXML): Likewise.
-
- 04 9月, 2009 1 次提交
-
-
由 Ryota Ozaki 提交于
* src/domain_conf.c src/network_conf.c src/qemu_conf.c src/storage_backend_fs.c: various problems spotted by valgrind through libvirt code
-
- 03 9月, 2009 3 次提交
-
-
由 Daniel P. Berrange 提交于
* docs/schemas/domain.rng: Add <serial> element to disks * src/domain_conf.h, src/domain_conf.c: XML parsing and formatting for disk serial numbers * src/qemu_conf.c: Set serial number when launching guests * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args, tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml: Add serial number to XML test
-
由 Daniel P. Berrange 提交于
Add option to domain XML for <memoryBacking> <hugepages/> </memoryBacking> * configure.in: Add check for mntent.h * qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug, src/qemu.conf Add 'hugetlbfs_mount' config parameter * src/qemu_conf.c, src/qemu_conf.h: Check for -mem-path flag in QEMU, and pass it when hugepages are requested. Load hugetlbfs_mount config parameter, search for mount if not given. * src/qemu_driver.c: Free hugetlbfs_mount/path parameter in driver shutdown. Create directory for QEMU hugepage usage, chowning if required. * docs/formatdomain.html.in: Document memoryBacking/hugepages elements * docs/schemas/domain.rng: Add memoryBacking/hugepages elements to schema * src/util.c, src/util.h, src/libvirt_private.syms: Add virFileFindMountPoint helper API * tests/qemuhelptest.c: Add -mem-path constants * tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: Add tests for hugepage handling * tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml, tests/qemuxml2argvdata/qemuxml2argv-hugepages.args: Data files for hugepage tests
-
由 Pritesh Kothari 提交于
* docs/schemas/domain.rng: augment the video model with an optional acceleration element with optional accel2d and accel3d flags * src/domain_conf.c src/domain_conf.h: exten the virDomainVideoDef structure with an optional accel field, virDomainVideoAccelDefParseXML and virDomainVideoAccelDefFormat functions to parse and serialize the structure.
-
- 02 9月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
Calling qsort() on the disks array causes disk to be unneccessarily re-ordered, potentially breaking the ability to boot if the boot disk gets moved later in the list. The new algorithm will insert a new disk as far to the end of the list as possible, while being ordered correctly wrt other disks on the same bus. * src/domain_conf.c, src/domain_conf.h: Remove disk sorting routines. Add API to insert a disk into existing list at the optimal position, without resorting disks * src/libvirt_private.syms: Export virDomainDiskInsert * src/xend_internal.c, src/xm_internal.c: Remove calls to qsort, use virDomainDiskInsert instead. * src/qemu_driver.c: Remove calls to qsort, use virDoaminDiskInsert instead. Fix reordering bugs when hotunplugging disks and networks. Fix memory leak in disk/net unplug
-
由 Miloslav Trmač 提交于
The XML allows <encryption format='unencrypted'/>, this implementation canonicalizes the internal representation so that "disk->encryption" is non-NULL iff encryption information is available. A domain with partial encryption information can be defined, completeness of the information is not verified. The domain won't start until the remaining information is added, of course. * docs/formatdomain.html, docs/formatdomain.html.in: Document new encryption options for disks * docs/schemas/domain.rng: Pull in storage encryption schema rules * src/domain_conf.h, src/domain_conf.c: Wire up storage encryption XML parsing/formatting APIs
-
- 17 8月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/domain_conf.c: Make virDomainObjListFree a no-op if list is NULL * src/domain_event.c: make virDomainEventCallbackListFree a no-op if event list is NULL * src/lxc_driver.c: Log a message if LXC driver does not startup due to lacking kernel support
-
- 14 8月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
Attaching a host PCI device to a qemu guest is done with a straightforward 'pci_add auto host host=XX:XX.X' command. Like with NIC and disk hotplug, we need to retain the guest PCI address assigned by qemu so that we can use it for hot-unplug. Identifying a device for detach is done using the host PCI address. Managed mode is handled by detaching/resetting the device before attaching it to the guest and re-attaching it after detaching it from the guest. * src/qemu_driver.c: add qemudDomainAttachHostPciDevice() and qemudDomainDetachHostPciDevice() * src/domain_conf.h: add somewhere to store the guest PCI address * src/domain_conf.c: handle formatting and parsing the guest PCI address
-
- 24 7月, 2009 2 次提交
-
-
由 Eduardo Otubo 提交于
Features supported: - Connects to HMC/VIOS or IVM systems. - Life cycle commands (resume and shutdown). - dumpxml - 'list' and 'list --all' What is being implemented: - better and centralized control for UUID - definexml - CPU management commands * src/domain_conf.c src/domain_conf.h: first version of the driver * configure.in src/Makefile.am include/libvirt/virterror.h src/domain_conf.[ch] src/libvirt.c src/virterror.c: glue the driver in the general framework
-
由 Laine Stump 提交于
* src/datatypes.c src/domain_conf.c src/interface_conf.c src/lxc_driver.c src/qemu_driver.c src/storage_backend.c src/virsh.c: add bare %s format string to printf-derivatives called with no format string
-
- 22 7月, 2009 4 次提交
-
-
由 Mark McLoughlin 提交于
When we pci_add a NIC, we need to retain the PCI address assigned by qemu for using during detach. * src/qemu_driver.c: use qemudParsePciAddReply() to pull the PCI address from the pci_add reply * src/domain_conf.c: handle storing and parsing the PCI address in the domain state XML file
-
由 Mark McLoughlin 提交于
Currently, an interface's vlan number corresponds to its index in the table of network interfaces. That is no longer true when we allow devices to be removed. To fix this, we store the vlan number in the domain's state XML so that it survives libvirtd restarts. * src/domain_conf.h: add vlan number to virDomainNetDef * src/domain_conf.c: store it in XML as <state vlan='N'/>, defaulting to -1 if this is state saved by a previous version of libvirt * src/qemu_conf.c: assign vlan numbers before starting qemu
-
由 Mark McLoughlin 提交于
The qemu driver needs to assign and keep track of identifiers for network devices so that it can remove them. We need to keep this state across libvirtd restarts, but it's not configuration that needs to be kept across guest restarts. * src/domain_conf.c: parse and format <state nic="foo" hostnet="bar"/>
-
由 Mark McLoughlin 提交于
We need these so that we can remove the devices via the monitor. * src/domain_conf.h: add nic_name and hostnet_name to virDomainNetDef * src/domain_conf.c: free nic_name and hostnet_name * src/qemu_conf.c: add qemuAssignNetNames(), use it if qemu has support for the param and pass the names on the command line * tests/qemuxml2argv*: add a test for this
-