kvm: use preallocation option for fat disk resize#11986
kvm: use preallocation option for fat disk resize#11986DaanHoogland merged 4 commits intoapache:4.22from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #11986 +/- ##
=========================================
Coverage 17.55% 17.56%
- Complexity 15536 15551 +15
=========================================
Files 5909 5910 +1
Lines 529118 529147 +29
Branches 64627 64636 +9
=========================================
+ Hits 92902 92959 +57
+ Misses 425761 425731 -30
- Partials 10455 10457 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15650 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/qemu/QemuImgTest.java
Show resolved
Hide resolved
Fixes apache#10589 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
ece83a8 to
91a27df
Compare
|
Thanks @RosiKyu for the tests. I've added the change to fix params @blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 16024 |
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16037 |
RosiKyu
left a comment
There was a problem hiding this comment.
LGTM. Disk is fully preallocated as expected.
[root@ref-trl-10404-k-Mol9-rositsa-kyuchukova-kvm1 ~]# grep "415f694d-49f0-4bb6-b188-e95397dbc334" /var/log/cloudstack/agent/agent.log | grep "qemu-img"
2025-12-15 14:57:10,767 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Executing command [qemu-img create -o preallocation=full -f qcow2 /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 10737418240 ].
2025-12-15 14:58:28,079 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Successfully executed process [31759] for command [qemu-img create -o preallocation=full -f qcow2 /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 10737418240 ].
2025-12-15 14:58:28,081 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Executing command [qemu-img info -U /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 ].
2025-12-15 14:58:28,108 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Successfully executed process [31790] for command [qemu-img info -U /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 ].
2025-12-15 14:58:28,115 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Executing command [qemu-img convert -O qcow2 -o preallocation=full -U --image-opts driver=qcow2,file.filename=/mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/8d81fd6f-5aed-4993-af36-a16d0a7e61b9 /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 ].
2025-12-15 14:59:51,906 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Successfully executed process [31793] for command [qemu-img convert -O qcow2 -o preallocation=full -U --image-opts driver=qcow2,file.filename=/mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/8d81fd6f-5aed-4993-af36-a16d0a7e61b9 /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 ].
2025-12-15 14:59:51,907 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Executing command [qemu-img resize --preallocation=full /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 10737418240 ].
2025-12-15 14:59:52,026 WARN [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Execution of process [31853] for command [qemu-img resize --preallocation=full /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 10737418240 ] failed.
2025-12-15 14:59:52,026 DEBUG [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Exit value of process [31853] for command [qemu-img resize --preallocation=full /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 10737418240 ] is [1].
2025-12-15 14:59:52,026 WARN [utils.script.Script] (AgentRequest-Handler-1:[]) (logid:96111c19) Process [31853] for command [qemu-img resize --preallocation=full /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334 10737418240 ] encountered the error: [qemu-img: Preallocation can only be used for growing images].
[root@ref-trl-10404-k-Mol9-rositsa-kyuchukova-kvm1 ~]# ls -lsh /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334
12G -rw-r--r--. 1 root root 11G Dec 15 15:07 /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334
[root@ref-trl-10404-k-Mol9-rositsa-kyuchukova-kvm1 ~]#
[root@ref-trl-10404-k-Mol9-rositsa-kyuchukova-kvm1 ~]#
[root@ref-trl-10404-k-Mol9-rositsa-kyuchukova-kvm1 ~]# qemu-img info -U /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334
image: /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334
file format: qcow2
virtual size: 10 GiB (10737418240 bytes)
disk size: 11 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
Child node '/file':
filename: /mnt/4680c43f-b2ce-3c6f-887e-9a923b277f01/415f694d-49f0-4bb6-b188-e95397dbc334
protocol type: file
file length: 10 GiB (10739318784 bytes)
disk size: 11 GiB
|
thanks @RosiKyu for testing! |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14998)
|
|
@shwstppr , can you look at the remaining regression test failure. The title suggests it is related. |
maybe not but, it is also in #11962 (comment) (definately not related. |
|
@DaanHoogland looked into the test logs, failure is not related, |
* 4.22: Update templateConfig.sh to not break with directorys with space on t… (#10898) Fix VM and volume metrics listing regressions (#12284) packaging: use latest cmk release link directly (#11429) api:rename RegisterCmd.java => RegisterUserKeyCmd.java (#12259) Prioritize copying templates from other secondary storages instead of downloading them (#10363) Show time correctly in the backup schedule UI (#12012) kvm: use preallocation option for fat disk resize (#11986) Python exception processing static routes fixed (#11967) KVM memballooning requires free page reporting and autodeflate (#11932) api: create/register/upload template with empty template tag (#12234)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Description
Fixes #10589
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Preallocation flag added after changes,
How did you try to break this feature and the system with this change?