- 29 6月, 2010 6 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=608092 * src/util/util.c (virFileResolveLink): Use canonicalize_file_name, rather than areadlink.
-
由 Eric Blake 提交于
Fix regression introduced in commit a4a28724 - basically, the phyp storage driver should only accept the same URIs that the main phyp driver is willing to accept. Blindly accepting all URIs meant that the phyp storage driver was being consulted for 'virsh -c qemu:///session pool-list --all', rather than the qemu storage driver, then since the URI was not for phyp, attempts to then use the phyp driver crashed because it was not initialized. * src/phyp/phyp_driver.c (phypStorageOpen): Only accept connections already open to a phyp driver.
-
由 Laine Stump 提交于
This code was just recently added (by me) and didn't account for the fact that stdin_path is sometimes NULL. If it's NULL, and SetSecurityAllLabel fails, a segfault would result.
-
由 Ryota Ozaki 提交于
Because tty path is unexpectedly not saved in the live configuration file of a domain, libvirtd cannot get the console of the domain back after restarting. The reason why the tty path isn't saved is that, to save the tty path, the save function, virDomainSaveConfig, requires that the target domain is running (pid != -1), however, lxc driver calls the function before starting the domain to pass the configuration to controller. To ensure to save the tty path, the patch lets lxc driver call the save function again after starting the domain.
-
由 Ryota Ozaki 提交于
The function is expected to return negative value on failure, however, it returns positive value when either setInterfaceName or vethInterfaceUpOrDown fails. Because the function returns the return value of either as is, however, the two functions may return positive value on failure. The patch fixes the defects and add error messages.
-
由 Ryota Ozaki 提交于
The message is actually not of error but of debugging. 02:22:56.091: error : lxcControllerMain:316 : monitor=3 client=4 appPty=19 contPty=7
-
- 28 6月, 2010 4 次提交
-
-
由 Laine Stump 提交于
When the saved domain image is on an NFS share, at least some part of domainSetSecurityAllLabel will fail (for example, selinux labels can't be modified). To allow domain restore to still work in this case, just ignore the errors.
-
由 Laine Stump 提交于
Previously, this function had it's own bit of code performing the same function. Since there's now an equivalent utility function, let's use it.
-
由 Laine Stump 提交于
virStorageFileIsSharedFS would previously only work if the entire path in question was stat'able by the uid of the libvirtd process. This patch changes it to crawl backwards up the path retrying the statfs call until it gets to a partial path that *can* be stat'ed. This is necessary to use the function to learn the fstype for files stored as a different user (and readable only by that user) on a root-squashed remote filesystem.
-
由 Laine Stump 提交于
Also restore the label to its original value after qemu is finished with the file. Prior to this patch, qemu domain restore did not function properly if selinux was set to enforce.
-
- 25 6月, 2010 11 次提交
-
-
由 Daniel P. Berrange 提交于
If an active migration operation fails, or is cancelled by the admin, the QEMU on the destination is shutdown and the one on the source continues running. It is important in shutting down the QEMU on the destination, the security drivers don't reset the file labelling/permissions. * src/qemu/qemu_driver.c: Don't reset labelling/permissions on migration abort
-
由 Eric Blake 提交于
Minor speedups by using the full power of sed. * src/phyp/phyp_driver.c (phypGetVIOSFreeSCSIAdapter) (phypDiskType, phypListDefinedDomains): Use fewer processes, by folding other work into sed. (phypGetVIOSPartitionID): Likewise. Also avoid non-portable use of 'sed -s'.
-
由 Eduardo Otubo 提交于
Add the storage management driver to the Power Hypervisor driver. This is a big but simple patch, it's just a new set of functions. This patch includes: * Storage driver: The set of pool-* and vol-* functions. * attach-disk function. * Support for IVM on the new functions. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eduardo Otubo 提交于
* src/phyp/phyp_driver.c (phypStorageDriver): New driver. (phypStorageOpen, phypStorageClose): New functions. (phypRegister): Register it. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Several phyp functions are not namespace clean, and had no reason to be exported since no one outside the phyp driver needed to use them. Rather than do lots of forward declarations, I was able to topologically sort the file. So, this patch looks huge, but is really just a matter of marking things static and dealing with the compiler fallout. * src/phyp/phyp_driver.h (PHYP_DRIVER_H): Add include guard. (phypCheckSPFreeSapce): Delete unused declaration. (phypGetSystemType, phypGetVIOSPartitionID, phypCapsInit) (phypBuildLpar, phypUUIDTable_WriteFile, phypUUIDTable_ReadFile) (phypUUIDTable_AddLpar, phypUUIDTable_RemLpar, phypUUIDTable_Pull) (phypUUIDTable_Push, phypUUIDTable_Init, phypUUIDTable_Free) (escape_specialcharacters, waitsocket, phypGetLparUUID) (phypGetLparMem, phypGetLparCPU, phypGetLparCPUGeneric) (phypGetRemoteSlot, phypGetBackingDevice, phypDiskType) (openSSHSession): Move declarations to phyp_driver.c and make static. * src/phyp/phyp_driver.c: Rearrange file contents to provide topological sorting of newly-static funtions (no semantic changes other than reduced scope). (phypGetBackingDevice, phypDiskType): Mark unused, for now.
-
由 Daniel P. Berrange 提交于
The patches for shared storage migration were not correctly written for json mode. Thus the 'blk' and 'inc' parameters were never being set. In addition they didn't set the QEMU_MONITOR_MIGRATE_BACKGROUND so migration was synchronous. Due to multiple bugs in QEMU's JSON impl this wasn't noticed because it treated the sync migration requst as asynchronous anyway. Finally 'background' parameter was converted to take arbitrary flags but not renamed, and not all uses were changed to unsigned int. * src/qemu/qemu_driver.c: Set QEMU_MONITOR_MIGRATE_BACKGROUND in doNativeMigrate * src/qemu/qemu_monitor_json.c: Process QEMU_MONITOR_MIGRATE_NON_SHARED_DISK and QEMU_MONITOR_MIGRATE_NON_SHARED_INC flags * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: change 'int background' to 'unsigned int flags' in migration APIs. Add logging of flags parameter
-
由 Daniel P. Berrange 提交于
During incoming migration the QEMU monitor is not able to be used. The incoming migration code did not keep hold of the job lock because migration is split across multiple API calls. This meant that further monitor commands on the guest would hang until migration finished with no timeout. In this change the qemuDomainMigratePrepare method sets the job flag just before it returns. The qemuDomainMigrateFinish method checks for this job flag & clears it once done. This prevents any use of the monitor between prepare+finish steps. The qemuDomainGetJobInfo method is also updated to refresh the job elapsed time. This means that virsh domjobinfo can return time data during incoming migration * src/qemu/qemu_driver.c: Keep a job active during incoming migration. Refresh job elapsed time when returning job info
-
由 Daniel P. Berrange 提交于
When configuring serial, parallel, console or channel devices with a file, dev or pipe backend type, it is necessary to label the file path in the security drivers. For char devices of type file, it is neccessary to pre-create (touch) the file if it does not already exist since QEMU won't be allowed todo so itself. dev/pipe configs already require the admin to pre-create before starting the guest. * src/qemu/qemu_security_dac.c: set file ownership for character devices * src/security/security_selinux.c: Set file labeling for character devices * src/qemu/qemu_driver.c: Add character devices to cgroup ACL
-
由 Daniel P. Berrange 提交于
The parallel, serial, console and channel devices are all just character devices. A lot of code needs todo the same thing to all these devices. This provides an convenient API for iterating over all of them. * src/conf/domain_conf.c, src/conf/domain_conf.c, src/libvirt_private.syms: Add virDomainChrDefForeach
-
由 Laine Stump 提交于
We previously assumed that if the -device option existed in qemu, that -nodefconfig would also exist. It turns out that isn't the case, as demonstrated by qemu-kvm-0.12.3 in Fedora 13. */src/qemu/qemu_conf.[hc] - add a new QEMUD_CMD_FLAG, set it via the help output, and check it before adding -nodefconfig to the qemu commandline.
-
由 Eduardo Otubo 提交于
This is just the indentation, style and cleanup patch.
-
- 24 6月, 2010 7 次提交
-
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Also don't abuse the disk driver name to specify the SCSI controller model anymore: <driver name='buslogic'/> Use the newly added model attribute of the controller element for this: <controller type='scsi' index='0' model='buslogic'/> The disk driver name approach is deprecated now, but still works for backward compatibility reasons. Update the documentation and tests accordingly. Fix usage of the words controller and id in the VMX handling code. Use controller, bus and unit properly.
-
由 Matthias Bolte 提交于
This is a step towards controller support for the ESX driver.
-
由 Matthias Bolte 提交于
The domain XML parsing code autogenerates disk address and controller elements when they are not explicitly specified. The code assumes a narrow SCSI bus (7 units per bus). ESX uses a wide SCSI bus (16 units per bus). This is a step towards controller support for the ESX driver.
-
由 Matthias Bolte 提交于
Move libnl to libvirt_util.la, because macvtap.c requires it. Add GnuTLS to libvirt_driver.la, because libvirt.c calls gcrypt functions. When built without loadable driver modules, then the remote driver pulls in GnuTLS. Move libgnu.la from libvirt_parthelper_CFLAGS to libvirt_parthelper_LDADD.
-
由 Ryota Ozaki 提交于
Through conversation with Kumar L Srikanth-B22348, I found that the function of getting memory usage (e.g., virsh dominfo) doesn't work for lxc with ns subsystem of cgroup enabled. This is because of features of ns and memory subsystems. Ns creates child cgroup on every process fork and as a result processes in a container are not assigned in a cgroup for domain (e.g., libvirt/lxc/test1/). For example, libvirt_lxc and init (or somewhat specified in XML) are assigned into libvirt/lxc/test1/8839/ and libvirt/lxc/test1/8839/8849/, respectively. On the other hand, memory subsystem accounts memory usage within a group of processes by default, i.e., it does not take any child (and descendant) groups into account. With the two features, virsh dominfo which just checks memory usage of a cgroup for domain always returns zero because the cgroup has no process. Setting memory.use_hierarchy of a group allows to account (and limit) memory usage of every descendant groups of the group. By setting it of a cgroup for domain, we can get proper memory usage of lxc with ns subsystem enabled. (To be exact, the setting is required only when memory and ns subsystems are enabled at the same time, e.g., mount -t cgroup none /cgroup.)
-
由 Ryota Ozaki 提交于
As same as normal directories, a cgroup cannot be removed if it contains sub groups. This patch changes virCgroupRemove to remove all descendant groups (subdirectories) of a target group before removing the target group. The handling is required when we run lxc with ns subsystem of cgroup. Ns subsystem automatically creates child cgroups on every process forks, but unfortunately the groups are not removed on process exits, so we have to remove them by ourselves. With this patch, such child (and descendant) groups are surely removed at lxc shutdown, i.e., lxcVmCleanup which calls virCgroupRemove.
-
- 23 6月, 2010 6 次提交
-
-
由 Alan Pevec 提交于
add iptables rules to allow TFTP from the virtual network if <tftp> element is defined in the network definition. Fedora bz#580215 * src/network/bridge_driver.c: open UDP port 69 for TFTP traffic if tftproot is defined
-
由 Alan Pevec 提交于
-
由 Daniel P. Berrange 提交于
We already use the '-nodefaults' command line arg with QEMU to stop it adding any default devices to guests. Unfortunately, QEMU will load global config files from /etc/qemu that may also add default devices. These aren't blocked by '-nodefaults', so we need to also add the '-nodefconfig' arg to prevent that. Unfortunately these global config files are also used to define custom CPU models. So in blocking global hardware device addition we also block definitions of new CPU models. Libvirt doesn't know about these custom CPU models though, so it would never make use of them anyway. Thus blocking them via -nodefconfig isn't a show stopping problem. We would need to expand libvirt's own CPU model XML database to support these instead. * src/qemu/qemu_conf.c: Add '-nodefconfig' if available * tests/qemuxml2argvdata/: Add '-nodefconfig' to all data files which have '-nodefaults' present
-
由 Daniel P. Berrange 提交于
The current code pattern requires that callers of qemuMonitorClose check for the return value == 0, and if so, set priv->mon = NULL and release the reference held on the associated virDomainObjPtr The change d84bb6d6 violated that requirement, meaning that priv->mon never gets set to NULL, and a reference count is leaked on virDomainObjPtr. This design was a bad one, so remove the need to check the return valueof qemuMonitorClose(). Instead allow registration of a callback that's invoked just when the last reference on qemuMonitorPtr is released. Finally there was a potential reference leak in qemuConnectMonitor in the failure path. * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a destroy callback invoked from qemuMonitorFree * src/qemu/qemu_driver.c: Use the destroy callback to release the reference on virDomainObjPtr when the monitor is freed. Fix other potential reference count leak in connecting to monitor
-
由 Daniel P. Berrange 提交于
Before issuing monitor commands it is neccessary to check whether the guest is still running. Most places use virDomainIsActive() correctly, but a few relied on 'priv->mon != NULL'. In theory these should be equivalent, but the release of the last reference count on priv->mon can be delayed a small amount of time until the event handler is finally deregistered. A further ref counting bug also means that priv->mon might be never released. In such a case, code could mistakenly issue a monitor command and wait for a response that will never arrive, effectively leaving the QEMU driver waiting on virCondWait() forever.. To protect against these possibilities, make sure all code uses virDomainIsActive(), not 'priv->mon != NULL' * src/qemu/qemu_driver.c: Replace 'priv->mon != NULL' with calls to 'priv->mon != NULL'()
-
由 Daniel P. Berrange 提交于
If there is no driver for a URI we report "no hypervisor driver available" This is bad because not all virt drivers are hypervisors (ie container based virt). If there is no driver support for an API we report "this function is not supported by the hypervisor" This is bad for the same reason, and additionally because it is also used for the network, interface & storage drivers. * src/util/virterror.c: Improve error messages
-
- 22 6月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Following Daniel Berrange's multiple helpful suggestions for improving this patch and introducing another driver interface, I now wrote the below patch where the nwfilter driver registers the functions to instantiate and teardown the nwfilters with a function in conf/domain_nwfilter.c called virDomainConfNWFilterRegister. Previous helper functions that were called from qemu_driver.c and qemu_conf.c were move into conf/domain_nwfilter.h with slight renaming done for consistency. Those functions now call the function expored by domain_nwfilter.c, which in turn call the functions of the new driver interface, if available.
-
- 21 6月, 2010 4 次提交
-
-
由 Jiri Denemark 提交于
- Fix documentation for virGetStorageVol: it has 'key' argument instead of 'uuid'. - Remove TODO comment from virReleaseStorageVol: we use volume key as an identifier instead of UUID. - Print human-readable UUID string in debug message in virReleaseSecret.
-
由 Jiri Denemark 提交于
As anywhere else, uuid is defined as a fixed size array inside _virSecret structure; we shouldn't try to free it.
-
由 Jiri Denemark 提交于
The first thing we do in all these functions is to check uuid != NULL and fail if it isn't.
-
由 Jiri Denemark 提交于
Per-connection hashes for domains, networks, storage pools and network filter pools were indexed by names which was not the best choice. UUIDs are better identifiers, so lets use them.
-
- 18 6月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
-