- 21 8月, 2012 6 次提交
-
-
由 Martin Kletzander 提交于
The defines QEMU_REMOTE_PORT_MIN and QEMU_REMOTE_PORT_MAX were used to find free port when starting domains. As this was hard-coded to the same ports as default VNC servers, there were races with these other programs. This patch includes the possibility to change the default starting port as well as the maximum port (mostly for completeness) in qemu config file. Support for two new config options in qemu.conf is added: - remote_port_min (defaults to QEMU_REMOTE_PORT_MIN and must be >= than this value) - remote_port_max (defaults to QEMU_REMOTE_PORT_MAX and must be <= than this value)
-
由 Martin Kletzander 提交于
Port allocations for SPICE and VNC behave almost the same (with default ports), but there is some mess in the code. This patch clears these inconsistencies and makes sure the same behavior will be used when ports for remote displays are changed. Changes: - hard-coded number 5900 removed (handled elsewhere like with VNC) - reservedVNCPorts renamed to reservedRemotePorts (it's not just for VNC anymore) - QEMU_VNC_PORT_{MIN,MAX} renamed to QEMU_REMOTE_PORT_{MIN,MAX} - port allocation unified for VNC and SPICE
-
由 Marcelo Cerri 提交于
This patch updates libvirt's API to allow applications to inspect the full list of security labels of a domain. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
由 Marcelo Cerri 提交于
This patch updates the key "security_driver" in QEMU config to suport both a sigle default driver or a list of default drivers. This ensures that it will remain compatible with older versions of the config file. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
由 Marcelo Cerri 提交于
These changes make the security drivers able to find and handle the correct security label information when more than one label is available. They also update the DAC driver to be used as an usual security driver. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
由 Marcelo Cerri 提交于
This patch updates the structures that store information about each domain and each hypervisor to support multiple security labels and drivers. It also updates all the remaining code to use the new fields. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
- 18 8月, 2012 2 次提交
-
-
由 Shradha Shah 提交于
For network devices allocated from a network with <forward mode='hostdev'>, there is a need to add the newly minted hostdev to the hostdevs array. In this case we also need to call qemuPrepareHostDevices just for this one device, as the standard call to initialize all the hostdevs that were defined directly in the domain's configuration has already been made by the time we allocate a device from a libvirt network, and thus have something that needs initializing. Signed-off-by: NShradha Shah <sshah@solarflare.com>
-
由 Shradha Shah 提交于
Move the functions the parse/format, and validate PCI addresses to their own file so they can be conveniently used in other places besides device_conf.c Refactoring existing code without causing any functional changes to prepare for new code. This patch makes the code reusable. Signed-off-by: NShradha Shah <sshah@solarflare.com>
-
- 17 8月, 2012 2 次提交
-
-
由 Kyle Mestery 提交于
Add the ability to support VLAN tags for Open vSwitch virtual port types. To accomplish this, modify virNetDevOpenvswitchAddPort and virNetDevTapCreateInBridgePort to take a virNetDevVlanPtr argument. When adding the port to the OVS bridge, setup either a single VLAN or a trunk port based on the configuration from the virNetDevVlanPtr. Signed-off-by: NKyle Mestery <kmestery@cisco.com>
-
由 Osier Yang 提交于
Setting hard_limit larger than previous swap_hard_limit must fail, it's not that good if one wants to change the swap_hard_limit and hard_limit together. E.g. % virsh memtune rhel6 hard_limit : 1000000 soft_limit : 1000000 swap_hard_limit: 1000000 % virsh memtune rhel6 --hard-limit 1000020 --soft-limit 1000020 \ --swap-hard-limit 1000020 --live This patch reorder the limits setting to set the swap_hard_limit first, hard_limit then, and soft_limit last if it's greater than current swap_hard_limit. And soft_limit first, hard_limit then, swap_hard_limit last, if not.
-
- 16 8月, 2012 2 次提交
-
-
由 Laine Stump 提交于
The underlying function to set the vlan tag of an SR-IOV network device was already in place (although an extra patch to save/restore the original vlan tag was needed), and recent patches added the ability to configure a vlan tag. This patch just ties those two together. An SR-IOV device doesn't support vlan trunking, so if anyone tries to configure more than a single tag, or set the trunk flag, and error is logged.
-
由 Osier Yang 提交于
The parameter value for cpuset could be in special format like "0-10,^7", which is not recognized by cgroup. This patch is to ensure the cpuset is formatted as expected before passing it to cgroup. As a side effect, after the patch, it parses the cpuset early before cgroup setting, to avoid the rollback if cpuset parsing fails afterwards.
-
- 15 8月, 2012 3 次提交
-
-
由 Daniel P. Berrange 提交于
While the QEMU monitor/agent do not want JSON strings pretty printed, other parts of libvirt might. Instead of hardcoding QEMU's desired behaviour in virJSONValueToString(), add a boolean flag to control pretty printing Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The qemuProcessAutoDestroyRun function was removed in an earlier commit, but the header file declaration was not deleted
-
由 Laine Stump 提交于
virtPortProfile is now used by 4 different types of network devices (NETWORK, BRIDGE, DIRECT, and HOSTDEV), and it's getting cumbersome to replicate so much code in 4 different places just because each type has the virtPortProfile in a slightly different place. This patch puts a single virtPortProfile in a common place (outside the type-specific union) in both virDomainNetDef and virDomainActualNetDef, and adjusts the parse and format code (and the few other places where it is used) accordingly. Note that when a <virtualport> element is found, the parse functions verify that the interface is of a type that supports one, otherwise an error is generated (CONFIG_UNSUPPORTED in the case of <interface>, and INTERNAL in the case of <actual>, since the contents of <actual> are always generated by libvirt itself).
-
- 14 8月, 2012 1 次提交
-
-
由 Osier Yang 提交于
As the consensus in: https://www.redhat.com/archives/libvir-list/2012-July/msg01692.html, this patch is to destroy conf/virdomainlist.[ch], folding the helpers into conf/domain_conf.[ch]. * src/Makefile.am: - Various indention fixes incidentally - Add macro DATATYPES_SOURCES (datatypes.[ch]) - Link datatypes.[ch] for libvirt_lxc * src/conf/domain_conf.c: - Move all the stuffs from virdomainlist.c into it - Use virUnrefDomain and virUnrefDomainSnapshot instead of virDomainFree and virDomainSnapshotFree, which are defined in libvirt.c, and we don't want to link to it. - Remove "if" before "free" the object, as virObjectUnref is in the list "useless_free_options". * src/conf/domain_conf.h: - Move all the stuffs from virdomainlist.h into it - s/LIST_FILTER/LIST_DOMAINS_FILTER/ * src/libxl/libxl_driver.c: - s/LIST_FILTER/LIST_DOMAINS_FILTER/ - no (include "virdomainlist.h") * src/libxl/libxl_driver.c: Likewise * src/lxc/lxc_driver.c: Likewise * src/openvz/openvz_driver.c: Likewise * src/parallels/parallels_driver.c: Likewise * src/qemu/qemu_driver.c: Likewise * src/test/test_driver.c: Likewise * src/uml/uml_driver.c: Likewise * src/vbox/vbox_tmpl.c: Likewise * src/vmware/vmware_driver.c: Likewise * tools/virsh-domain-monitor.c: Likewise * tools/virsh.c: Likewise
-
- 11 8月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
This patch introduces a new error code VIR_ERR_OPERATION_UNSUPPORTED to mark error messages regarding operations that failed due to lack of support on the hypervisor or other than libvirt issues. The code is first used in reporting error if qemu does not support block IO tuning variables yielding error message: error: Unable to get block I/O throttle parameters error: Operation not supported: block_io_throttle field 'total_bytes_sec' missing in qemu's output instead of: error: Unable to get block I/O throttle parameters error: internal error cannot read total_bytes_sec
-
- 10 8月, 2012 1 次提交
-
-
由 Laine Stump 提交于
The meat of this patch is just moving the calls to virNWFilterRegisterCallbackDriver from each hypervisor's "register" function into its "initialize" function. The rest is just code movement to allow that, and a new virNWFilterUnRegisterCallbackDriver function to undo what the register function does. The long explanation: There is an array in nwfilter called callbackDrvArray that has pointers to a table of functions for each hypervisor driver that are called by nwfilter. One of those function pointers is to a function that will lock the hypervisor driver. Entries are added to the table by calling each driver's "register" function, which happens quite early in libvirtd's startup. Sometime later, each driver's "initialize" function is called. This function allocates a driver object and stores a pointer to it in a static variable that was previously initialized to NULL. (and here's the important part...) If the "initialize" function fails, the driver object is freed, and that pointer set back to NULL (but the entry in nwfilter's callbackDrvArray is still there). When the "lock the driver" function mentioned above is called, it assumes that the driver was successfully loaded, so it blindly tries to call virMutexLock on "driver->lock". BUT, if the initialize never happened, or if it failed, "driver" is NULL. And it just happens that "lock" is always the first field in driver so it is also NULL. Boom. To fix this, the call to virNWFilterRegisterCallbackDriver for each driver shouldn't be called until the end of its (*already guaranteed successful*) "initialize" function, not during its "register" function (which is currently the case). This implies that there should also be a virNWFilterUnregisterCallbackDriver() function that is called in a driver's "shutdown" function (although in practice, that function is currently never called).
-
- 09 8月, 2012 3 次提交
-
-
由 Jiri Denemark 提交于
When entering "confirm" phase, we are interested in the value of cancelled rather then ret variable which was interesting before "finish" phase and didn't change since then.
-
由 Jiri Denemark 提交于
Previously, qemu did not respond to monitor commands during migration if the limit was too high. This prevented us from raising the limit earlier. The qemu issue seems to be fixed (according to my testing) and we may remove the 32Mb/s limit.
-
由 Peter Krempa 提交于
This patch refactors the JSON parsing function that extracts the block IO tuning parameters from qemu's output. The most impacting change concerns the error message that is returned if the reply from qemu does not contain the needed data. The data for IO parameter tuning were added in qemu 1.1 and the previous error message was confusing. This patch also breaks long lines and extracts a multiple time used code pattern to a macro.
-
- 08 8月, 2012 3 次提交
-
-
由 Guannan Ren 提交于
-
由 Guannan Ren 提交于
Rename qemuDefaultScsiControllerModel to qemuCheckScsiControllerModel. When scsi model is given explicitly in XML(model > 0) checking if the underlying QEMU supports it or not first, raise an error on checking failure. When the model is not given(mode <= 0), return LSI by default, if the QEMU doesn't support it, raise an error.
-
由 Guannan Ren 提交于
QEMU_CAPS_SCSI_LSI set the flag when "lsi53c895a", bus PCI, alias "lsi" in the output of "qemu -device ?" -device lsi in qemu command line QEMU_CAPS_VIRTIO_SCSI_PCI set the flag when "name "virtio-scsi-pci", bus PCI" in the output of qemu devices query. -device virtio-scsi-pci in qemu command line
-
- 07 8月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
Make virSocket use the virObject APIs for reference counting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Make qemuAgentPtr and qemuMonitorPtr types use the virObject APIs for reference counting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Switch virDomainObjPtr to use the virObject APIs for reference counting. The main change is that virObjectUnref does not return the reference count, merely a bool indicating whether the object still has any refs left. Checking the return value is also not mandatory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
This converts the following public API datatypes to use the virObject infrastructure: virConnectPtr virDomainPtr virDomainSnapshotPtr virInterfacePtr virNetworkPtr virNodeDevicePtr virNWFilterPtr virSecretPtr virStreamPtr virStorageVolPtr virStoragePoolPtr The code is significantly simplified, since the mutex in the virConnectPtr object now only needs to be held when accessing the per-connection virError object instance. All other operations are completely lock free. * src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert public datatypes to use virObject * src/conf/domain_event.c, src/phyp/phyp_driver.c, src/qemu/qemu_command.c, src/qemu/qemu_migration.c, src/qemu/qemu_process.c, src/storage/storage_driver.c, src/vbox/vbox_tmpl.c, src/xen/xend_internal.c, tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c, tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert to use virObjectUnref/virObjectRef Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 06 8月, 2012 3 次提交
-
-
由 Richa Marwaha 提交于
This patch adds the support to run the QEMU network helper under unprivileged user. It also adds the support for attach-interface option in virsh to run under unprivileged user. Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com> Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
-
由 Richa Marwaha 提交于
This patch adds the capability in libvirt to check if -netdev bridge option is supported or not. Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com> Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
-
由 Michal Privoznik 提交于
If there's a memory leak in qemu or qemu is exploited the host's system will sooner or later start trashing instead of killing the bad process. This however has impact on performance and other guests as well. Therefore we should set a reasonable RSS limit even when user hasn't set any. It's better to be secure by default.
-
- 03 8月, 2012 1 次提交
-
-
由 Osier Yang 提交于
* src/conf/domain_conf.c: - Add virDomainControllerFind to find controller device by type and index. - Add virDomainControllerRemove to remove the controller device from maintained controler list. * src/conf/domain_conf.h: - Declare the two new helpers. * src/libvirt_private.syms: - Expose private symbols for the two new helpers. * src/qemu/qemu_driver.c: - Support attach/detach controller device persistently * src/qemu/qemu_hotplug.c: - Use the two helpers to simplify the codes.
-
- 02 8月, 2012 3 次提交
-
-
由 Michal Privoznik 提交于
One of our latest commits fbe87126 introduced this nasty typo: func(vmdef, ...); where func() dereference vmdef->ncontrollers, and vmdef was initialized to NULL. This leaves us with unconditional immediate segfault. It should be vm->def instead.
-
由 Peter Krempa 提交于
This patch enables the "none" USB controller for qemu guests and adds valdiation on hot-plugged devices if the guest has USB disabled. This patch also adds a set of tests to check parsing of domain XMLs that use the "none" controller and some forbidden situations concerning it.
-
由 Peter Krempa 提交于
Libvirt adds a USB controller to the guest even if the user does not specify any in the XML. This is due to back-compat reasons. To allow disabling USB for a guest this patch adds a new USB controller type "none" that disables USB support for the guest.
-
- 01 8月, 2012 1 次提交
-
-
由 Marc-André Lureau 提交于
Pushed without ack, under the trivial rule.
-
- 31 7月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Detected by Coverity. * src/qemu/qemu_hotplug.c (qemuDomainAttachHostDevice): Avoid double free of usb on failure.
-
- 27 7月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Any time we have a string with no % passed through gettext, a translator can inject a % to cause a stack overread. When there is nothing to format, it's easier to ask for a string that cannot be used as a formatter, by using a trivial "%s" format instead. In the past, we have used --disable-nls to catch some of the offenders, but that doesn't get run very often, and many more uses have crept in. Syntax check to the rescue! The syntax check can catch uses such as virReportError(code, _("split " "string")); by using a sed script to fold context lines into one pattern space before checking for a string without %. This patch is just mechanical insertion of %s; there are probably several messages touched by this patch where we would be better off giving the user more information than a fixed string. * cfg.mk (sc_prohibit_diagnostic_without_format): New rule. * src/datatypes.c (virUnrefConnect, virGetDomain) (virUnrefDomain, virGetNetwork, virUnrefNetwork, virGetInterface) (virUnrefInterface, virGetStoragePool, virUnrefStoragePool) (virGetStorageVol, virUnrefStorageVol, virGetNodeDevice) (virGetSecret, virUnrefSecret, virGetNWFilter, virUnrefNWFilter) (virGetDomainSnapshot, virUnrefDomainSnapshot): Add %s wrapper. * src/lxc/lxc_driver.c (lxcDomainSetBlkioParameters) (lxcDomainGetBlkioParameters): Likewise. * src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML) (virDomainDiskDefParseXML, virDomainGraphicsDefParseXML): Likewise. * src/conf/network_conf.c (virNetworkDNSHostsDefParseXML) (virNetworkDefParseXML): Likewise. * src/conf/nwfilter_conf.c (virNWFilterIsValidChainName): Likewise. * src/conf/nwfilter_params.c (virNWFilterVarValueCreateSimple) (virNWFilterVarAccessParse): Likewise. * src/libvirt.c (virDomainSave, virDomainSaveFlags) (virDomainRestore, virDomainRestoreFlags) (virDomainSaveImageGetXMLDesc, virDomainSaveImageDefineXML) (virDomainCoreDump, virDomainGetXMLDesc) (virDomainMigrateVersion1, virDomainMigrateVersion2) (virDomainMigrateVersion3, virDomainMigrate, virDomainMigrate2) (virStreamSendAll, virStreamRecvAll) (virDomainSnapshotGetXMLDesc): Likewise. * src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopReqLeaseDel) (virNWFilterDHCPSnoopReq): Likewise. * src/openvz/openvz_driver.c (openvzUpdateDevice): Likewise. * src/openvz/openvz_util.c (openvzKBPerPages): Likewise. * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Likewise. * src/qemu/qemu_command.c (qemuBuildHubDevStr, qemuBuildChrChardevStr) (qemuBuildCommandLine): Likewise. * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/rpc/virnetsaslcontext.c (virNetSASLSessionGetIdentity): Likewise. * src/rpc/virnetsocket.c (virNetSocketNewConnectUNIX) (virNetSocketSendFD, virNetSocketRecvFD): Likewise. * src/storage/storage_backend_disk.c (virStorageBackendDiskBuildPool): Likewise. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemProbe) (virStorageBackendFileSystemBuild): Likewise. * src/storage/storage_backend_rbd.c (virStorageBackendRBDOpenRADOSConn): Likewise. * src/storage/storage_driver.c (storageVolumeResize): Likewise. * src/test/test_driver.c (testInterfaceChangeBegin) (testInterfaceChangeCommit, testInterfaceChangeRollback): Likewise. * src/vbox/vbox_tmpl.c (vboxListAllDomains): Likewise. * src/xenxs/xen_sxpr.c (xenFormatSxprDisk, xenFormatSxpr): Likewise. * src/xenxs/xen_xm.c (xenXMConfigGetUUID, xenFormatXMDisk) (xenFormatXM): Likewise.
-
- 23 7月, 2012 2 次提交
-
-
由 Peter Krempa 提交于
This patch cleans up coding style breaks some long lines and fixes error message spelling on various places in domain_conf.c and in the qemu driver.
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-