- 21 9月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
The commit that prevents disk corruption on domain shutdown (96fc4784) causes regression with QEMU 0.14.* and 0.15.* because of a regression bug in QEMU that was fixed only recently in QEMU git. The affected versions of QEMU do not quit on SIGTERM if started with -no-shutdown, which we use to implement fake reboot. Since -no-shutdown tells QEMU not to quit automatically on guest shutdown, domains started using the affected QEMU cannot be shutdown properly and stay in a paused state. This patch disables fake reboot feature on such QEMU by not using -no-shutdown, which makes shutdown work as expected. However, virDomainReboot will not work in this case and it will report "Requested operation is not valid: Reboot is not supported with this QEMU binary".
-
- 05 9月, 2011 2 次提交
-
-
由 Eric Blake 提交于
As discussed here: https://www.redhat.com/archives/libvir-list/2011-August/msg00361.html https://www.redhat.com/archives/libvir-list/2011-August/msg00552.html Adds snapshot attribute and transient sub-element: <devices> <disk type=... snapshot='no|internal|external'> ... <transient/> </disk> </devices> * docs/schemas/domaincommon.rng (snapshot): New define. (disk): Add snapshot and persistent attributes. * docs/formatdomain.html.in: Document them. * src/conf/domain_conf.h (virDomainDiskSnapshot): New enum. (_virDomainDiskDef): New fields. * tests/qemuxml2argvdata/qemuxml2argv-disk-transient.xml: New test of rng, no args counterpart until qemu support is complete. * tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.args: New file, snapshot attribute does not affect args. * tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml: Likewise. * tests/qemuxml2argvtest.c (mymain): Run new test.
-
由 Marc-André Lureau 提交于
-
- 02 9月, 2011 10 次提交
-
-
由 Marc-André Lureau 提交于
-
由 Marc-André Lureau 提交于
- create a new "redirdev" element for this purpose
-
由 Marc-André Lureau 提交于
QEMU uses USB bus name "usb.0" when using the legacy -usb argument. If we want to allow USB devices to specify their addresses with legacy -usb, we should either in case of legacy bus name drop the 0 from the address bus, or just drop the 0 from device id. This patch does the later. Another solution would be to permit addressing on non-legacy USB controllers only.
-
由 Marc-André Lureau 提交于
So that devices can be attached to hubs. Example, to attach to first port of a usb-hub on port 1. <hub type='usb'> <address type='usb' bus='0' port='1'/> </hub> <input type='mouse' type='usb'> <address type='usb' bus='0' port='1.1'/> </hub> also add a test entry
-
由 Marc-André Lureau 提交于
domain parsing and serialization code, qemu driver backend and a couple of test
-
由 Marc-André Lureau 提交于
Companion controllers take an extra 'master' attribute to associate them. Also add tests for this
-
由 Marc-André Lureau 提交于
Expand the domain and the QEmu driver code Adds a couple of tests
-
由 Marc-André Lureau 提交于
add a few tests for the new constructs
-
由 Marc-André Lureau 提交于
The model by default is piix3-uchi. Example: <controller type='usb' index='0' model='ich9-ehci'/>
-
由 Osier Yang 提交于
Newer QEMU introduced cache=directsync for -drive, this patchset is to expose it in libvirt layer. * Introduced a new QEMU capability flag ($prefix_CACHE_DIRECTSYNC), As even $prefix_CACHE_V2 is set, we can't known if directsync is supported.
-
- 15 8月, 2011 1 次提交
-
-
由 Laine Stump 提交于
In some versions of qemu, both virtio-blk-pci and virtio-net-pci devices can have an event_idx setting that determines some details of event processing. When it is enabled, it "reduces the number of interrupts and exits for the guest". qemu will automatically enable this feature when it is available, but there may be cases where this new feature could actually make performance worse (NB: no such case has been found so far). As a safety switch in case such a situation is encountered in the field, this patch adds a new attribute "event_idx" to the <driver> element of both disk and interface devices. event_idx can be set to "on" (to force event_idx on in case qemu has it disabled by default) or "off" (for force event_idx off). In the case that event_idx support isn't present in qemu, the attribute is ignored (this on the advice of the qemu developer). docs/formatdomain.html.in: document the new flag (marking it as "don't mess with this!" docs/schemas/domain.rng: add event_idx in appropriate places src/conf/domain_conf.[ch]: add event_idx to parser and formatter src/libvirt_private.syms: export virDomainVirtioEventIdx(From|To)String src/qemu/qemu_capabilities.[ch]: detect and report event_idx in disk/net src/qemu/qemu_command.c: add event_idx parameter to qemu commandline when appropriate. tests/qemuxml2argvdata/qemuxml2argv-event_idx.args, tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml, tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: test cases for event_idx.
-
- 12 7月, 2011 1 次提交
-
-
由 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 1 次提交
-
-
由 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.
-
- 09 7月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 24 6月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
For controlled shutdown we issue a 'system_powerdown' command to the QEMU monitor. This triggers an ACPI event which (most) guest OS wire up to a controlled shutdown. There is no equiv ACPI event to trigger a controlled reboot. This patch attempts to fake a reboot. - In qemuDomainObjPrivatePtr we have a bool fakeReboot flag. - The virDomainReboot method sets this flag and then triggers a normal 'system_powerdown'. - The QEMU process is started with '-no-shutdown' so that the guest CPUs pause when it powers off the guest - When we receive the 'POWEROFF' event from QEMU JSON monitor if fakeReboot is not set we invoke the qemuProcessKill command and shutdown continues normally - If fakeReboot was set, we spawn a background thread which issues 'system_reset' to perform a warm reboot of the guest hardware. Then it issues 'cont' to start the CPUs again * src/qemu/qemu_command.c: Add -no-shutdown flag if we have JSON support * src/qemu/qemu_domain.h: Add 'fakeReboot' flag to qemuDomainObjPrivate struct * src/qemu/qemu_driver.c: Fake reboot using the system_powerdown command if JSON support is available * 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 binding for system_reset command * src/qemu/qemu_process.c: Reset the guest & start CPUs if fakeReboot is set
-
- 22 6月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
For virtio disks and interfaces, qemu allows users to enable or disable ioeventfd feature. This means, qemu can execute domain code, while another thread waits for I/O event. Basically, in some cases it is win, in some loss. This feature is available via 'ioeventfd' attribute in disk and interface <driver> element. It accepts 'on' and 'off'. Leaving this attribute out defaults to hypervisor decision.
-
- 20 6月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Only add tests for qemuxmlargvtest.c, as there is no qemu command line for numatune XML, just want to make sure the XML could be validated well.
-
- 15 6月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Prefer bootindex=N option for -device over the old way -boot ORDER possibly accompanied with boot=on option for -drive. This gives us full control over which device will actually be used for booting guest OS. Moreover, if qemu doesn't support boot=on, this is the only way to boot of certain disks in some configurations (such as virtio disks when used together IDE disks) without transforming domain XML to use per device boot elements.
-
- 13 6月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
-
- 02 6月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 31 5月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
and check regression
-
- 01 5月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Make virtTestLoadFile allocate the buffer to read the file into. Fix logic error in virtTestLoadFile, stop reading on the first empty line. Use virFileReadLimFD in virtTestCaptureProgramOutput to avoid manual buffer handling.
-
- 30 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
A few of the tests were missing basic sanity checks, while most of them were doing copy-and-paste initialization (in fact, some of them pasted the argc > 1 check more than once!). It's much nicer to do things in one common place, and minimizes the size of the next patch that fixes getcwd usage. * tests/testutils.h (EXIT_AM_HARDFAIL): New define. (progname, abs_srcdir): Define for all tests. (VIRT_TEST_MAIN): Change callback signature. * tests/testutils.c (virtTestMain): Do more common init. * tests/commandtest.c (mymain): Simplify. * tests/cputest.c (mymain): Likewise. * tests/esxutilstest.c (mymain): Likewise. * tests/eventtest.c (mymain): Likewise. * tests/hashtest.c (mymain): Likewise. * tests/networkxml2xmltest.c (mymain): Likewise. * tests/nodedevxml2xmltest.c (myname): Likewise. * tests/nodeinfotest.c (mymain): Likewise. * tests/nwfilterxml2xmltest.c (mymain): Likewise. * tests/qemuargv2xmltest.c (mymain): Likewise. * tests/qemuhelptest.c (mymain): Likewise. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2xmltest.c (mymain): Likewise. * tests/qparamtest.c (mymain): Likewise. * tests/sexpr2xmltest.c (mymain): Likewise. * tests/sockettest.c (mymain): Likewise. * tests/statstest.c (mymain): Likewise. * tests/storagepoolxml2xmltest.c (mymain): Likewise. * tests/storagevolxml2xmltest.c (mymain): Likewise. * tests/virbuftest.c (mymain): Likewise. * tests/virshtest.c (mymain): Likewise. * tests/vmx2xmltest.c (mymain): Likewise. * tests/xencapstest.c (mymain): Likewise. * tests/xmconfigtest.c (mymain): Likewise. * tests/xml2sexprtest.c (mymain): Likewise. * tests/xml2vmxtest.c (mymain): Likewise.
-
- 29 3月, 2011 2 次提交
-
-
由 Osier Yang 提交于
v1 - v2: * Add missed tests/qemuxml2argvdata/qemuxml2argv-cputune.args
-
由 Eric Blake 提交于
Latent bug introduced in commit 2d6a5819 (Aug 2009), but not exposed until commit 1859939a (Jan 2011). Basically, when virExec creates a pipe, it always marks libvirt's side as cloexec. If libvirt then wants to hand that pipe to another child process, things work great if the fd is dup2()'d onto stdin or stdout (as with stdin: or exec: migration), but if the pipe is instead used as-is (such as with fd: migration) then qemu sees EBADF because the fd was closed at exec(). This is a minimal fix for the problem at hand; it is slightly racy, but no more racy than the rest of libvirt fd handling, including the case of uncompressed save images. A more invasive fix, but ultimately safer at avoiding leaking unintended fds, would be to _always and atomically_ open all fds as cloexec in libvirt (thanks to primitives like open(O_CLOEXEC), pipe2(), accept4(), ...), then teach virExec to clear that bit for all fds explicitly marked to be handed to the child only after forking. * src/qemu/qemu_command.c (qemuBuildCommandLine): Clear cloexec flag. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Tweak test.
-
- 06 3月, 2011 1 次提交
-
-
由 Osier Yang 提交于
For qemu names the primary vga as "qxl-vga": 1) if vram is specified for 2nd qxl device: -vga qxl -global qxl-vga.vram_size=$SIZE \ -device qxl,id=video1,vram_size=$SIZE,... 2) if vram is not specified for 2nd qxl device, (use the default set by global): -vga qxl -global qxl-vga.vram_size=$SIZE \ -device qxl,id=video1,... For qemu names all qxl devices as "qxl": 1) if vram is specified for 2nd qxl device: -vga qxl -global qxl.vram_size=$SIZE \ -device qxl,id=video1,vram_size=$SIZE ... 2) if vram is not specified for 2nd qxl device: -vga qxl -global qxl-vga.vram_size=$SIZE \ -device qxl,id=video1,... "-global" is the only way to define vram_size for the primary qxl device, regardless of how qemu names it, (It's not good a good way, as original idea of "-global" is to set a global default for a driver property, but to specify vram for first qxl device, we have to use it). For other qxl devices, as they are represented by "-device", could specify it directly and seperately for each, and it overrides the default set by "-global" if specified. v1 - v2: * modify "virDomainVideoDefaultRAM" so that it returns 16M as the default vram_size for qxl device. * vram_size * 1024 (qemu accepts bytes for vram_size). * apply default vram_size for qxl device for which vram_size is not specified. * modify "graphics-spice" tests (more sensiable vram_size) * Add an argument of virDomainDefPtr type for qemuBuildVideoDevStr, to use virDomainVideoDefaultRAM in qemuBuildVideoDevStr). v2 - v3: * Modify default video memory size for qxl device from 16M to 24M * Update codes to be consistent with changes on qemu_capabilities.*
-
- 24 2月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the <stdbool.h> header from all source files / headers and just put it into internal.h * src/internal.h: Add <stdbool.h>
-
由 Jiri Denemark 提交于
This is done for two reasons: - we are getting very close to 64 flags which is the maximum we can use with unsigned long long - by using LL constants in enum we already violates C99 constraint that enum values have to fit into int
-
由 Jiri Denemark 提交于
Three new functions (qemuCapsSet, qemuCapsClear, and qemuCapsGet) were introduced replacing direct bit operations.
-
由 Jiri Denemark 提交于
The new names comply more with the fact that they are all members of enum qemuCapsFlags.
-
- 18 2月, 2011 1 次提交
-
-
由 Laine Stump 提交于
This is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=629662 Explanation qemu's virtio-net-pci driver allows setting the algorithm used for tx packets to either "bh" or "timer". This is done by adding ",tx=bh" or ",tx=timer" to the "-device virtio-net-pci" commandline option. 'bh' stands for 'bottom half'; when this is set, packet tx is all done in an iothread in the bottom half of the driver. (In libvirt, this option is called the more descriptive "iothread".) 'timer' means that tx work is done in qemu, and if there is more tx data than can be sent at the present time, a timer is set before qemu moves on to do other things; when the timer fires, another attempt is made to send more data. (libvirt retains the name "timer" for this option.) The resulting difference, according to the qemu developer who added the option is: bh makes tx more asynchronous and reduces latency, but potentially causes more processor bandwidth contention since the cpu doing the tx isn't necessarily the cpu where the guest generated the packets. Solution This patch provides a libvirt domain xml knob to change the option on the qemu commandline, by adding a new attribute "txmode" to the <driver> element that can be placed inside any <interface> element in a domain definition. It's use would be something like this: <interface ...> ... <model type='virtio'/> <driver txmode='iothread'/> ... </interface> I chose to put this setting as an attribute to <driver> rather than as a sub-element to <tune> because it is specific to the virtio-net driver, not something that is generally usable by all network drivers. (note that this is the same placement as the "driver name=..." attribute used to choose kernel vs. userland backend for the virtio-net driver.) Actually adding the tx=xxx option to the qemu commandline is only done if the version of qemu being used advertises it in the output of qemu -device virtio-net-pci,? If a particular txmode is requested in the XML, and the option isn't listed in that help output, an UNSUPPORTED_CONFIG error is logged, and the domain fails to start.
-
- 11 2月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
QEMUD_CMD_FLAG_PCI_MULTIBUS should be set in the function qemuCapsExtractVersionInfo() The flag QEMUD_CMD_FLAG_PCI_MULTIBUS is used in the function qemuBuildDeviceAddressStr(). All callers get qemuCmdFlags by the function qemuCapsExtractVersionInfo() except that testCompareXMLToArgvFiles() in qemuxml2argvtest.c. So we should set QEMUD_CMD_FLAG_PCI_MULTIBUS in the function qemuCapsExtractVersionInfo() instead of qemuBuildCommandLine() because the function qemuBuildCommandLine() does not be called when we attach a pci device. tests: set QEMUD_CMD_FLAG_PCI_MULTIBUS in testCompareXMLToArgvFiles() set QEMUD_CMD_FLAG_PCI_MULTIBUS before calling qemuBuildCommandLine() as the flags is not set by qemuCapsExtractVersionInfo(). Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
- 09 2月, 2011 1 次提交
-
-
由 Gui Jianfeng 提交于
Implement blkio tunable XML configuration and parsing. Reviewed-by: N"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
- 05 2月, 2011 2 次提交
-
-
由 Eric Blake 提交于
qemu 0.13.0 (at least as built for Fedora 14, and also backported to RHEL 6.0 qemu) supported an older syntax for a spicevmc channel; it's not as flexible (it has an implicit name and hides the chardev aspect), but now that we support spicevmc, we might as well target both variants. * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_DEVICE_SPICEVMC): New flag. * src/qemu/qemu_capabilities.c (qemuCapsParseDeviceStr): Set it correctly. * src/qemu/qemu_command.h (qemuBuildVirtioSerialPortDevStr): Drop declaration. * src/qemu/qemu_command.c (qemuBuildVirtioSerialPortDevStr): Alter signature, check flag. (qemuBuildCommandLine): Adjust caller and check flag. * tests/qemuhelptest.c (mymain): Update test. * tests/qemuxml2argvtest.c (mymain): New test. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.args: Likewise.
-
由 Eric Blake 提交于
Adds <smartcard mode='passthrough' type='spicevmc'/>, which uses the new <channel name='smartcard'/> of <graphics type='spice'>. * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New enum value. (virDomainChrSpicevmcName): New enum. (virDomainChrSourceDef): Distinguish spicevmc types. * src/conf/domain_conf.c (virDomainGraphicsSpiceChannelName): Add smartcard. (virDomainSmartcardDefParseXML): Parse it. (virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set spicevmc name. (virDomainChrSpicevmc): New enum conversion functions. * src/libvirt_private.syms: Export new functions. * src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize name. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml: Likewise.
-
- 04 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757 Add a new character device backend for virtio serial channels that activates the QEMU spice agent on the main channel using the vdagent spicevmc connection. The <target> must be type='virtio', and supports an optional name that specifies how the guest will see the channel (for now, name must be com.redhat.spice.0). <channel type='spicevmc'> <target type='virtio'/> <address type='virtio-serial' controller='1' bus='0' port='3'/> </channel> * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainChrType): New enum value. * src/conf/domain_conf.c (virDomainChr): Add spicevmc. (virDomainChrDefParseXML, virDomainChrSourceDefParseXML) (virDomainChrDefParseTargetXML): Parse and enforce proper use. (virDomainChrSourceDefFormat, virDomainChrDefFormat): Format. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildCommandLine): Add qemu support. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-