Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Efim | 3e5ec7b34b8 | Сheck snapshot disk is not NULL when searching it in the VM cfg #PSBM-156260When creating a snapshot of a VM with multiple hard drives, the snapshot takes into account the presence of all disks in the system. If, over time, one of the disks is deleted, the snapshot will continue to store knowledge of the deleted disk. This results in the fact that at the moment of deleting the snapshot, at the validation stage, a disk from the snapshot will be searched for, which is no... | PSBM-156260 | ||
Nikolai Barybin | 0afc2789047 | qemu: support qcow2 wrapper disks #PSBM-155941To enable proper attach of qcow2 wrapper over LVM we need to: 1. Parse paths of the underlying LVM disk(s) 2. Pass them to qemuMknodHelper 3. Put these paths to qemu process cgroup All these actions are done due to new field in disk source definition storing these paths introduced in the previous patch. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | PSBM-155941 | ||
Nikolai Barybin | a69eee96138 | conf, qemu: introduce VIR_STORAGE_FILE_QCOW2_LVM_WRAPPER #PSBM-155941For some disk tools it's necessary to support legacy LVM disks, and instead of supporting them directly LVM disks can be wrapped by qcow2 file to be portable. This wrapping can be done by passing data file to qcow2 image. For instance: qemu-img create -f qcow2 -o data_file=/dev/lvm_disk,data_file_raw=true wrapper.qcow2 1G This wrapper file can't be attached to VM because libvirt doesn't parse... | PSBM-155941 | ||
Nikolai Barybin | c2d48a68ca3 | FIXUP: qemu: prevent potential domain job hang #PSBM-155927fixup! qemu: support setting net params thru prl_nettool #PSBM-129743 Fixes: af9188788ac49bff365177b463c6b13031381493 Domain job started on a previous step should be finished. Othervise, we risk to hang on condition var when starting next job. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | 2 Jira Issues | ||
Nikolai Barybin | 29bb9f310e5 | qemu migration: allow migration if tmp snapshot is present #VSTOR-83959Unconditional unlink of src snapshot potentially leads to data loss. Thus, let's make this check more accurate. If tmp snapshot is present and used as top delta by qemu - allow migration to proceed. Othervise return error and let cleanup function handle it. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-83959 | ||
Nikolai Barybin | 7749f57a669 | qemu: enhance reconnect for EFI VMs #VSTOR-83538Migration on vstorage of EFI VMs failed after libvirtd restart due to nvram->nodeformat value was NULL. It is initialiazed only on qemu process creation and not handled on reconnect. This patch fixes it and properly inintializes nvram structure on reconnect. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-83538 | ||
Aleksandr Leskin | e6a4a8e62fa | virtnwfilterd: remove timeout parameter #PSBM-150691We do not need to always restart virtnwfilterd service. This brings some problems with starting VE and impairs performance metrics. Let it work permanently. Signed-off-by: Aleksandr Leskin <aleksandr.leskin@virtuozzo.com> | PSBM-150691 | ||
Efim | c3fda650e48 | Revert "libvirtd: tune OOMScoreAdjust" #VSTOR-76053This reverts commit afb37a503117c8dd7e7b224a424566e4a199247d. Signed-off-by: Fima Shevrin <efim.shevrin@virtuozzo.com> | VSTOR-76053 | ||
Efim | cac793adf6b | Add check for tmpSnapshot var after Xpath function #VSTOR-82256The lack of a NULL check for tmpSnapshot causes the virDomainDiskTmpSnapshotTypeFromString function to work with NULL and report an error that does not occur. Signed-off-by: Fima Shevrin <efim.shevrin@virtuozzo.com> | VSTOR-82256 | ||
Andrey Zhadchenko | 90bd0341d4d | qemu: fix block stats #VSTOR-80826VIR_STORAGE_TYPE_* values should not be manipulated by bitwise operators but only direct comparisons Fix provided by: Denis Lunev <den@virtuozzo.com> Fixes: 7f3d445b42c0 ("conf: add vhostblk block devices #PSBM-152241") Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | 2 Jira Issues | ||
Efim | 7ee1953e3b0 | Separation of migration scripts for vhs and vhi #VSTOR-80353vhs and vhi are different products and require enabling of different features during the post migration script. We separate the wokr of vhs and vhi scripts by creating a symlink 60-vz-migration.py to the script that is used. Thus, from the libvirt point of view, nothing changes. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-80353 | ||
Andrey Zhadchenko | a05dca34aed | qemu: implement vhostblk disk preparation #PSBM-152241vhostblk disks need to be inserted into kernel before QEMU starts. As kernel-assigned dm device name may vary, we also need to properly generate QEMU command-line. https://virtuozzo.atlassian.net/browse/PSBM-152241 Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | PSBM-152241 | ||
Andrey Zhadchenko | e786739d14a | qemu: prepare vhostblk block devices in vm namespaces #PSBM-152241We need to add /dev/vhost-blk and prepared disks to vm namespaces and allow them in cgroups, so QEMU can use them https://virtuozzo.atlassian.net/browse/PSBM-152241 Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | PSBM-152241 | ||
Andrey Zhadchenko | f87480d672a | qemu: dismantle vhostblk disks on shutdown #PSBM-152241vhostblk disks backend is controlled by libploop. Dismantle dm device on shutdown https://virtuozzo.atlassian.net/browse/PSBM-152241 Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | PSBM-152241 | ||
Andrey Zhadchenko | 9bf5a1e0c73 | conf: add vhostblk block devices #PSBM-152241Add definitions and schema for qemu disks with vhostblk backend Example of disk xml: <disk type='vhostblk' device='disk'> <driver name='qemu' type='raw'/> <source file='/tmp/example.qcow2'/> <target dev='vdb' bus='virtio'/> </disk> https://virtuozzo.atlassian.net/browse/PSBM-152241 Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | PSBM-152241 | ||
Andrey Zhadchenko | 0507694aa5d | qemu/snapshots: do not fail on blockcommit with checkpoints #VSTOR-79650When we create snapshot with create-snapshot-as, we copy checkpoint bitmaps on top level. If we later try to blockcommit this chain, we will fail, because blockcommit tries to copy bitmaps from top to bottom and do not expect bitmaps to already exist. Teach blockcommit to clear existing bitmaps instead of always trying to create new ones. https://pmc.acronis.work/browse/VSTOR-79650 Signed-off... | VSTOR-79650 | ||
Andrey Zhadchenko | 0b091486ed8 | qemu: add helpers to clear bitmap #VSTOR-79650as we will need it in the following patches https://pmc.acronis.work/browse/VSTOR-79650 Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com> | VSTOR-79650 | ||
Efim | f47cc318c70 | Add metadata check and vhs metadata set after migration #PSBM-151937Since libvirt uses active vm config during migration, we add a check for the presence of vhs fields in the metadata block. If there are no such fields, then we have a migration from vz7 and we need to install the necessary cpu features. After migration, if there are no metadata vhs fields in active config vm, we add vhs metadata forcibly to avoid redundant setting of cpu features when migratin... | PSBM-151937 | ||
Nikolay Shirokovskiy | ffe3f031b84 | qemu: load bitmaps on disk hotplug #VSTOR-45545Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-45545 | ||
Oleg Vasilev | 933de2c1fa2 | blockjob: emit events on tmp commit failures #VSTOR-63083During vstorage migration, snapshot commits can fail, and then retried in the background. The state of repeated failure is dificult to detect from outside. Therefore, emit 'block-job-error-x', both on failure to initiate blockjob and an unsuccessful result on blockjob completion. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-63083 | ||
Nikolay Shirokovskiy | f4260bc72cc | qemu: default audio flag issues #PSBM-153138Porting qemu-temporary-don-t-show-default-audio-in-public-xm.patch Signed-off-by: Fima Shevrin <efim.shevrin@virtuozzo.com> | PSBM-153138 | ||
Den Lunev | b08068b3dd6 | rpc: handle notifications properly #VSTOR-77955RPC client implementation uses the following paradigm. The critical section is organized via virObjectLock(client)/virObjectUnlock(client) braces. Though this is potentially problematic as main thread: side thread: virObjectUnlock(client); virObjectLock(client); g_main_loop_quit(cl... | VSTOR-77955 | ||
Den Lunev | 83dd0cbc1fa | rpc: mark GSourceFuncs functions in vireventglibwatch.c as staticThey are not exported from the module and thus should be static. Signed-off-by: Denis V. Lunev <den@openvz.org> | |||
Den Lunev | 79b3dde5c1e | rpc: create virNetClientIOWakeup helperThis functionality is to be extended, simple call to g_main_loop_quit() is not enough. In order to make changes convinient, the helper is required. Signed-off-by: Denis V. Lunev <den@openvz.org> | |||
Nikolai Barybin | f7d497c675e | FIXUP: qemu migration: remove ambigious L2 feature setting #VSTOR-77963fixup! qemu migration: avoid COW over VStorage tmp snapshots #VSTOR-75705 Fixes: 759e2057e9936839b2c7b8bd2a07a28b252d2001 Remove ambigious L2 bit setting: it is already done later in storageBackendCreateQemuImgSetOptions() and was previously added by mistake. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | 2 Jira Issues | ||
Nikolai Barybin | 4eb11e69bb7 | qemu: vstorage: enable lazy-refcounts on tmp snapshots #VSTOR-77963During vstorage migration tmp snapshots creation differs for src and dest. On the latter one snapshots have lazy-refcounts feature. Enable the same on src side. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-77963 | ||
Nikolai Barybin | ee40aa17921 | FIXUP: qemu migration: change tmp snapshot cluster size #VSTOR-77963fixup! qemu migration: avoid COW over VStorage tmp snapshots #VSTOR-75705 Fixes: 759e2057e9936839b2c7b8bd2a07a28b252d2001 Change cluster size to 128k, because with 64k the TRIM granularity would be 2k which is potentially problematic with VStorage, where it should be 4k. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | 2 Jira Issues | ||
Nikolai Barybin | 63597254306 | FIXUP: qemu: decrease subclusters enable threshold #VSTOR-77963fixup! qemu: Add extended_l2 option to qemu-img for VM creation and migration Fixes: 2295a27b358a9a73bc3d6d83da21ebe2add6ba15 512k threshold is too much. Sometimes it can be effective to enable subclusters on smaller cluster sizes (i.e. 128k or 64k) Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-77963 | ||
Nikolai Barybin | f977de5c9fa | qemu migration: avoid COW over VStorage tmp snapshots #VSTOR-75705Reduce cluster size and enable subclustering to eliminate performance degradation related to copy-on-write mechanism. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-75705 | ||
Nikolai Barybin | 2d27459127c | qemu migration: fix VNC settings during upgrade #PSBM-151463 #VSTOR-76045VNC disable/enable routines used deprecated QMP commands. This patch enables usage of 'display-update' for correct VNC manipulations. During qemu upgrade (local migration): 1. Before migration query and store VNC settings in VM's private data 2. Disable VNC on src VM 3. During complete stage restore settings on dest VM OR Restore them on src VM if migration failed Signed-off-by: Nikolai... | 2 Jira Issues | ||
Nikolai Barybin | 1930fcaa660 | qemu migration: fix connection reference leak #VSTOR-75793During local migration the same connection is used for src and dest VM. When migration is completed src qemu process closes connection, and when src libvirt client (i.e virsh) is trying to close it too the connection pointer turns out to be invalid. Thus, we explicitly increment reference count before migration to enable correct cleanup on source side. Signed-off-by: Nikolai Barybin <nikolai.b... | VSTOR-75793 | ||
Nikolai Barybin | 5cd9ddd2613 | qemu: enhance domain stats collection #VSTOR-75793Before iterating VMs' list those VMs which are in 'removing' state are filtered out of list. But some of them may go to this state while iteration cycle collects stats from others. This state might be caused by various reasons and collecting stats from 'removing' VMs may lead to SIGSEGV. For example, when addressing vm->def->vcpus[i], which is imposible to check whether these fields were freed... | VSTOR-75793 | ||
Oleg Vasilev | 34636e3fe76 | remote: add Wants=libvirtd-tcp.socketIn case of a crash and failure for the start of libvirtd.service, libvirtd-tcp.socket is not started. Subsequently, clients can't communicate with libvirt over TCP. The patch is required only when TCP socket must be always on. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | |||
Nikolai Barybin | 90845eb5f1d | qemu migration: fix hle, rtm features absence #VSTOR-75689Make cpu match options less strict to allow libvirt handle disabled hle/rtm features when migrating from v7 to v9. During migration cpu definition may come from 2 sources: domain XML or migration cookie. Domain XML can be updated by migration hook, but if migration cookie cantains cpu definition too, it will be prioritized over cpu from domain XML. For this reason we need to explicitly update ... | VSTOR-75689 | ||
Oleg Vasilev | 259507ee625 | qemu: hook: add logging to 60-vz-migration.pyWe've had multiple problem with hook working as expected. Add logging to better debug such issues. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | |||
Oleg Vasilev | 4174cd6dbd0 | qemu: change alias->nodeformat for block-dirty-bitmap-removeMIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit block-dirty-bitmap-remove now wants format node's name Change it, same as in: commit 866f34c126cc261af9b706a338a15f8983ecf6d8 Author: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com> Date: Fri Aug 4 22:15:42 2023 +0300 <200b> qemu: fix checkpoint loading for starting containers #... | VSTOR-72852 | ||
Nikolai Barybin | c1dec7b48d7 | qemu migration: disable amd features for vz7 machines #PSBM-149402In compat with older versions these features are explicitly disabled in qemu. Thus, we need to do the same in libvirt to avoid migration errors for vz7 machines. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | PSBM-149402 | ||
Oleg Vasilev | 0f0a7cb3ce4 | qemu.conf: enable coredump collection #VSTOR-74076In VHS 7 we had abrt responsible for coredump collection. It didn't honour max_core option and collected it anyway. In VHS 9 systemd-coredump does honour this option, so enable it. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-74076 | ||
Oleg Vasilev | 58bf539c855 | qemu: hook: cleanup 60-vz-migration.pyFor future addition of AMD flags handling Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | |||
Oleg Vasilev | 6a31454de9d | qemu: hook: add tests for 60-vz-migrationSigned-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | |||
Oleg Vasilev | 6cf7bb71259 | qemu: allow cpu match relax for manufacturer=Acronis #VSTOR-73697Apparently, it can be either "Virtuozzo" or "Acronis" Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-73697 | ||
Oleg Vasilev | 026373e509c | agent aux: attach sources to defualt context #PSBM-148332Event sources (GSources) can either be attached to the global event loop or per-VM event loop. The per-VM event loop was introduced in 2020 [1] and not used ubiquitously yet. In particular, virNetServer* API doesn't use it (e. g. virEventGLibHandle{Add, Update} don't support passing context to virEventGLibAddSocketWatch, and is called by virNetServerDispatchNewClient). As a result, client eve... | PSBM-148332 | ||
Nikolai Barybin | c5ced7c0f6c | qemu: add cpu features migration hook #VSTOR-71058Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-71058 | ||
Oleg Vasilev | aa477b80cf3 | remote: handle partial data transmission #VSTOR-71024A new bug was introduced as a part of use-after-free fix below: commit 411cbe7199ce533ae5fa78f5558dddca6f88ef1a Author: Oleg Vasilev <oleg.vasilev@virtuozzo.com> Date: Tue Jul 4 13:10:22 2023 +0600 remote: fix stream use-after-free When the message was processed partially, it is actually supposed to stay in the queue to be processed again. In such case, reinsert it back... | VSTOR-71024 | ||
Aleksandr Leskin | 427b31e66a2 | qemu: do not reconfigure guest after restoring #PSBM-148994VZ9 should not reconfigure guest tools and network parameters of VM after resume from managedsave state. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | PSBM-148994 | ||
Aleksandr Leskin | 1973f2939d1 | conf: introduce virDomainObjIsRestored helperSigned-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | |||
Oleg Vasilev | 82d6612c96f | log: bypass virMutexLock for log mutex #VSTOR-71200virMutexLock contains a codepath for debugging hanged mutexes added in: commit de2aecf8ac9577d421d04f279a69b09e950c1c0b Author: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Date: Fri Nov 15 16:14:50 2019 +0300 debug: print 'thr a a bt' in log when taking some mutex takes much time This codepath itself requires taking a log mutex, which leads to self-deadlock. Signed-off-by: Nikolai ... | VSTOR-71200 | ||
Nikolai Barybin | e0ed034e5e5 | qemu: fix nvram XML definition format #VSTOR-70413In virDomainDefParseBootLoaderOptions() the key 'vz-tmp-snapshot' is expected to be inside 'nvram' tag, but without this fix it is out of any tag at all leading to uefi machines' migration failure. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-70413 | ||
Andrey Zhadchenko | 8baf782bdd1 | qemu: fix lookup name for disks in qemuCreateDelta #VSTOR-70938For newer qemu version sometimes disk names in block hashtable are full qom names like "/machine/peripheral/virtio-disk0/virtio-backend" instead of shorter "virtio-disk0" Update qemuCreateDelta() to use qdev id as a key instead of a short alias while searching in hastable returned by qemuMonitorGetBlockInfo() https://pmc.acronis.work/browse/VSTOR-70938 Signed-off-by: Nikolai Barybin <nikolai.... | VSTOR-70938 | ||
Oleg Vasilev | 4e16766c5e7 | remote: fix stream use-after-free #VSTOR-70548Inside daemonStreamHandleWrite on stream completion (status=OK) we resuse msg object to send confirmation. Only after that, msg is poped from the queue and checked for continue. By that time, msg might've already been processed for the confirmation and freed. Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> | VSTOR-70548 |