- 15 1月, 2011 6 次提交
-
-
由 Marc-André Lureau 提交于
We try to use that command first when setting a VNC/SPICE password. If that doesn't work we fallback to the legacy VNC only password Allow an expiry time to be set, if that doesn't work, throw an error if they try to use SPICE. Change since v1: - moved qemuInitGraphicsPasswords to qemu_hotplug, renamed to qemuDomainChangeGraphicsPasswords. - updated what looks like a typo (that appears to work anyway) in initial patch from Daniel: - ret = qemuInitGraphicsPasswords(driver, vm, - VIR_DOMAIN_GRAPHICS_TYPE_SPICE, - &vm->def->graphics[0]->data.vnc.auth, - driver->vncPassword); + ret = qemuInitGraphicsPasswords(driver, vm, + VIR_DOMAIN_GRAPHICS_TYPE_SPICE, + &vm->def->graphics[0]->data.spice.auth, + driver->spicePassword); Based on patch by Daniel P. Berrange <berrange@redhat.com>.
-
由 Marc-André Lureau 提交于
-
由 Jim Fehlig 提交于
I broke 'make check' with commit 04197350 by unconditionally emitting 'hap=' in xen xm driver. Only emit 'hap=' if xendConfigVersion >= 3. I've tested sending 'hap=' to a Xen 3.2 machine without support for hap setting and verified that xend silently drops the unrecognized setting.
-
由 Eric Blake 提交于
* src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor. * src/conf/domain_conf.c (virDomainChrDevice) (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop monitor support. * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature. * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise. * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of monConfig. * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree) (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse): Adjust to type change. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_driver.c (qemuPrepareMonitorChr) (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor) (qemudShutdownVMDaemon): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
-
由 Eric Blake 提交于
This opens up the possibility of reusing the smaller ChrSourceDef for both qemu monitor and a passthrough smartcard device. * src/conf/domain_conf.h (_virDomainChrDef): Factor host details... (_virDomainChrSourceDef): ...into new struct. (virDomainChrSourceDefFree): New prototype. * src/conf/domain_conf.c (virDomainChrDefFree) (virDomainChrDefParseXML, virDomainChrDefFormat): Split... (virDomainChrSourceDefClear, virDomainChrSourceDefFree) (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat): ...into new functions. (virDomainChrDefParseTargetXML): Update clients to reflect type split. * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel) (virVMXFormatSerial, virVMXFormatParallel): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise. * src/xen/xend_internal.c (xenDaemonParseSxprChar) (xenDaemonFormatSxprChr): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial) (vboxAttachParallel): Likewise. * src/security/security_dac.c (virSecurityDACSetChardevLabel) (virSecurityDACSetChardevCallback) (virSecurityDACRestoreChardevLabel) (virSecurityDACRestoreChardevCallback): Likewise. * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel) (SELinuxSetSecurityChardevCallback) (SELinuxRestoreSecurityChardevLabel) (SELinuxSetSecurityChardevCallback): Likewise. * src/security/virt-aa-helper.c (get_files): Likewise. * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole): Likewise. * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise. * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY) (umlDomainOpenConsole): Likewise. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildChrArgStr, qemuBuildCommandLine) (qemuParseCommandLineChr): Likewise. * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat) (qemuDomainObjPrivateXMLParse): Likewise. * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor) (qemudFindCharDevicePTYs, qemuPrepareChardevDevice) (qemuPrepareMonitorChr, qemudShutdownVMDaemon) (qemuDomainOpenConsole): Likewise. * src/qemu/qemu_command.h (qemuBuildChrChardevStr) (qemuBuildChrArgStr): Delete, now that they are static. * src/libvirt_private.syms (domain_conf.h): New exports. * cfg.mk (useless_free_options): Update list. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update tests.
-
由 Jiri Denemark 提交于
-
- 14 1月, 2011 6 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_capabilities.h (qemuCapsParseDeviceStr): New prototype. * src/qemu/qemu_capabilities.c (qemuCapsParsePCIDeviceStrs) Rename and split... (qemuCapsExtractDeviceStr, qemuCapsParseDeviceStr): ...to make it easier to add and test device-specific checks. (qemuCapsExtractVersionInfo): Update caller. * tests/qemuhelptest.c (testHelpStrParsing): Also test parsing of device-related flags. (mymain): Update expected flags. * tests/qemuhelpdata/qemu-0.12.1-device: New file. * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel60-device: New file. * tests/qemuhelpdata/qemu-kvm-0.12.3-device: New file. * tests/qemuhelpdata/qemu-kvm-0.13.0-device: New file.
-
由 Eric Blake 提交于
It was awkward having only int conversion in the virStrToLong family, but only long conversion in the virXPath family. Make both families support both types. * src/util/util.h (virStrToLong_l, virStrToLong_ul): New prototypes. * src/util/xml.h (virXPathInt, virXPathUInt): Likewise. * src/util/util.c (virStrToLong_l, virStrToLong_ul): New functions. * src/util/xml.c (virXPathInt, virXPathUInt): Likewise. * src/libvirt_private.syms (util.h, xml.h): Export them.
-
由 Eric Blake 提交于
* src/qemu/qemu_capabilities.c (qemuCapsProbeMachineTypes) (qemuCapsProbeCPUModels, qemuCapsParsePCIDeviceStrs) (qemuCapsExtractVersionInfo): Use virCommand rather than virExec.
-
由 Jim Fehlig 提交于
xen-unstable c/s 16931 introduced a per-domain setting for hvm guests to enable/disable hardware assisted paging. If disabled, software techniques such as shadow page tables are used. If enabled, and the feature exists in underlying hardware, hardware support for paging is used. Xen does not provide a mechanism to discover the HAP capability, so we advertise its availability for hvm guests on Xen >= 3.3.
-
由 Jim Fehlig 提交于
xen-unstable c/s 16931 introduced a per-domain setting for hvm guests to enable/disable hardware assisted paging. If disabled, software techniques such as shadow page tables are used. If enabled, and the feature exists in underlying hardware, hardware support for paging is used. This provides implementation for mapping HAP setting to/from domxml/native formats in xen drivers.
-
由 Jim Fehlig 提交于
Extend the virDomainFeature enumeration to include HAP (hardware assisted paging) feature. Hardware features such as Extended Page Table and Nested Page Table augment hypervisor software techniques such as shadow page table. Adding HAP to the virDomainFeature enumeration allows users to select between hardware and software memory management mechanisms for their guests.
-
- 13 1月, 2011 4 次提交
-
-
由 Eric Blake 提交于
Without this patch, at least tests/daemon-conf (which sticks $builddir/src in the PATH) tries to execute the directory $builddir/src/qemu rather than a real qemu binary. * src/util/util.h (virFileExists): Adjust prototype. (virFileIsExecutable): New prototype. * src/util/util.c (virFindFileInPath): Reject non-executables and directories. Avoid huge stack allocation. (virFileExists): Use lighter-weight syscall. (virFileIsExecutable): New function. * src/libvirt_private.syms (util.h): Export new function.
-
由 Matthias Bolte 提交于
-
由 Wen Congyang 提交于
When we do peer2peer migration, the dest uri is an address of the target host as seen from the source machine. So we must specify the ip or hostname of target host in dest uri. If we do not specify it, report an error to the user. Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
由 Osier Yang 提交于
If the emulator doesn't support SDL graphic, we should reject the use of SDL graphic xml with error messages, but not ignore it silently, and pretend things are fine. "-sdl" flag was exposed explicitly by qemu since 0.10.0, more detail: http://www.redhat.com/archives/libvir-list/2011-January/msg00442.html And we already have capability flag "QEMUD_CMD_FLAG_0_10", which could be used to prevent the patch affecting the older versions of QEMU. * src/qemu/qemu_command.c
-
- 12 1月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Don't report an error when the VirtualBox registry key is missing, as this just indicates that VirtualBox is not installed in general. This matches the behavior of the XPCOM glue that silently ignores a missing VBoxXPCOMC.so.
-
- 11 1月, 2011 7 次提交
-
-
由 Richard W.M. Jones 提交于
Skip IB700 when assigning PCI slots. Note: the I6300ESB watchdog _is_ a PCI device. To test this: I applied this patch to libvirt-0.8.3-2.fc14 (rebasing it slightly: qemu_command.c didn't exist in that version) and installed this on my machine, then tested that I could successfully add an ib700 watchdog device to a guest, start the guest, and the ib700 was available to the guest. I also added an i6300esb (PCI) watchdog to another guest, and verified that libvirt assigned a PCI device to it, that the guest could be started, and that i6300esb was present in the guest. Note that if you previously had a domain with a ib700 watchdog, it would have had an <address type='pci' .../> clause added to it in the libvirt configuration. This patch does not attempt to remove this. You cannot start such a domain -- qemu gives an error if you try. With this patch you are able to remove the bogus address element without libvirt adding it back. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
-
由 Eric Blake 提交于
* src/cpu/cpu_x86.c (x86ModelLoad): Free data before overwriting.
-
由 Eric Blake 提交于
* src/conf/network_conf.c (virNetworkDefParseXML): Release ipNodes.
-
由 Eric Blake 提交于
* src/util/network.c (virSocketAddrMask): Zero out port, so that iptables can initialize just the netmask then call virSocketFormatAddr without an uninitialized read in getnameinfo.
-
由 Cole Robinson 提交于
After the remote driver runs an event callback, it unconditionally disables the loop timer, thinking it just flushed every queued event. This doesn't work correctly though if an event is queued while a callback is running. The events actually aren't being lost, it's just that the event loop didn't think there was anything that needed to be dispatched. So all those 'lost events' should actually get re-triggered if you manually kick the loop by generating a new event (like creating a new guest). The solution is to disable the dispatch timer _before_ we invoke any event callbacks. Events queued while a callback is running will properly reenable the timer. More info at https://bugzilla.redhat.com/show_bug.cgi?id=624252
-
由 Daniel P. Berrange 提交于
The current security driver usage requires horrible code like if (driver->securityDriver && driver->securityDriver->domainSetSecurityHostdevLabel && driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver, vm, hostdev) < 0) This pair of checks for NULL clutters up the code, making the driver calls 2 lines longer than they really need to be. The goal of the patchset is to change the calling convention to simply if (virSecurityManagerSetHostdevLabel(driver->securityDriver, vm, hostdev) < 0) The first check for 'driver->securityDriver' being NULL is removed by introducing a 'no op' security driver that will always be present if no real driver is enabled. This guarentees driver->securityDriver != NULL. The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel' being non-NULL is hidden in a new abstraction called virSecurityManager. This separates the driver callbacks, from main internal API. The addition of a virSecurityManager object, that is separate from the virSecurityDriver struct also allows for security drivers to carry state / configuration information directly. Thus the DAC/Stack drivers from src/qemu which used to pull config from 'struct qemud_driver' can now be moved into the 'src/security' directory and store their config directly. * src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to use new virSecurityManager APIs * src/qemu/qemu_security_dac.c, src/qemu/qemu_security_dac.h src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h: Move into src/security directory * src/security/security_stack.c, src/security/security_stack.h, src/security/security_dac.c, src/security/security_dac.h: Generic versions of previous QEMU specific drivers * src/security/security_apparmor.c, src/security/security_apparmor.h, src/security/security_driver.c, src/security/security_driver.h, src/security/security_selinux.c, src/security/security_selinux.h: Update to take virSecurityManagerPtr object as the first param in all callbacks * src/security/security_nop.c, src/security/security_nop.h: Stub implementation of all security driver APIs. * src/security/security_manager.h, src/security/security_manager.c: New internal API for invoking security drivers * src/libvirt.c: Add missing debug for security APIs
-
由 Osier Yang 提交于
If invalid type is specified, e.g. <serial type='foo'> <target port='0'/> </serial> We replace 'foo' with "null" type implicitly, without reporting an error message to tell the user, and "start" or "edit" the domain will be success. It's not good to guess what the user wants, This patch is to fix the problem. * src/conf/domain_conf.c
-
- 08 1月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
This simplifies the callers of esxVI_LookupObjectContentByType.
-
- 07 1月, 2011 4 次提交
-
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Update test suite accordingly.
-
由 Matthias Bolte 提交于
VirtualBox uses megabyte, libvirt uses kilobyte.
-
由 Osier Yang 提交于
Add VM name/UUID in log for domain related APIs. Format: "dom=%p, (VM: name=%s, uuid=%s), param0=%s, param1=%s *src/libvirt.c (introduce two macros: VIR_DOMAIN_DEBUG, and VIR_DOMAIN_DEBUG0)
-
- 06 1月, 2011 5 次提交
-
-
由 Kay Schubert 提交于
I added a host definition to a network definition: <network> <name>Lokal</name> <uuid>2074f379-b82c-423f-9ada-305d8088daaa</uuid> <bridge name='virbr1' stp='on' delay='0' /> <ip address='192.168.180.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.180.128' end='192.168.180.254' /> <host mac='23:74:00:03:42:02' name='somevm' ip='192.168.180.10' /> </dhcp> </ip> </network> But due to the wrong if-statement the argument --dhcp-hostsfile doesn't get added to the dnsmasq command. The patch below fixes it for me.
-
由 Jiri Denemark 提交于
The warning is bogus since strtok_r doesn't use the value when it's first called and initializes it for the following calls.
-
由 Laine Stump 提交于
When dynamic_ownership=0, saved images must be owned by the same uid as is used to run the qemu process, otherwise restore won't work. To accomplish this, qemuSecurityDACRestoreSavedStateLabel() needs to simply return when it's called. This fix is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=661720
-
由 Laine Stump 提交于
Although the upper-layer code protected against it, it was possible to call iptablesForwardMasquerade() with an IPv6 address and have it attempt to add a rule to the MASQUERADE chain of ip6tables (which doesn't exist). This patch changes that function to check the protocol of the given address, generate an error log if it's not IPv4 (AF_INET), and finally hardcodes all the family parameters sent down to lower-level functions.
-
由 Laine Stump 提交于
This is partially in response to https://bugzilla.redhat.com/show_bug.cgi?id=653300 The crash in that report was coincidentally fixed when we switched from using inet_pton() to using virSocketParseAddr(), but the absence of an ip address in a dhcp static host definition was still silently ignored (and that entry discarded from the saved XML). This patch turns that into a logged failure; likewise if the entry has neither a mac address nor a name attribute (the entry is useless without at least one of those, plus an ip address). Since the network name is now pulled into this function in order for those error logs to be more informative, the other error messages in the function have also been changed to take advantage.
-
- 05 1月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
While doing some testing with Qemu and creating huge logfiles I encountered the case where the VM could not start anymore due to the lseek() to the end of the Qemu VM's log file failing. The patch below fixes the problem by replacing the previously used 'int' with 'off_t'. To reproduce this error, you could do the following: dd if=/dev/zero of=/var/log/libvirt/qemu/<name of VM>.log bs=1024 count=$((1024*2048)) and you should get an error like this: error: Failed to start domain <name of VM> error: Unable to seek to -2147482651 in /var/log/libvirt/qemu/<name of VM>.log: Success
-
- 04 1月, 2011 3 次提交
-
-
由 Eric Blake 提交于
Detected on cygwin: util/util.c: In function 'virSetUIDGID': util/util.c:2824: warning: format '%d' expects type 'int', but argument 7 has type 'gid_t' [-Wformat] (and three other lines) * src/util/util.c (virSetUIDGID): Cast, as is done elsewhere in this file, to avoid printf type mismatch warnings.
-
由 Hu Tao 提交于
Don't require non-null jobdata to virThreadPoolSendJob().
-
由 Chris Wright 提交于
The udev driver does not update a PCI device with its SR-IOV capabilities, when applicable, the way the hal driver does. As a result, dumping the device's XML will not include the relevant physical or virtual function information. With this patch, the XML is correct: # virsh nodedev-dumpxml pci_0000_09_00_0 <device> <name>pci_0000_09_00_0</name> <parent>pci_0000_00_1c_0</parent> <driver> <name>vxge</name> </driver> <capability type='pci'> <domain>0</domain> <bus>9</bus> <slot>0</slot> <function>0</function> <product id='0x5833'>X3100 Series 10 Gigabit Ethernet PCIe</product> <vendor id='0x17d5'>Neterion Inc.</vendor> <capability type='virt_functions'> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x1'/> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x2'/> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x3'/> </capability> </capability> </device> # virsh nodedev-dumpxml pci_0000_0a_00_1 <device> <name>pci_0000_0a_00_1</name> <parent>pci_0000_00_1c_0</parent> <driver> <name>vxge</name> </driver> <capability type='pci'> <domain>0</domain> <bus>10</bus> <slot>0</slot> <function>1</function> <product id='0x5833'>X3100 Series 10 Gigabit Ethernet PCIe</product> <vendor id='0x17d5'>Neterion Inc.</vendor> <capability type='phys_function'> <address domain='0x0000' bus='0x09' slot='0x00' function='0x0'/> </capability> </capability> </device> Cc: Dave Allan <dallan@redhat.com> Signed-off-by: NChris Wright <chrisw@redhat.com>
-
- 01 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
As pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=659855#c9, commit c3568ec2 introduced a regression where we no longer close any fd's beyond FD_SETSIZE. * src/util/util.c (__virExec): Continue to close fd's beyond keepfd range. Reported by Stefan Praszalowicz.
-
由 Laine Stump 提交于
The original version of these functions would modify the address sent in, meaning that the caller would usually need to copy the address first. This change makes the original a const, and puts the resulting masked address into a new arg (which could point to the same virSocketAddr as the original, if the caller really wants to modify it). This also makes the API consistent with virSocketAddrBroadcast[ByPrefix].
-