- 02 9月, 2011 36 次提交
-
-
由 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 提交于
Applies only to piix3 and check if piix3 controller is on correct address, or report error
-
由 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'/>
-
由 Marc-André Lureau 提交于
List is: piix3-uhci piix4-uhci ehci ich9-ehci1 ich9-uhci1 ich9-uhci2 ich9-uhci3 vt82c686b-uhci pci-ohci
-
由 Marc-André Lureau 提交于
Since we are about to add USB controller support let's remove the ambiguity
-
由 Marc-André Lureau 提交于
-
由 Eric Blake 提交于
Commit 6766ff10 introduced a corner case bug with snapshot creation: if a snapshot is created, but then we hit OOM while trying to create the return value of the function, then we have polluted the internal directory with the snapshot metadata with no way to clean it up from the running libvirtd. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Don't write metadata file on OOM condition.
-
由 Eric Blake 提交于
Created by copying from qemuxml2argv-disk-drive-v2-wb.*, then s/writeback/directsync/. Hopefully this matches Osier's intentions. * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.args: * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml: Add missing files needed by 'make check'.
-
由 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.
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
This patch adds the ability to make the filesystem for a filesystem pool during a pool build. The patch adds two new flags, no overwrite and overwrite, to control when mkfs gets executed. By default, the patch preserves the current behavior, i.e., if no flags are specified, pool build on a filesystem pool only makes the directory on which the filesystem will be mounted. If the no overwrite flag is specified, the target device is checked to determine if a filesystem of the type specified in the pool is present. If a filesystem of that type is already present, mkfs is not executed and the build call returns an error. Otherwise, mkfs is executed and any data present on the device is overwritten. If the overwrite flag is specified, mkfs is always executed, and any existing data on the target device is overwritten unconditionally.
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
There is a goto before "conn" is initialized.
-
由 Eric Blake 提交于
Several users have reported problems with 'virsh start' failing because it was encountering a managed save situation where the managed save file was incomplete. Be more robust to this by using two different magic numbers, so that newer libvirt can gracefully handle an incomplete file differently than a complete one, while older libvirt will at least fail up front rather than trying to load only to have qemu fail at the end. Managed save is a convenience - it exists to preserve as much state as possible; if the state was not preserved, it is reasonable to just log that fact, then proceed with a fresh boot. On the other hand, user saves are under user control, so we must fail, but by making the failure message distinct, the user can better decide how to handle the situation of an incomplete save file. * src/qemu/qemu_driver.c (QEMUD_SAVE_PARTIAL): New define. (qemuDomainSaveInternal): Use it to mark incomplete images. (qemuDomainSaveImageOpen, qemuDomainObjRestore): Add parameter that controls what to do with partial images. (qemuDomainRestoreFlags, qemuDomainSaveImageGetXMLDesc) (qemuDomainSaveImageDefineXML, qemuDomainObjStart): Update callers. Based on an initial idea by Osier Yang.
-
由 Eric Blake 提交于
In a SELinux or root-squashing NFS environment, libvirt has to go through some hoops to create a new file that qemu can then open() by name. Snapshots are a case where we want to guarantee an empty file that qemu can open; also, reopening a save file to convert it from being marked partial to complete requires a reopen to avoid O_DIRECT headaches. Refactor some existing code to make it easier to reuse in later patches. * src/qemu/qemu_migration.h (qemuMigrationToFile): Drop parameter. * src/qemu/qemu_migration.c (qemuMigrationToFile): Let cgroup do the stat, rather than asking caller to do it and pass info down. * src/qemu/qemu_driver.c (qemuOpenFile): New function, pulled from... (qemuDomainSaveInternal): ...here. (doCoreDump, qemuDomainSaveImageOpen): Use it here as well.
-
由 Wen Congyang 提交于
After supporting multi function pci device, we only reserve function 1 on slot 1. The user can use the other function on slot 1 in the xml config file. We should detect this wrong usage.
-
由 Xu He Jie 提交于
When libvirtd is running at non-root user, it won't create ${HOME}/.libvirt. It will show error message: 17:44:16.838: 7035: error : virPidFileAcquirePath:322 : Failed to open pid file Signed-off-by: NXu He Jie <xuhj@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Scott Moser 提交于
Currently, the lxc implementation invokes 'ip' and 'ifconfig' commands inside a container using 'virRun'. That has the side effect of requiring those commands to be present and to function in a manner consistent with the usage. Some small roots (such as ttylinux) may not have 'ip' or 'ifconfig'. This patch replaces the use of these commands with usage of netdevice. The result is that lxc containers do not have to implement those commands, and lxc in libvirt is only dependent on the netdevice interface. I've tested this patch locally against the ubuntu libvirt version enough to verify its generally sane. I attempted to build upstream today, but failed with: /usr/bin/ld: ../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_domain.o): undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30 Thats probably a local issue only, but I wanted to get this patch up and see what others thought of it. This is ubuntu bug https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/828211 .
-
由 Serge Hallyn 提交于
Hi, I'm seeing an issue with udev and libvirt-lxc. Libvirt-lxc creates /dev/ptmx as a symlink to /dev/pts/ptmx. When udev starts up, it checks the device type, sees ptmx is 'not right', and replaces it with a 'proper' ptmx. In lxc, /dev/ptmx is bind-mounted from /dev/pts/ptmx instead of being symlinked, so udev sees the right device type and leaves it alone. A patch like the following seems to work for me. Would there be any objections to this? >From 4c5035de52de7e06a0de9c5d0bab8c87a806cba7 Mon Sep 17 00:00:00 2001 From: Ubuntu <ubuntu@domU-12-31-39-14-F0-B3.compute-1.internal> Date: Wed, 31 Aug 2011 18:15:54 +0000 Subject: [PATCH 1/1] make ptmx a bind mount rather than symlink udev on some systems checks the device type of /dev/ptmx, and replaces it if not as expected. The symlink created by libvirt-lxc therefore gets replaced. By creating it as a bind mount, the device type is correct and udev leaves it alone. Signed-off-by: NSerge Hallyn <serge.hallyn@canonical.com>
-
由 Adam Litke 提交于
The libvirt BlockPull API supports the use of an initial bandwidth limit but the qemu block_stream API does not. To get the desired behavior we use the two APIs strung together: first BlockPull, then BlockJobSetSpeed. We can do this at the driver level to avoid duplicated code in each monitor path. Signed-off-by: NAdam Litke <agl@us.ibm.com>
-
由 Adam Litke 提交于
Due to an unfortunate precedent in qemu, the units for the bandwidth parameter to block_job_set_speed are different between the text monitor and the qmp monitor. While the qmp monitor uses bytes/s, the text monitor expects MB/s. Correct the units for the text interface. Signed-off-by: NAdam Litke <agl@us.ibm.com>
-
由 Jim Fehlig 提交于
On systems with many pcpus, the sexpr returned by xend can be quite large for dom0 when it is configured to have #vcpus = #pcpus (default). E.g. on a 80 pcpu system, where dom0 had 80 vcpus, the sexpr details for dom0 was 73817 bytes! Increase maximum buffer size to 256k.
-
由 Jim Fehlig 提交于
xenDaemonDomainFetch() was overwriting errors reported by xend_get() and xend_req(). E.g. without patch error: failed Xen syscall xenDaemonDomainFetch failed to find this domain with patch error: internal error Xend returned HTTP Content-Length of 73817, which exceeds maximum of 65536
-
由 Jim Fehlig 提交于
I'd like to change my primary email address to jfehlig@suse.com. This patch changes it in AUTHORS and .mailmap.
-
由 Eric Blake 提交于
The 'virsh man' description of send-key was incomplete and used the old style (literal 'optional name' instead of '[name]' metasyntax). Meanwhile, none of the other virsh help texts include examples, so I moved it out of virsh help and into the man page. * tools/virsh.pod (send-key): Give better details. * tools/virsh.c (info_send_key): Drop example from here.
-
由 Eric Blake 提交于
Managed save was added in 0.8.0, virDomainCreateWithFlags in 0.8.2, and FORCE_BOOT in 0.9.5. The virsh flag is more useful if we emulate it for all older servers (note that if a hypervisor fails the query for a managed save image, then it does not have one to be removed, so the flag can be safely ignored). * tools/virsh.c (cmdStart): Add emulation for new flag.
-
由 Alex Jia 提交于
* tools/virsh.c: fix memory leak on cmdVolCreateAs function. * Detected in valgrind run: ==4746== ==4746== 48 (40 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 26 of 52 ==4746== at 0x4A04A28: calloc (vg_replace_malloc.c:467) ==4746== by 0x4C76E51: virAlloc (memory.c:101) ==4746== by 0x4CD9418: virGetStoragePool (datatypes.c:592) ==4746== by 0x4D21367: remoteStoragePoolLookupByName (remote_driver.c:4126) ==4746== by 0x4CE42B0: virStoragePoolLookupByName (libvirt.c:10232) ==4746== by 0x40C276: vshCommandOptPoolBy (virsh.c:13660) ==4746== by 0x40CA37: cmdVolCreateAs (virsh.c:8094) ==4746== by 0x412AF2: vshCommandRun (virsh.c:13770) ==4746== by 0x422F11: main (virsh.c:15127) ==4746== ==4746== 1,011 bytes in 1 blocks are definitely lost in loss record 45 of 52 ==4746== at 0x4A05FDE: malloc (vg_replace_malloc.c:236) ==4746== by 0x4A06167: realloc (vg_replace_malloc.c:525) ==4746== by 0x4C76ECB: virReallocN (memory.c:161) ==4746== by 0x4C60319: virBufferGrow (buf.c:72) ==4746== by 0x4C606AA: virBufferAdd (buf.c:106) ==4746== by 0x40CB37: cmdVolCreateAs (virsh.c:8118) ==4746== by 0x412AF2: vshCommandRun (virsh.c:13770) ==4746== by 0x422F11: main (virsh.c:15127) ==4746== ==4746== LEAK SUMMARY: ==4746== definitely lost: 1,051 bytes in 2 blocks ==4746== indirectly lost: 8 bytes in 1 blocks ==4746== possibly lost: 0 bytes in 0 blocks ==4746== still reachable: 390,767 bytes in 1,373 blocks ==4746== suppressed: 0 bytes in 0 blocks * How to reproduce? % valgrind -v --leak-check=full virsh vol-create-as default foo.img 10M \ --allocation 0 --format qcow2 --backing-vol bar.img Notes: bar.img doesn't exist. Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Eric Blake 提交于
Problem introduced by commit b12354be. * src/remote_protocol-structs: Remove spurious blank line.
-
由 Jim Fehlig 提交于
-
由 Jim Fehlig 提交于
Includes impl of python binding since the generator was not able to cope. Note: Requires gendispatch.pl patch from Matthias Bolte https://www.redhat.com/archives/libvir-list/2011-August/msg01367.html
-
- 01 9月, 2011 4 次提交
-
-
由 Eric Blake 提交于
virsh had some leftover 'int flags', and even an 'int flag' declaration, compared to our preferred style of 'unsigned int flags'. * tools/virsh.c (cmdUndefine, cmdSave, cmdSaveImageDumpxml) (cmdSaveImageEdit, cmdManagedSave, cmdRestore, cmdDump) (cmdVcpuPin, cmdSetvcpus, cmdSetmem, cmdSetmaxmem, cmdDumpXML) (cmdDomXMLFromNative, cmdDomXMLToNative, doMigrate) (cmdInterfaceEdit, cmdInterfaceDumpXML, cmdEdit): Match coding style for flags. (struct vshComdOptDef): Rename field member. (vshCmddefOptParse, vshCmddefHelp): Adjust clients.
-
由 Daniel P. Berrange 提交于
Commit 2c85644b attempted to fix a problem with tracking RPC messages from streams by doing - if (msg->header.type == VIR_NET_REPLY) { + if (msg->header.type == VIR_NET_REPLY || + (msg->header.type == VIR_NET_STREAM && + msg->header.status != VIR_NET_CONTINUE)) { client->nrequests--; In other words any stream packet, with status NET_OK or NET_ERROR would cause nrequests to be decremented. This is great if the packet from from a synchronous virStreamFinish or virStreamAbort API call, but wildly wrong if from a server initiated abort. The latter resulted in 'nrequests' being decremented below zero. This then causes all I/O for that client to be stopped. Instead of trying to infer whether we need to decrement the nrequests field, from the message type/status, introduce an explicit 'bool tracked' field to mark whether the virNetMessagePtr object is subject to tracking. Also add a virNetMessageClear function to allow a message contents to be cleared out, without adversely impacting the 'tracked' field as a naive memset() would do * src/rpc/virnetmessage.c, src/rpc/virnetmessage.h: Add a 'bool tracked' field and virNetMessageClear() API * daemon/remote.c, daemon/stream.c, src/rpc/virnetclientprogram.c, src/rpc/virnetclientstream.c, src/rpc/virnetserverclient.c, src/rpc/virnetserverprogram.c: Switch over to use virNetMessageClear() and pass in the 'bool tracked' value when creating messages.
-
由 Daniel P. Berrange 提交于
When sending outbound stream RPC messages, a callback is used to re-enable stream data transmission. If the stream aborts while one of these messages is outstanding, the stream may have been free'd by the time it is invoked. This results in a use-after-free error * daemon/stream.c: Ref-count streams to avoid use-after-free
-
由 Daniel P. Berrange 提交于
Parted does not report disk size in 512 byte units, but rather the disks' logical sector size, which with modern drives might be 4k. * src/storage/parthelper.c: Remove hardcoded 512 byte sector size
-