- 11 7月, 2014 1 次提交
-
-
由 Chen Hanxiao 提交于
In lxc, we could not use setmem command with --config options. This patch will add support for this. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
- 09 7月, 2014 1 次提交
-
-
由 Chen Hanxiao 提交于
Currently @flag is not used yet. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
- 08 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
In the future we might need to track state of individual images. Move the readonly and shared flags to the virStorageSource struct so that we can keep them in a per-image basis.
-
- 07 7月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
For inactive domains, set both current and maximum memory to the specified 'maximum memory' value. This matches the behavior of QEMU driver's SetMaxMemory. https://bugzilla.redhat.com/show_bug.cgi?id=1091132
-
由 Chen Hanxiao 提交于
We invoked virCgroupHasController twice for checking VIR_CGROUP_CONTROLLER_DEVICES in lxcDomainAttachDeviceDiskLive. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
- 04 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Pass the virStorageSource struct to the auditing function and check if storage is local before auditing.
-
- 03 7月, 2014 4 次提交
-
-
由 Ján Tomko 提交于
They report errors in all other cases.
-
由 Ján Tomko 提交于
It sets the errno on all other errors, do it here too. Also report an error.
-
由 Ján Tomko 提交于
Replace: if (virBufferError(&buf)) { virBufferFreeAndReset(&buf); virReportOOMError(); ... } with: if (virBufferCheckError(&buf) < 0) ... This should not be a functional change (unless some callers misused the virBuffer APIs - a different error would be reported then)
-
由 Ján Tomko 提交于
So far, we only report an error if formatting the siblings bitmap in NUMA topology fails. Be consistent and always report error in virCapabilitiesFormatXML.
-
- 02 7月, 2014 1 次提交
-
-
由 Yue wenyuan 提交于
The comments for lxcDomainCreateXMLWithFiles are out of date. So update them. And add comments for lxcDomainCreateXML Signed-off-by: NWang Rui <moon.wangrui@huawei.com> Signed-off-by: NYue wenyuan <yuewenyuan@huawei.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 25 6月, 2014 1 次提交
-
-
由 Chen Hanxiao 提交于
Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
- 24 6月, 2014 1 次提交
-
-
由 Chen Hanxiao 提交于
Fix lxcDomainGetMemoryParameters and lxcDomainGetSchedulerParametersFlags: virsh -c lxc:/// memtune DOMAIN error: Unable to get number of memory parameters error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters Introduced by commit 399394. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 20 6月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
I'm going to add functions that will deal with individual image files rather than whole disks. Rename the security function to make room for the new one.
-
- 19 6月, 2014 2 次提交
-
-
由 Michal Privoznik 提交于
And add stubs to other drivers like: lxc, qemu, uml and vbox. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
For future work we want to get info for not only the free memory but overall memory size too. That's why the function must have new signature too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 6月, 2014 2 次提交
-
-
由 Eric Blake 提交于
As part of the work on backing chains, I'm finding that it would be easier to directly manipulate chains of pointers (adding a snapshot merely adjusts pointers to form the correct list) rather than copy data from one struct to another. This patch converts domain disk source to be a pointer. In this patch, the pointer is ALWAYS allocated (thanks in part to the previous patch forwarding all disk def allocation through a common point), and all other changse are just mechanical fallout of the new type; there should be no functional change. It is possible that we may want to leave the pointer NULL for a cdrom with no medium in a later patch, but as that requires a closer audit of the source to ensure we don't fault on a null dereference, I didn't do it here. * src/conf/domain_conf.h (_virDomainDiskDef): Change type of src. * src/conf/domain_conf.c: Adjust all clients. * src/security/security_selinux.c: Likewise. * src/qemu/qemu_domain.c: Likewise. * src/qemu/qemu_command.c: Likewise. * src/qemu/qemu_conf.c: Likewise. * src/qemu/qemu_process.c: Likewise. * src/qemu/qemu_migration.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/lxc/lxc_controller.c: Likewise. * tests/securityselinuxlabeltest.c: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Ján Tomko 提交于
It already reports an error if STRDUP fails.
-
- 16 5月, 2014 1 次提交
-
-
由 Eric Blake 提交于
The VIR_ENUM_DECL/VIR_ENUM_IMPL helper macros already append 'Type' to the enum name being converted; it looks silly to have functions with 'TypeType' in their name. Even though some of our enums have to have a 'Type' suffix, the corresponding string conversion functions do not. * src/conf/secret_conf.h (VIR_ENUM_DECL): Rename virSecretUsageType. * src/conf/storage_conf.h (VIR_ENUM_DECL): Rename virStoragePoolAuthType, virStoragePoolSourceAdapterType, virStoragePartedFsType. * src/conf/domain_conf.c (virDomainDiskDefParseXML) (virDomainFSDefParseXML, virDomainFSDefFormat): Update callers. * src/conf/secret_conf.c (virSecretDefParseUsage) (virSecretDefFormatUsage): Likewise. * src/conf/storage_conf.c (virStoragePoolDefParseAuth) (virStoragePoolDefParseSource, virStoragePoolSourceFormat): Likewise. * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDevices): Likewise. * src/storage/storage_backend_disk.c (virStorageBackendDiskPartFormat): Likewise. * src/util/virstorageencryption.c (virStorageEncryptionSecretParse) (virStorageEncryptionSecretFormat): Likewise. * tools/virsh-secret.c (cmdSecretList): Likewise. * src/libvirt_private.syms (secret_conf.h, storage_conf.h): Export corrected names. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 13 5月, 2014 1 次提交
-
-
由 Eric Blake 提交于
"Freezed" is not an English word. * src/lxc/lxc_driver.c (lxcFreezeContainer): Fix typo. * src/qemu/qemu_driver.c (qemuDomainSnapshotFSFreeze): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 30 4月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The LXC controller itself needs to mknod the USB device node in /dev/bus/usb, so we can't block mknod permission from the cgroup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 4月, 2014 1 次提交
-
-
由 Laine Stump 提交于
The check for a network being active during interface attach was being done individually in several places (by both the lxc driver and the qemu driver), but those places were too specific, leading to it *not* being checked when allocating a connection/device from a macvtap or hostdev network. This patch puts a single check in networkAllocateActualDevice(), which is always called before the any network interface is attached to any type of domain. It also removes all the other now-redundant checks from the lxc and qemu drivers. NB: the following patches are prerequisites for this patch, in the case that it is backported to any branch: 440beeb7 network: fix virNetworkObjAssignDef and persistence 8aaa5b68 network: create statedir during driver initialization b9e95491 network: change location of network state xml files 411c5486 network: set macvtap/hostdev networks active if their state file exists This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=880483
-
- 25 4月, 2014 1 次提交
-
-
由 Nehal J Wani 提交于
Instead of hardcoding LIBEXECDIR as the location of the libvirt_lxc binary set in the LXC driver capabilities, use virFileFindResource to optionally find it in the current build directory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 4月, 2014 1 次提交
-
-
由 Nehal J Wani 提交于
Fix minor typos in source comments Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 09 4月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Currently, virCgroupGetPercpuStats is only used by the LXC driver, filling out the CPUTIME stats. qemuDomainGetPercpuStats does this and also filles out VCPUTIME stats. Extend virCgroupGetPercpuStats to also report VCPUTIME stats if nvcpupids is non-zero. In the LXC driver, we don't have cpupids. In the QEMU driver, there is at least one cpupid for a running domain, so the behavior shouldn't change for QEMU either. Also rename getSumVcpuPercpuStats to virCgroupGetPercpuVcpuSum.
-
- 08 4月, 2014 4 次提交
-
-
由 Richard Weinberger 提交于
Commit b9dd878f (util: make it easier to grab only regular command exit) changed the call semantics of virCommandRun() and therefore of virRun() too. But lxcCheckNetNsSupport() was not updated. As consequence of this lxcCheckNetNsSupport always failed and broke LXC. Signed-off-by: NRichard Weinberger <richard@nod.at>
-
由 Daniel P. Berrange 提交于
Now that we ditched our custom pthread impl for Win32, we can use PTHREAD_MUTEX_INITIALIZER for static mutexes. This avoids the need to use a virOnce one-time global initializer in a number of places. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since it is an abbreviation, USB should always be fully capitalized or full lower case, never Usb. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Cédric Bosdonnat 提交于
-
- 03 4月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Every caller checked the return value and logged an error - one if no device with the specified MAC was found, other if there were multiple devices matching the MAC address (except for qemuDomainUpdateDeviceConfig which logged the same message in both cases). Move the error reporting into virDomainNetFindIdx, since in both cases, we couldn't find one single match - it's just the error messages that differ.
-
- 02 4月, 2014 1 次提交
-
-
由 Eric Blake 提交于
A continuation of the migration of disk details to virstoragefile. This patch moves a single enum, but converting the name has quite a bit of fallout. * src/conf/domain_conf.h (virDomainDiskType): Move... * src/util/virstoragefile.h (virStorageType): ...and rename. * src/bhyve/bhyve_command.c (bhyveBuildDiskArgStr) (virBhyveProcessBuildLoadCmd): Update clients. * src/conf/domain_conf.c (virDomainDiskSourceDefParse) (virDomainDiskDefParseXML, virDomainDiskSourceDefFormatInternal) (virDomainDiskDefFormat, virDomainDiskGetActualType) (virDomainDiskDefForeachPath, virDomainDiskSourceIsBlockType): Likewise. * src/conf/snapshot_conf.h (_virDomainSnapshotDiskDef): Likewise. * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefParseXML) (virDomainSnapshotAlignDisks, virDomainSnapshotDiskDefFormat): Likewise. * src/esx/esx_driver.c (esxAutodetectSCSIControllerModel) (esxDomainDefineXML): Likewise. * src/locking/domain_lock.c (virDomainLockManagerAddDisk): Likewise. * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDeviceDisk) (virLXCControllerSetupNBDDeviceDisk) (virLXCControllerSetupLoopDevices, virLXCControllerSetupDisk): Likewise. * src/parallels/parallels_driver.c (parallelsGetHddInfo): Likewise. * src/phyp/phyp_driver.c (phypDiskType): Likewise. * src/qemu/qemu_command.c (qemuGetDriveSourceString) (qemuDomainDiskGetSourceString, qemuBuildDriveStr) (qemuBuildCommandLine, qemuParseCommandLineDisk) (qemuParseCommandLine): Likewise. * src/qemu/qemu_conf.c (qemuCheckSharedDevice) (qemuTranslateDiskSourcePool) (qemuTranslateSnapshotDiskSourcePool): Likewise. * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse) (qemuDomainDetermineDiskChain): Likewise. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo) (qemuDomainSnapshotPrepareDiskExternalBackingInactive) (qemuDomainSnapshotPrepareDiskExternalBackingActive) (qemuDomainSnapshotPrepareDiskExternalOverlayActive) (qemuDomainSnapshotPrepareDiskExternalOverlayInactive) (qemuDomainSnapshotPrepareDiskInternal) (qemuDomainSnapshotPrepare) (qemuDomainSnapshotCreateSingleDiskActive): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia): Likewise. * src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise. * src/security/security_apparmor.c (AppArmorRestoreSecurityImageLabel) (AppArmorSetSecurityImageLabel): Likewise. * src/security/security_dac.c (virSecurityDACSetSecurityImageLabel) (virSecurityDACRestoreSecurityImageLabelInt) (virSecurityDACSetSecurityAllLabel): Likewise. * src/security/security_selinux.c (virSecuritySELinuxRestoreSecurityImageLabelInt) (virSecuritySELinuxSetSecurityImageLabel) (virSecuritySELinuxSetSecurityAllLabel): Likewise. * src/storage/storage_backend.c (virStorageFileBackendForType): Likewise. * src/storage/storage_backend_fs.c (virStorageFileBackendFile) (virStorageFileBackendBlock): Likewise. * src/storage/storage_backend_gluster.c (virStorageFileBackendGluster): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives) (vboxDomainAttachDeviceImpl, vboxDomainDetachDevice): Likewise. * src/vmware/vmware_conf.c (vmwareVmxPath): Likewise. * src/vmx/vmx.c (virVMXParseDisk, virVMXFormatDisk) (virVMXFormatFloppy): Likewise. * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenParseSxpr) (xenFormatSxprDisk): Likewise. * src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk): Likewise. * tests/securityselinuxlabeltest.c (testSELinuxLoadDef): Likewise. * src/libvirt_private.syms (domain_conf.h): Move symbols... (virstoragefile.h): ...as appropriate. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 26 3月, 2014 3 次提交
-
-
由 Ján Tomko 提交于
Currently, the Linux kernel treats values of '0' and '1' as the minimum of 2. Values larger than the maximum are changed to the maximum. Re-reading the shares value after setting it reflects this in the live domain XML.
-
由 Ján Tomko 提交于
Currently, <cputune><shares>0</shares></cputune> is treated as if it were not specified. Treat is as a valid value if it was explicitly specified and write it to the cgroups.
-
由 John Ferlan 提交于
On error the lofd would have been leaked.
-
- 25 3月, 2014 3 次提交
-
-
由 Ján Tomko 提交于
-
由 Eric Blake 提交于
It's finally time to start tracking disk backing chains in <domain> XML. The first step is to start refactoring code so that we have an object more convenient for representing each host source resource in the context of a single guest <disk>. Ultimately, I plan to move the new type into src/util where it can be reused by virStorageFile, but to make the transition easier to review, this patch just creates the new type then fixes everything until it compiles again. * src/conf/domain_conf.h (_virDomainDiskDef): Split... (_virDomainDiskSourceDef): ...to new struct. (virDomainDiskAuthClear): Use new type. * src/conf/domain_conf.c (virDomainDiskDefFree): Split... (virDomainDiskSourceDefClear): ...to new function. (virDomainDiskGetType, virDomainDiskSetType) (virDomainDiskGetSource, virDomainDiskSetSource) (virDomainDiskGetDriver, virDomainDiskSetDriver) (virDomainDiskGetFormat, virDomainDiskSetFormat) (virDomainDiskAuthClear, virDomainDiskGetActualType) (virDomainDiskDefParseXML, virDomainDiskSourceDefFormat) (virDomainDiskDefFormat, virDomainDiskDefForeachPath) (virDomainDiskDefGetSecurityLabelDef) (virDomainDiskSourceIsBlockType): Adjust all users. * src/lxc/lxc_controller.c (virLXCControllerSetupDisk): Likewise. * src/lxc/lxc_driver.c (lxcDomainAttachDeviceMknodHelper): Likewise. * src/qemu/qemu_command.c (qemuAddRBDHost, qemuParseRBDString) (qemuParseDriveURIString, qemuParseGlusterString) (qemuParseISCSIString, qemuParseNBDString) (qemuDomainDiskGetSourceString, qemuBuildDriveStr) (qemuBuildCommandLine, qemuParseCommandLineDisk) (qemuParseCommandLine): Likewise. * src/qemu/qemu_conf.c (qemuCheckSharedDevice) (qemuAddISCSIPoolSourceHost, qemuTranslateDiskSourcePool): Likewise. * src/qemu/qemu_driver.c (qemuDomainUpdateDeviceConfig) (qemuDomainPrepareDiskChainElement) (qemuDomainSnapshotCreateInactiveExternal) (qemuDomainSnapshotPrepareDiskExternalBackingInactive) (qemuDomainSnapshotPrepareDiskInternal) (qemuDomainSnapshotPrepare) (qemuDomainSnapshotCreateSingleDiskActive) (qemuDomainSnapshotUndoSingleDiskActive) (qemuDomainBlockPivot, qemuDomainBlockJobImpl) (qemuDomainBlockCopy, qemuDomainBlockCommit): Likewise. * src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise. * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase) (qemuProcessInitPasswords): Likewise. * src/security/security_selinux.c (virSecuritySELinuxSetSecurityFileLabel): Likewise. * src/storage/storage_driver.c (virStorageFileInitFromDiskDef): Likewise. * tests/securityselinuxlabeltest.c (testSELinuxLoadDef): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Part of a series of cleanups to use new accessor methods. * src/lxc/lxc_cgroup.c (virLXCCgroupSetupDeviceACL): Use accessors. * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDeviceDisk) (virLXCControllerSetupNBDDeviceDisk) (virLXCControllerSetupLoopDevices, virLXCControllerSetupDisk): Likewise. * src/lxc/lxc_driver.c (lxcDomainAttachDeviceDiskLive) (lxcDomainDetachDeviceDiskLive): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 21 3月, 2014 3 次提交
-
-
由 Jiri Denemark 提交于
When checking compatibility of a device with a domain definition, we should know what we're going to do with the device. Because we may need to check for different things when we're attaching a new device versus detaching an existing device. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
A device needs to be checked for compatibility with the domain definition it corresponds to. Specifically, for VIR_DOMAIN_AFFECT_CONFIG case we should check against persistent def rather than active def. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-