- 12 7月, 2011 9 次提交
-
-
由 Daniel P. Berrange 提交于
Given a PID, the QEMU driver reads /proc/$PID/cmdline and /proc/$PID/environ to get the configuration. This is fed into the ARGV->XML convertor to build an XML configuration for the process. /proc/$PID/exe is resolved to identify the full command binary path After checking for name/uuid uniqueness, an attempt is made to connect to the monitor socket. If successful then 'info status' and 'info kvm' are issued to determine whether the CPUs are running and if KVM is enabled. * src/qemu/qemu_driver.c: Implement virDomainQemuAttach * src/qemu/qemu_process.h, src/qemu/qemu_process.c: Add qemuProcessAttach to connect to the monitor of an existing QEMU process
-
由 Daniel P. Berrange 提交于
When attaching to an external QEMU process, it is neccessary to check if the process is using KVM or not. This can be done using a monitor command * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add API for checking if KVM is enabled
-
由 Daniel P. Berrange 提交于
To enable attaching to externally launched QEMU, we need to be able to reverse engineer a guest XML config based on the argv for a PID in /proc * src/qemu/qemu_command.c, src/qemu/qemu_command.h: Add qemuParseCommandLinePid which extracts QEMU config from argv in /proc, given a PID number
-
由 Daniel P. Berrange 提交于
When converting QEMU argv into a virDomainDefPtr, also extract the pidfile, monitor character device config and the monitor mode. * src/qemu/qemu_command.c, src/qemu/qemu_command.h: Extract pidfile & monitor config from QEMU argv * src/qemu/qemu_driver.c, tests/qemuargv2xmltest.c: Add extra params when calling qemuParseCommandLineString
-
由 Daniel P. Berrange 提交于
Avoid re-formatting the pidfile path everytime we need it. Create it once when starting the guest, and preserve it until the guest is shutdown. * src/libvirt_private.syms, src/util/util.c, src/util/util.h: Add virFileReadPidPath * src/qemu/qemu_domain.h: Add pidfile field * src/qemu/qemu_process.c: Store pidfile path in qemuDomainObjPrivate
-
由 Alex Jia 提交于
* src/qemu/qemu.conf: Add blkio controller into qemu.conf.
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (doCoreDump): Guarantee fd is closed.
-
由 Eric Blake 提交于
* src/util/virtaudit.[ch]: Rename... * src/util/viraudit.[ch]: ...to match virAudit* API. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * daemon/libvirtd.c: Likewise. * po/POTFILES.in: Likewise. * src/libvirt_private.syms: Likewise. * src/qemu/qemu_audit.c: Likewise.
-
由 Matthias Bolte 提交于
The drivers were accepting domain configs without checking if those were actually meant for them. For example the LXC driver happily accepts configs with type QEMU. Add a check for the expected domain types to the virDomainDefParse* functions.
-
- 11 7月, 2011 2 次提交
-
-
由 Wen Congyang 提交于
If virDomainSaveConfig() failed, we will return NULL to source, and the vm is still available to restart during confirm() step in v3 protocol. So we should kill it off in qemuMigrationFinish(). In v2 protocol, we should not set vm to NULL, because we hold a reference of vm and should unrefernce it.
-
由 Michal Privoznik 提交于
This patch creates new <bios> element which, at this time has only the attribute useserial='yes|no'. This attribute allow users to use Serial Graphics Adapter and see BIOS messages from the very first moment domain boots up. Therefore, users can choose boot medium, set PXE, etc.
-
- 08 7月, 2011 5 次提交
-
-
由 Michael Santos 提交于
-
由 Michal Privoznik 提交于
This option accepts 3 values: -keep, to keep current client connected (Spice+VNC) -disconnect, to disconnect client (Spice) -fail, to fail setting password if there is a client connected (Spice)
-
由 Michal Privoznik 提交于
When dynamic ownership is disabled we don't want to chown any files, not just local.
-
由 John Williams 提交于
Add libvirt support for MicroBlaze architecture as a QEMU target. Based on mips/mipsel pattern. Signed-off-by: NJohn Williams <john.williams@petalogix.com>
-
由 Eric Blake 提交于
Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
-
- 06 7月, 2011 3 次提交
-
-
由 Matthias Bolte 提交于
Some callers expected virFileMakePath to set errno, some expected it to return an errno value. Unify this to return 0 on success and -1 on error. Set errno to report detailed error information. Also optimize virFileMakePath if stat fails with an errno different from ENOENT.
-
由 Guannan Ren 提交于
add a new API pciDeviceReAttachInit() in pci.c to initialize state values for nodedev reattach Initialize three state value of device driver to 1. This is just for a new call to qemudNodeDeviceReAttach()
-
由 Laine Stump 提交于
Although most functions with flags check to verify no application is passing in flag bits that are currently undefined, for some reason this function wasn't.
-
- 05 7月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
virFileMakePath returns an errno value on error, that will never be negative. An virFileMakePath error would have been ignored here, instead of being reported correctly.
-
- 04 7月, 2011 5 次提交
-
-
由 Daniel P. Berrange 提交于
Add a new attribute to the <seclabel> XML to allow resource relabelling to be enabled with static label usage. <seclabel model='selinux' type='static' relabel='yes'> <label>system_u:system_r:svirt_t:s0:c392,c662</label> </seclabel> * docs/schemas/domain.rng: Add relabel attribute * src/conf/domain_conf.c, src/conf/domain_conf.h: Parse the 'relabel' attribute * src/qemu/qemu_process.c: Unconditionally clear out the 'imagelabel' attribute * src/security/security_apparmor.c: Skip based on 'relabel' attribute instead of label type * src/security/security_selinux.c: Skip based on 'relabel' attribute instead of label type and fill in <imagelabel> attribute if relabel is enabled.
-
由 Daniel P. Berrange 提交于
Normally the dynamic labelling mode will always use a base label of 'svirt_t' for VMs. Introduce a <baselabel> field in the <seclabel> XML to allow this base label to be changed eg <seclabel type='dynamic' model='selinux'> <baselabel>system_u:object_r:virt_t:s0</baselabel> </seclabel> * docs/schemas/domain.rng: Add <baselabel> * src/conf/domain_conf.c, src/conf/domain_conf.h: Parsing of base label * src/qemu/qemu_process.c: Don't reset 'model' attribute if a base label is specified * src/security/security_apparmor.c: Refuse to support base label * src/security/security_selinux.c: Use 'baselabel' when generating label, if available
-
由 Wen Congyang 提交于
cmd is not initialized to NULL, but we try to freed it if we meet some error.
-
由 Eric Blake 提交于
Detected by Coverity. qemuDomainEventQueue requires a non-NULL pointer; most callers silently drop the event if we encountered and OOM situation trying to create the event. * src/qemu/qemu_migration.c (qemuMigrationFinish): Check for OOM.
-
由 Eric Blake 提交于
Coverity warns if the majority of callers check a function for errors, but a few don't; but in qemu_audit and qemu_domain, the choice to not check for failures was safe. In qemu_command, the failure to generate a uuid can only occur on a bad pointer. * src/qemu/qemu_audit.c (qemuAuditCgroup): Ignore failure to get cgroup controller. * src/qemu/qemu_domain.c (qemuDomainObjEnterMonitor) (qemuDomainObjEnterMonitorWithDriver): Ignore failure to get timestamp. * src/qemu/qemu_command.c (qemuParseCommandLine): Check for error.
-
- 01 7月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
The qemudDomainSaveFlag method will call EndJob on the 'vm' object it is passed in. This can result in the 'vm' object being free'd if the last reference is removed. Thus no caller of 'qemudDomainSaveFlag' must *ever* reference 'vm' again upon return. Unfortunately qemudDomainSave and qemuDomainManagedSave both call 'virDomainObjUnlock', which can result in a crash. This is non-deterministic since it involves a race with the monitor I/O thread. Fix this by making qemudDomainSaveFlag responsible for calling virDomainObjUnlock instead. * src/qemu/qemu_driver.c: Fix potential use after free when saving guests
-
由 Daniel P. Berrange 提交于
The 'char control[CMSG_SPACE(sizeof(int))];' was not being wiped, so could potentially contain uninitialized bytes. While this was harmless in this case, it caused complaints from valgrind * src/qemu/qemu_monitor.c: memset 'control' variable in qemuMonitorIOWriteWithFD
-
由 Daniel P. Berrange 提交于
The event handler functions do not free the virJSONValuePtr object. Every event received from a VM thus caused a memory leak * src/qemu/qemu_monitor_json.c: Fix leak of event object
-
由 Daniel P. Berrange 提交于
The 'function' field in the PCI address was not correctly initialized, so it was building the wrong address address string and so not removing all functions from the in use list. * src/qemu/qemu_command.c: Fix initialization of PCI function
-
- 30 6月, 2011 2 次提交
-
-
由 Wen Congyang 提交于
If we pass VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG to qemuGetSchedulerParametersFlags() or *nparams is less than 1, we will unlock qemu_driver without locking it. It's very dangerous. We should lock qemu_driver after calling virCheckFlags().
-
由 Wen Congyang 提交于
We should save domain status after modifing vcpupin. If not, we will get wrong vcpupin information after rebooting libvirtd.
-
- 29 6月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
Although we create a temporary file, it is owned by root:root and have rights 0600. In case qemu does not run under root, it is unable to write to that file and thus we transfer 0B sized file.
-
由 Daniel P. Berrange 提交于
Allow a 'configFile' parameter to be passed into the lock drivers to provide configuration. Wire up the QEMU driver to pass in file names '/etc/libvirt/qemu-$NAME.conf eg qemu-sanlock.conf * src/locking/lock_driver.h, src/locking/lock_driver_nop.c, src/locking/lock_driver_sanlock.c, src/locking/lock_manager.c, src/locking/lock_manager.h: Add configFile parameter * src/qemu/qemu_conf.c: Pass in configuration file path to lock driver plugins
-
- 28 6月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt sanlock plugin is intentionally leaking a file descriptor to QEMU. To enable QEMU to use this FD under SELinux, it must be labelled correctly. We dont want to use the svirt_image_t for this, since QEMU must not be allowed to actually use the FD. So instead we label it with svirt_t using virSecurityManagerSetProcessFDLabel * src/locking/domain_lock.c, src/locking/domain_lock.h, src/locking/lock_driver.h, src/locking/lock_driver_nop.c, src/locking/lock_driver_sanlock.c, src/locking/lock_manager.c, src/locking/lock_manager.h: Optionally pass an FD back to the hypervisor for security driver labelling * src/qemu/qemu_process.c: label the lock manager plugin FD with the process label
-
由 Daniel P. Berrange 提交于
The virSecurityManagerSetFDLabel method is used to label file descriptors associated with disk images. There will shortly be a need to label other file descriptors in a different way. So the current name is ambiguous. Rename the method to virSecurityManagerSetImageFDLabel to clarify its purpose * src/libvirt_private.syms, src/qemu/qemu_migration.c, src/qemu/qemu_process.c, src/security/security_apparmor.c, src/security/security_dac.c, src/security/security_driver.h, src/security/security_manager.c, src/security/security_manager.h, src/security/security_selinux.c, src/security/security_stack.c: s/FDLabel/ImageFDLabel/
-
由 Jiri Denemark 提交于
When CURRENT and FORCE flags were used together, UpdateDeviceFlags did nothing because it failed to transform CURRENT into either LIVE or CONFIG.
-
- 27 6月, 2011 2 次提交
-
-
由 Eric Blake 提交于
We already have a public virDomainPinVcpu, which implies that Pin and Vcpu are treated as separate words. Unreleased commit e261987c introduced virDomainGetVcpupinInfo as the first public API that used Vcpupin, although we had prior internal uses of that spelling. For consistency, change the spelling to be two words everywhere, regardless of whether pin comes first or last. * daemon/remote.c: Treat vcpu and pin as separate words. * include/libvirt/libvirt.h.in: Likewise. * src/conf/domain_conf.c: Likewise. * src/conf/domain_conf.h: Likewise. * src/driver.h: Likewise. * src/libvirt.c: Likewise. * src/libvirt_private.syms: Likewise. * src/libvirt_public.syms: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/remote/remote_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * tools/virsh.c: Likewise. * src/remote/remote_protocol.x: Likewise. * src/remote_protocol-structs: Likewise. Suggested by Matthias Bolte.
-
由 Osier Yang 提交于
This is no code between virSaveLastError and virGetLastError will set an error, remove the bogus codes.
-
- 25 6月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Caught by gcc -O2, during autobuild.sh. * src/qemu/qemu_driver.c (qemudDomainGetVcpupinInfo): Initialize vm.
-
由 Taku Izumi 提交于
This patch implements the code to address the new API (virDomainGetVcpupinInfo) in the qemu driver. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-