- 25 6月, 2010 3 次提交
-
-
由 Daniel P. Berrange 提交于
The parallel, serial, console and channel devices are all just character devices. A lot of code needs todo the same thing to all these devices. This provides an convenient API for iterating over all of them. * src/conf/domain_conf.c, src/conf/domain_conf.c, src/libvirt_private.syms: Add virDomainChrDefForeach
-
由 Laine Stump 提交于
We previously assumed that if the -device option existed in qemu, that -nodefconfig would also exist. It turns out that isn't the case, as demonstrated by qemu-kvm-0.12.3 in Fedora 13. */src/qemu/qemu_conf.[hc] - add a new QEMUD_CMD_FLAG, set it via the help output, and check it before adding -nodefconfig to the qemu commandline.
-
由 Eduardo Otubo 提交于
This is just the indentation, style and cleanup patch.
-
- 24 6月, 2010 7 次提交
-
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Also don't abuse the disk driver name to specify the SCSI controller model anymore: <driver name='buslogic'/> Use the newly added model attribute of the controller element for this: <controller type='scsi' index='0' model='buslogic'/> The disk driver name approach is deprecated now, but still works for backward compatibility reasons. Update the documentation and tests accordingly. Fix usage of the words controller and id in the VMX handling code. Use controller, bus and unit properly.
-
由 Matthias Bolte 提交于
This is a step towards controller support for the ESX driver.
-
由 Matthias Bolte 提交于
The domain XML parsing code autogenerates disk address and controller elements when they are not explicitly specified. The code assumes a narrow SCSI bus (7 units per bus). ESX uses a wide SCSI bus (16 units per bus). This is a step towards controller support for the ESX driver.
-
由 Matthias Bolte 提交于
Move libnl to libvirt_util.la, because macvtap.c requires it. Add GnuTLS to libvirt_driver.la, because libvirt.c calls gcrypt functions. When built without loadable driver modules, then the remote driver pulls in GnuTLS. Move libgnu.la from libvirt_parthelper_CFLAGS to libvirt_parthelper_LDADD.
-
由 Ryota Ozaki 提交于
Through conversation with Kumar L Srikanth-B22348, I found that the function of getting memory usage (e.g., virsh dominfo) doesn't work for lxc with ns subsystem of cgroup enabled. This is because of features of ns and memory subsystems. Ns creates child cgroup on every process fork and as a result processes in a container are not assigned in a cgroup for domain (e.g., libvirt/lxc/test1/). For example, libvirt_lxc and init (or somewhat specified in XML) are assigned into libvirt/lxc/test1/8839/ and libvirt/lxc/test1/8839/8849/, respectively. On the other hand, memory subsystem accounts memory usage within a group of processes by default, i.e., it does not take any child (and descendant) groups into account. With the two features, virsh dominfo which just checks memory usage of a cgroup for domain always returns zero because the cgroup has no process. Setting memory.use_hierarchy of a group allows to account (and limit) memory usage of every descendant groups of the group. By setting it of a cgroup for domain, we can get proper memory usage of lxc with ns subsystem enabled. (To be exact, the setting is required only when memory and ns subsystems are enabled at the same time, e.g., mount -t cgroup none /cgroup.)
-
由 Ryota Ozaki 提交于
As same as normal directories, a cgroup cannot be removed if it contains sub groups. This patch changes virCgroupRemove to remove all descendant groups (subdirectories) of a target group before removing the target group. The handling is required when we run lxc with ns subsystem of cgroup. Ns subsystem automatically creates child cgroups on every process forks, but unfortunately the groups are not removed on process exits, so we have to remove them by ourselves. With this patch, such child (and descendant) groups are surely removed at lxc shutdown, i.e., lxcVmCleanup which calls virCgroupRemove.
-
- 23 6月, 2010 6 次提交
-
-
由 Alan Pevec 提交于
add iptables rules to allow TFTP from the virtual network if <tftp> element is defined in the network definition. Fedora bz#580215 * src/network/bridge_driver.c: open UDP port 69 for TFTP traffic if tftproot is defined
-
由 Alan Pevec 提交于
-
由 Daniel P. Berrange 提交于
We already use the '-nodefaults' command line arg with QEMU to stop it adding any default devices to guests. Unfortunately, QEMU will load global config files from /etc/qemu that may also add default devices. These aren't blocked by '-nodefaults', so we need to also add the '-nodefconfig' arg to prevent that. Unfortunately these global config files are also used to define custom CPU models. So in blocking global hardware device addition we also block definitions of new CPU models. Libvirt doesn't know about these custom CPU models though, so it would never make use of them anyway. Thus blocking them via -nodefconfig isn't a show stopping problem. We would need to expand libvirt's own CPU model XML database to support these instead. * src/qemu/qemu_conf.c: Add '-nodefconfig' if available * tests/qemuxml2argvdata/: Add '-nodefconfig' to all data files which have '-nodefaults' present
-
由 Daniel P. Berrange 提交于
The current code pattern requires that callers of qemuMonitorClose check for the return value == 0, and if so, set priv->mon = NULL and release the reference held on the associated virDomainObjPtr The change d84bb6d6 violated that requirement, meaning that priv->mon never gets set to NULL, and a reference count is leaked on virDomainObjPtr. This design was a bad one, so remove the need to check the return valueof qemuMonitorClose(). Instead allow registration of a callback that's invoked just when the last reference on qemuMonitorPtr is released. Finally there was a potential reference leak in qemuConnectMonitor in the failure path. * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a destroy callback invoked from qemuMonitorFree * src/qemu/qemu_driver.c: Use the destroy callback to release the reference on virDomainObjPtr when the monitor is freed. Fix other potential reference count leak in connecting to monitor
-
由 Daniel P. Berrange 提交于
Before issuing monitor commands it is neccessary to check whether the guest is still running. Most places use virDomainIsActive() correctly, but a few relied on 'priv->mon != NULL'. In theory these should be equivalent, but the release of the last reference count on priv->mon can be delayed a small amount of time until the event handler is finally deregistered. A further ref counting bug also means that priv->mon might be never released. In such a case, code could mistakenly issue a monitor command and wait for a response that will never arrive, effectively leaving the QEMU driver waiting on virCondWait() forever.. To protect against these possibilities, make sure all code uses virDomainIsActive(), not 'priv->mon != NULL' * src/qemu/qemu_driver.c: Replace 'priv->mon != NULL' with calls to 'priv->mon != NULL'()
-
由 Daniel P. Berrange 提交于
If there is no driver for a URI we report "no hypervisor driver available" This is bad because not all virt drivers are hypervisors (ie container based virt). If there is no driver support for an API we report "this function is not supported by the hypervisor" This is bad for the same reason, and additionally because it is also used for the network, interface & storage drivers. * src/util/virterror.c: Improve error messages
-
- 22 6月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Following Daniel Berrange's multiple helpful suggestions for improving this patch and introducing another driver interface, I now wrote the below patch where the nwfilter driver registers the functions to instantiate and teardown the nwfilters with a function in conf/domain_nwfilter.c called virDomainConfNWFilterRegister. Previous helper functions that were called from qemu_driver.c and qemu_conf.c were move into conf/domain_nwfilter.h with slight renaming done for consistency. Those functions now call the function expored by domain_nwfilter.c, which in turn call the functions of the new driver interface, if available.
-
- 21 6月, 2010 4 次提交
-
-
由 Jiri Denemark 提交于
- Fix documentation for virGetStorageVol: it has 'key' argument instead of 'uuid'. - Remove TODO comment from virReleaseStorageVol: we use volume key as an identifier instead of UUID. - Print human-readable UUID string in debug message in virReleaseSecret.
-
由 Jiri Denemark 提交于
As anywhere else, uuid is defined as a fixed size array inside _virSecret structure; we shouldn't try to free it.
-
由 Jiri Denemark 提交于
The first thing we do in all these functions is to check uuid != NULL and fail if it isn't.
-
由 Jiri Denemark 提交于
Per-connection hashes for domains, networks, storage pools and network filter pools were indexed by names which was not the best choice. UUIDs are better identifiers, so lets use them.
-
- 18 6月, 2010 5 次提交
-
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
If VM startup fails early enough (can't find a referenced USB device), libvirtd will crash trying to clear the VNC port bit, since port = 0, which overflows us out of the bitmap bounds. Fix this by being more defensive in the bitmap operations, and only clearing a previously set VNC port. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
Followup to https://bugzilla.redhat.com/show_bug.cgi?id=599091, commit 20206a4b, to reduce disk waste in padding. * src/qemu/qemu_monitor.h (QEMU_MONITOR_MIGRATE_TO_FILE_BS): Drop back to 4k. (QEMU_MONITOR_MIGRATE_TO_FILE_TRANSFER_SIZE): New macro. * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Update comment. * src/qemu/qemu_monitor_text.c (qemuMonitorTextMigrateToFile): Use two invocations of dd to output non-aligned large blocks. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONMigrateToFile): Likewise.
-
由 Stefan Berger 提交于
This patch adds an optional XML attribute to a nwfilter rule to give the user control over whether the rule is supposed to be using the iptables state match or not. A rule may now look like shown in the XML below with the statematch attribute either having value '0' or 'false' (case-insensitive). [...] <rule action='accept' direction='in' statematch='false'> <tcp srcmacaddr='1:2:3:4:5:6' srcipaddr='10.1.2.3' srcipmask='32' dscp='33' srcportstart='20' srcportend='21' dstportstart='100' dstportend='1111'/> </rule> [...] I am also extending the nwfilter schema and add this attribute to a test case.
-
由 Eduardo Otubo 提交于
Use virBuffer* API to conditionally keep the portion of the command line specific to HMC, so that IVM can work. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 17 6月, 2010 4 次提交
-
-
由 Stefan Berger 提交于
The following patch enables the iptables match target to be used by default for incoming traffic. So far it has only be used for outgoing traffic.
-
由 Stefan Berger 提交于
This patch works around a recent extension of the netlink driver I had made use of when building the netlink messages. Unfortunately older kernels don't accept IFLA_IFNAME + name of interface as a replacement for the interface's index, so this patch now gets the interface index ifindex if it's not provided (ifindex <= 0).
-
由 Matthias Bolte 提交于
-
由 Eric Blake 提交于
* src/phyp/phyp_driver.c (phypNumDomainsGeneric): Avoid glob collision by quoting sed argument. (phypDomainSetCPU): Avoid non-portable \+ in sed. (phypGetVIOSPartitionID, phypDiskType, phypListDomainsGeneric) (phypListDefinedDomains): Micro-optimize anchored substitutions.
-
- 15 6月, 2010 6 次提交
-
-
由 Eric Blake 提交于
Match earlier change for qemu pause support with virDomainCreateXML. * src/qemu/qemu_driver.c (qemudDomainObjStart): Add parameter; all callers changed. (qemudDomainStartWithFlags): Implement flag support.
-
由 Eric Blake 提交于
* src/esx/esx_driver.c (esxDomainCreate): Move guts... (esxDomainCreateWithFlags): ...to new function. (esxDriver): Trivially support the new API. * src/lxc/lxc_driver.c (lxcDomainStart, lxcDomainStartWithFlags) (lxcDriver): Likewise. * src/opennebula/one_driver.c (oneDomainStart) (oneDomainStartWithFlags, oneDriver): Likewise. * src/openvz/openvz_driver.c (openvzDomainCreate) (openvzDomainCreateWithFlags, openvzDriver): Likewise. * src/qemu/qemu_driver.c (qemudDomainStart) (qemudDomainStartWithFlags, qemuDriver): Likewise. * src/test/test_driver.c (testDomainCreate) (testDomainCreateWithFlags, testDriver): Likewise. * src/uml/uml_driver.c (umlDomainStart, umlDomainStartWithFlags) (umlDriver): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainCreate) (vboxDomainCreateWithFlags, Driver): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainCreate) (xenUnifiedDomainCreateWithFlags, xenUnifiedDriver): Likewise. * src/xenapi/xenapi_driver.c (xenapiDomainCreate) (xenapiDomainCreateWithFlags, xenapiDriver): Likewise.
-
由 Eric Blake 提交于
Define the wire format for the new virDomainCreateWithFlags API, and implement client and server side of marshaling code. * daemon/remote.c (remoteDispatchDomainCreateWithFlags): Add server side dispatch for virDomainCreateWithFlags. * src/remote/remote_driver.c (remoteDomainCreateWithFlags) (remote_driver): Client side serialization. * src/remote/remote_protocol.x (remote_domain_create_with_flags_args) (remote_domain_create_with_flags_ret) (REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS): Define wire format. * daemon/remote_dispatch_args.h: Regenerate. * daemon/remote_dispatch_prototypes.h: Likewise. * daemon/remote_dispatch_table.h: Likewise. * src/remote/remote_protocol.c: Likewise. * src/remote/remote_protocol.h: Likewise. * src/remote_protocol-structs: Likewise.
-
由 Eric Blake 提交于
Persistent domain creation needs the same features as transient domains, but virDomainCreate lacks the flags argument present in virDomainCreateXML. virDomainCreateFlags is already claimed as a public enum, so we have to break convention and expose virDomainCreateWithFlags. * include/libvirt/libvirt.h.in (virDomainCreateWithFlags): Add. * src/driver.h (virDrvDomainCreateWithFlags): Internal API. * src/libvirt.c (virDomainCreateWithFlags): Glue public API to driver API. * src/libvirt_public.syms (LIBVIRT_0.8.2): Expose public API. * src/esx/esx_driver.c (esxDriver): Add stub for driver. * src/lxc/lxc_driver.c (lxcDriver): Likewise. * src/opennebula/one_driver.c (oneDriver): Likewise. * src/openvz/openvz_driver.c (openvzDriver): Likewise. * src/phyp/phyp_driver.c (phypDriver): Likewise. * src/qemu/qemu_driver.c (qemuDriver): Likewise. * src/remote/remote_driver.c (remote_driver): Likewise. * src/test/test_driver.c (testDriver): Likewise. * src/uml/uml_driver.c (umlDriver): Likewise. * src/vbox/vbox_tmpl.c (Driver): Likewise. * src/xen/xen_driver.c (xenUnifiedDriver): Likewise. * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
-
由 Eric Blake 提交于
Daniel's patch works with gcc and CFLAGS containing -O (the autoconf default), but fails with non-gcc or with other CFLAGS (such as -g), since c-ctype.h declares c_isdigit as a macro only for certain compilation settings. * src/Makefile.am (libvirt_parthelper_LDFLAGS): Add gnulib library, for when c_isdigit is not a macro. * src/storage/parthelper.c (main): Avoid out-of-bounds dereference, noticed by Jim Meyering.
-
由 Daniel P. Berrange 提交于
Disks with a trailing digit in their path (eg /dev/loop0 or /dev/dm0) have an extra 'p' appended before the partition number (eg, to form /dev/loop0p1 not /dev/loop01). Fix the partition lookup to append this extra 'p' when required * src/storage/parthelper.c: Add a 'p' before partition number if required
-
- 12 6月, 2010 2 次提交
-
-
由 Eric Blake 提交于
Otherwise, a malicious packet could cause a DoS via spurious out-of-memory failure. * src/uml/uml_driver.c (umlMonitorCommand): Validate that incoming data is reliable before using it to allocate/dereference memory. Don't report bogus errno on short read. Reported by Jim Meyering.
-
由 Matthias Bolte 提交于
Report that libvirt was built without that driver instead of trying to connect to a libvirtd, when we know that this is going to fail.
-
- 11 6月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
Otherwise this will segfault if DISPLAY is not defined.
-
由 Matthias Bolte 提交于
Otherwise this will segfault if PATH is not defined. Reported by Emre Erenoglu
-