- 10 4月, 2015 23 次提交
-
-
由 Luyao Huang 提交于
Add static virNetDevGetifaddrsAddress to attempt to get the interface IP address. If getifaddrs is not supported, fall back to virNetDevGetIPv4AddressIoctl to get the IP address. This allows IPv6 addresses to be used for <listen type='network> with device-backed networks. https://bugzilla.redhat.com/show_bug.cgi?id=1192318Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 John Ferlan 提交于
Rename it to virNetDevGetIPv4AddressIoctl and make virNetDevGetIPAddress a wrapper around it, allowing other ways of getting the address to be implemented, and still falling back to the old method. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Dmitry Guryanov 提交于
PCS doesn't store domain config in managed save state file. It's forbidden to change config for VMs in this state. It's possible to change config for containers, but after restoring domain will have that new config, not a config, which domain had at the moment of virDomainManagedSave. So we need to handle this case differently from other states. Let's forbid this operation, if config is changed and if it's not changed - just do nothing. Openstack/nova calls virDomainDefineXML on resume with current domain config, so we can't forbid this operation in managed save state. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
We should add input devices with proper bus, not VIR_DOMAIN_INPUT_BUS_XEN. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Dmitry Guryanov 提交于
Handle input devices in virDomainDefParseXML properly in case of parallels containers and VMs. Parallels containers support only VIR_DOMAIN_INPUT_BUS_PARALLELS. And if VNC is enabled we should add implicit mouse and keyboard. For VMs we should add implicit PS/2 mouse and keyboard. BTW, is it worth to refactor code and move all this code to drivers, to *DomainDefPostParse functions? Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Dmitry Guryanov 提交于
Add implicit input devices in parallelsLoadDomains, when VNC is enabled. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Add VIR_DOMAIN_INPUT_BUS_PARALLELS device type to handle domain configuration properly for parallels containers, when VNC is enabled. When domain configuration has at least one 'graphics', there should be mouse and keyboard. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Fix function virDomainVideoDefaultType for parallels VMs and containers. It should return VGA for VMs and VIR_DOMAIN_VIDEO_TYPE_PARALLELS for containers. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
We support VNC for containers to have the same interface with VMs. At this moment it just renders linux text console. Of course we don't pass any physical devices and don't emulate virtual devices. Our VNC server renders text from terminal master and sends input events from VNC client to terminal. So add special video type VIR_DOMAIN_VIDEO_TYPE_PARALLELS for these pseudo-devices. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Network adapter model has no sense for container, so we shouldn't set it to e1000 in parallelsDomainDeviceDefPostParse. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
We handle this parameter for VMs while defining domains, so let's get this property from PCS and set corresponding field of virDomainNetDef in prlsdkLoadDomains function. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Call virDomainDefAddImplicitControllers to add disk controllers, so virDomainDef, filled by this function will look exactly like the one returned by virDomainDefParseString. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Set readonly flag for cdrom devices when we retrieve a list of domains from PCS. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Implement virDomainManagedSave api function. In PCS this feature called "suspend". You can suspend VM or CT while it is in running or paused state. And after resuming (or starting) it will have the same state, as before suspend. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Split function prlsdkDomainChangeState into prlsdkDomainChangeStateLocked and prlsdkDomainChangeState. So it can be used from places, where virDomainObj already found and locked. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
Return value of functions prlsdkStart/Kill/Stop e.t.c. is PRL_RESULT in parallels_sdk.c and int in parallels_sdk.h. PRL_RESULT is int, so compiler didn't report errors. Let's fix the difference. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 John Ferlan 提交于
Future IOThread setting patches would copy the code anyway, so create and generalize a delete cgroup and pindef for the vcpu into its own API. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Future IOThread setting patches would copy the code anyway, so create and generalize the add the vcpu to a cgroup into its own API. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Replace the virCgroupNew{Vcpu|Emulator|IOThread} calls with the common virCgroupNewThread API Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Create a new common API to replace the virCgroupNew{Vcpu|Emulator|IOThread} API's using an emum to generate the cgroup name Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1206521 If the backend driver updates the pool available and/or allocation values, then the storage_driver VolCreateXML, VolCreateXMLFrom, and VolDelete APIs should not change the value; otherwise, it will appear as if the values were "doubled" for each change. Additionally since unsigned arithmetic will be used depending on the size and operation, either or both values could be appear to be much larger than they should be (in the EiB range). Currently only the disk pool updates the values, but other pools could. Assume a "fresh" disk pool of 500 MiB using /dev/sde: $ virsh pool-info disk-pool ... Capacity: 509.88 MiB Allocation: 0.00 B Available: 509.84 MiB $ virsh vol-create-as disk-pool sde1 --capacity 300M $ virsh pool-info disk-pool ... Capacity: 509.88 MiB Allocation: 600.47 MiB Available: 16.00 EiB Following assumes disk backend updated to refresh the disk pool at deletion of primary partition as well as extended partition: $ virsh vol-delete --pool disk-pool sde1 Vol sde1 deleted $ virsh pool-info disk-pool ... Capacity: 509.88 MiB Allocation: 9.73 EiB Available: 6.27 EiB This patch will check if the backend updated the pool values and honor that update.
-
由 John Ferlan 提交于
Commit id '471e1c4e' only considered updating the pool if the extended partition was removed. As it turns out removing a primary partition would also need to update the freeExtent list otherwise the following sequence would fail (assuming a "fresh" disk pool for /dev/sde of 500M): $ virsh pool-info disk-pool ... Capacity: 509.88 MiB Allocation: 0.00 B Available: 509.84 MiB $ virsh vol-create-as disk-pool sde1 --capacity 300M $ virsh vol-delete --pool disk-pool sde1 $ virsh vol-create-as disk-pool sde1 --capacity 300M error: Failed to create vol sde1 error: internal error: no large enough free extent $ This patch will refresh the pool, rereading the partitions, and return
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1073305 When creating a volume in a pool, the creation allows the 'capacity' value to be larger than the available space in the pool. As long as the 'allocation' value will fit in the space, the volume will be created. However, resizing the volume checks were made with the new absolute capacity value against existing capacity + the available space without regard for whether the new absolute capacity was actually allocating space or not. For example, a pool with 75G of available space creates a volume of 10G using a capacity of 100G and allocation of 10G will succeed; however, if the allocation used a capacity of 10G instead and then tried to resize the allocation to 100G the code would fail to allow the backend to try the resize. Furthermore, when updating the pool "available" and "allocation" values, the resize code would just "blindly" adjust them regardless of whether space was "allocated" or just "capacity" was being adjusted. This left a scenario whereby a resize to 100G would fail; however, a resize to 50G followed by one to 100G would both succeed. Again, neither was adjusting the allocation value, just the "capacity" value. This patch adds more logic to the resize code to understand whether the new capacity value is actually "allocating" space as well and whether it shrinking or expanding. Since unsigned arithmatic is involved, the possibility that we adjust the pool size values incorrectly is probable. This patch also ensures that updates to the pool values only occur if we actually performed the allocation. NB: The storageVolDelete, storageVolCreateXML, and storageVolCreateXMLFrom each only updates the pool allocation/availability values by the target volume allocation value.
-
- 09 4月, 2015 12 次提交
-
-
由 Peter Krempa 提交于
Old compilers whine that 'sync' is being shadowed in the function introduced in 1eccac1d.
-
由 Peter Krempa 提交于
Support for drive-reopen was never present in the upstream code so we don't need to pause the VM when doing the block pivot. Kill all the code related to this semi-upstream artifact.
-
由 Peter Krempa 提交于
There are two leftover unused variables. Remove them and clean up the fallout of the change.
-
由 Peter Krempa 提交于
Refactor the function to use the new helpers.
-
由 Peter Krempa 提交于
We need to check that qemu supports block jobs in multiple places. Add a helper to do the check.
-
由 Peter Krempa 提交于
In some cases where the function does not need to access the private data this helper may be used to retrieve the monitor object.
-
由 Erik Skultety 提交于
We documented this almost everywhere, but missed it on several places. https://bugzilla.redhat.com/show_bug.cgi?id=1208763
-
由 Cédric Bosdonnat 提交于
lxc-enter-namespace stopped working on recent kernels (at least 3.19+) due to /proc/PID/ns/* file descriptors being opened RW. From outside the namespace these can only be opened RO.
-
由 Cédric Bosdonnat 提交于
SLES 11 has legacy qemu-kvm package, /usr/bin/qemu-kvm and /usr/share/qemu-kvm need to be accessed to domains.
-
由 Lubomir Rintel 提交于
/var/run may reside on a tmpfs and we fail to create the PID file if /var/run/lxc does not exist. Since commit 0a8addc1, the lxc driver's state directory isn't automatically created before starting a domain. Now, the lxc driver makes sure the state directory exists when it initializes. Signed-off-by: NLubomir Rintel <lkundrak@v3.sk>
-
由 Peter Krempa 提交于
rfc3986 states that the separator in URI path is a single slash. Multiple slashes may potentially lead to different resources and thus we should not remove them.
-
由 Peter Krempa 提交于
Add test infrastructure for virFileSanitizePath so that it can be sensibly refactored later.
-
- 08 4月, 2015 5 次提交
-
-
由 Michal Privoznik 提交于
Like we are doing in qemu driver (ea576ee5), lets call virNumaSetupMemoryPolicy() only if really needed. Problem is, if we numa_set_membind() child, there's no way to change it from the daemon afterwards. So any later attempts to change the pinning will fail. But in very weird way - CGroups will be set, but due to membind child will not allocate memory from any other node. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Luyao Huang 提交于
131,088 bytes in 16 blocks are definitely lost in loss record 2,174 of 2,176 at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4C2BACB: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x52A026F: virReallocN (viralloc.c:245) by 0x52BFCB5: saferead_lim (virfile.c:1268) by 0x52C00EF: virFileReadLimFD (virfile.c:1328) by 0x52C019A: virFileReadAll (virfile.c:1351) by 0x52A5D4F: virCgroupGetValueStr (vircgroup.c:763) by 0x1DDA0DA3: qemuRestoreCgroupState (qemu_cgroup.c:805) by 0x1DDA0DA3: qemuConnectCgroup (qemu_cgroup.c:857) by 0x1DDB7BA1: qemuProcessReconnect (qemu_process.c:3694) by 0x52FD171: virThreadHelper (virthread.c:206) by 0x82B8DF4: start_thread (pthread_create.c:308) by 0x85C31AC: clone (clone.S:113) Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Dawid Zamirski 提交于
Since the holdtime is not supported by VBOX SDK, it's being simulated by sleeping before sending the key-up codes. The key-up codes are auto-generated based on XT codeset rules (adding of 0x80 to key-down) which results in the same behavior as for QEMU implementation.
-
由 Dawid Zamirski 提交于
The IKeyboard COM object is needed to implement virDomainSendKey and is available in all supported VBOX versions.
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1198645 Once upon a time, there was a little domain. And the domain was pinned onto a NUMA node and hasn't fully allocated its memory: <memory unit='KiB'>2355200</memory> <currentMemory unit='KiB'>1048576</currentMemory> <numatune> <memory mode='strict' nodeset='0'/> </numatune> Oh little me, said the domain, what will I do with so little memory. If I only had a few megabytes more. But the old admin noticed the whimpering, barely audible to untrained human ear. And good admin he was, he gave the domain yet more memory. But the old NUMA topology witch forbade to allocate more memory on the node zero. So he decided to allocate it on a different node: virsh # numatune little_domain --nodeset 0-1 virsh # setmem little_domain 2355200 The little domain was happy. For a while. Until bad, sharp teeth shaped creature came. Every process in the system was afraid of him. The OOM Killer they called him. Oh no, he's after the little domain. There's no escape. Do you kids know why? Because when the little domain was born, her father, Libvirt, called numa_set_membind(). So even if the admin allowed her to allocate memory from other nodes in the cgroups, the membind() forbid it. So what's the lesson? Libvirt should rely on cgroups, whenever possible and use numa_set_membind() as the last ditch effort. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-