Commit Graph

38929 Commits

Author SHA1 Message Date
Abhisar Sinha d8dd1073e3 veeam-kvm compatibility with other backup providers 2026-05-13 09:29:20 +05:30
Abhishek Kumar cb5350dfb9 revoke template launch for default blank template only
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-13 08:10:57 +05:30
Abhishek Kumar 3f29a959f1 fix lasthost not getting assigned
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-12 17:46:46 +05:30
Abhishek Kumar e9c3a0d5f6 fix bean error
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-12 14:59:25 +05:30
Abhishek Kumar a485605e7a fix test failures
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-12 11:07:17 +05:30
Abhisar Sinha 39d07a0905 libvirt start nbd server UT 2026-05-11 18:50:43 +05:30
Abhisar Sinha d3798e1251 Fix backup after adding a volume 2026-05-11 18:28:10 +05:30
Abhisar Sinha 77d7d43a4f KVMBackupExportServiceImplTest 2026-05-11 18:27:23 +05:30
Abhisar Sinha b49453e41c Add Libvirt wrapper tests 2026-05-11 18:27:23 +05:30
Abhisar Sinha 0277fd1a71 Remove unused methods 2026-05-11 18:27:22 +05:30
Abhishek Kumar 14a2e8e2f2 fixes, sharedfs restore, restrict unsupported instances
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-11 17:58:58 +05:30
Abhishek Kumar bc7ec163f3 fix for sshkeypair and guest os restore
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-08 18:28:15 +05:30
Abhishek Kumar 721dbea03f list only available hosts, storage
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-08 17:37:40 +05:30
Abhishek Kumar 08d2633b34 fix root volume attach
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-08 11:16:25 +05:30
Abhishek Kumar b139d3726d handle restore for VMs deployed from ISO
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-08 11:15:40 +05:30
Abhishek Kumar 6af5094443 fix for disk restore
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-07 18:54:45 +05:30
Abhishek Kumar e2a7bd2e25 fix for failed backup jobs, handling unfit vms
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-07 10:34:56 +05:30
Abhishek Kumar ebfe83d2ab Merge remote-tracking branch 'apache/main' into integration-veeam-kvm 2026-05-07 08:54:28 +05:30
Abhishek Kumar d8c7ee7dc3 fix tags restore
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-07 01:46:25 +05:30
Abhishek Kumar 9ea3364b10 fix for preserving nic mac and ip
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-07 00:54:07 +05:30
Abhishek Kumar e8cf62a0c4 fix for vm details not getting restored
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-07 00:52:53 +05:30
Bernardo De Marco Gonçalves 96ca1b2a7c
Add option to control MAC address reuse for VR public NICs (#13001) 2026-05-06 13:41:11 -03:00
Abhishek Kumar 8038dd69ba fix license
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-05 17:52:46 +05:30
Abhishek Kumar 83490a9bdb fix parsing ovf memory
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-05 17:22:53 +05:30
Abhishek Kumar b452d20a3e conditional logging for request data
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-05 17:19:40 +05:30
Abhishek Kumar 100a5c5cda filter storagedomains for hypervisor
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-05 14:22:11 +05:30
Abhishek Kumar 1a379251bc address review comments
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-05-05 13:38:47 +05:30
Abhisar Sinha c65dfa1823 fix ut and remove sudo from LibvirtDeleteVmCheckpointCommand 2026-05-04 16:17:13 +05:30
Abhisar Sinha 1f9cbd4454 address review comments 2026-05-04 14:56:34 +05:30
codingkiddo 1e512ab9c6
Skip QemuImgTest when libvirt native library cannot load (#13086)
Co-authored-by: Vinod Kumar <vinodkumar@192.168.1.3>
2026-05-03 18:45:54 +02:00
Abhishek Kumar a17bff9ba8
ui: fix webhook filters listing (#13068) 2026-05-03 18:39:41 +02:00
Suresh Kumar Anaparti 8906aa1d46
Merge branch '4.22' 2026-05-01 22:51:01 +05:30
Henrique Sato c07f1fd5d2
Number of running and stopped VMs as preset variables for `Network` type Quota tariffs (#11689)
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-05-01 11:54:40 +02:00
Fabricio Duarte 1f5dba9bd2
Release reserved storage resources on VM deployment failure (#13048) 2026-04-30 20:52:35 +05:30
Bryan Lima c45596cca3
Refactor of Allocator classes (#9074)
* Refactoring Allocator classes

* Break into smaller methods random and firfit allocators.

* Added unit tests for random and firstfit allocators

* Move random allocator from cloud-plugins to cloud-server

* Add BaseAllocator abstract class for duplicate code

* Add missing license

* Add missing license to unit test file

* Remove host allocator random dependency

* Change exception message on smoke tests

* Remove conditional as it was never actually reached in the original flow

* Fix tests

* Fix flipped parameters

* Fix NPE while listing hosts for migration when suitableHosts is null

* Remove unnecessary stubbings

* Fix checkstyle

* Remove unnecessary file

* Rename exception error messages

* Apply suggestions from code review

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Rename UserVmDetailVO references to VMInstanceDetailVO

* Remove unused imports

* Add new line at EOF

* Remove unnecessary random allocator pom

* Fix GPU allocation mistake

* Fix failing tests

---------

Co-authored-by: Fabricio Duarte <fabricio.duarte@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-30 10:30:02 -03:00
Gean Jair Silva 92d82989e3
Correction of the user responsible for the event (#13066)
Co-authored-by: gean.silva <gean.silva@scclouds.com.br>
2026-04-30 14:16:26 +05:30
Abhishek Kumar 1f306b7f54 another pre-commit fix
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-30 12:06:18 +05:30
Abhishek Kumar 905be92b0a fix datacenter href bug
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-30 11:38:47 +05:30
Abhishek Kumar eaab07d99d Merge remote-tracking branch 'apache/main' into integration-veeam-kvm 2026-04-30 11:32:56 +05:30
Abhishek Kumar 7bdd70399a more tests, fix pre-commit
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-30 11:29:29 +05:30
julien-vaz a73cc9a22c
Improve Quota Statement (#10506)
* Improve Quota Statement

* Removes unused import

* Fix QuotaUsageJoinDao, QuotaResponseBuilderImpl, QuotaServiceImpl e QuotaServiceImplTest

* Reorganize imports

* Updates QuotaStatementCmd responseBuilder scope to default

* Fix log4j syntax

* Address reviews + other improvements

* Add missing SQL scripts and injections

* Change accountid and domainid logic + add unit tests

* Rename QuotaUsageDetail to QuotaTariffUsage

* Fix out of bounds exception

---------

Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-29 21:09:13 -03:00
Abhishek Kumar 568c1aab7a minor cleanup and tests
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-29 17:55:29 +05:30
Sergiy Kukunin 089eb36e47
Linstor: fix create volume from snapshot on primary storage (#13043)
* Linstor: fix create volume from snapshot on primary storage

When creating a volume from a snapshot on Linstor primary storage
(with lin.backup.snapshots=false), the operation fails with:
"Only the following image types are currently supported: VHD, OVA,
QCOW2, RAW (for PowerFlex and FiberChannel)"

Root cause: the Linstor driver does not handle SNAPSHOT -> VOLUME in
its canCopy()/copyAsync() methods. This causes DataMotionServiceImpl
to fall through to StorageSystemDataMotionStrategy (selected because
Linstor advertises STORAGE_SYSTEM_SNAPSHOT=true). That strategy's
verifyFormatWithPoolType() rejects RAW format for Linstor pools,
since RAW is only allowed for PowerFlex and FiberChannel.

Additionally, VolumeOrchestrator.createVolumeFromSnapshot() attempts
to back up the snapshot to secondary storage when the storage plugin
does not advertise CAN_CREATE_TEMPLATE_FROM_SNAPSHOT. This backup
fails because the snapshot only exists on Linstor primary storage.

Fix:
- Add CAN_CREATE_TEMPLATE_FROM_SNAPSHOT capability so the
  orchestrator skips the backup-to-secondary path
- Add canCopySnapshotToVolumeCond() to match SNAPSHOT -> VOLUME
  when both are on the same Linstor primary store
- Wire it into canCopy() to intercept at DataMotionServiceImpl
  before strategy selection, bypassing StorageSystemDataMotionStrategy
- Implement copySnapshotToVolume() which delegates to the existing
  createResourceFromSnapshot() for native Linstor snapshot restore

This follows the same pattern used by the StorPool plugin, which
handles SNAPSHOT -> VOLUME directly in its driver rather than going
through StorageSystemDataMotionStrategy.

Tested on CloudStack 4.22 with Linstor LVM_THIN storage, creating
a volume from a 1TB CNPG Postgres database snapshot. Volume creates
successfully with correct path and deletes cleanly.

* Let CloudRuntimeException propagate from copySnapshotToVolume

Remove try/catch in copySnapshotToVolume so that CloudRuntimeException
from createResourceFromSnapshot propagates to the caller, ensuring
CloudStack properly notices and reports the failure.

* Fix CAN_CREATE_TEMPLATE_FROM_SNAPSHOT breaking template creation

Setting CAN_CREATE_TEMPLATE_FROM_SNAPSHOT unconditionally to true
caused createTemplate from snapshot to take the StorPool-specific
code path in TemplateManagerImpl, which sends a CopyCommand to a
system VM that Linstor cannot handle.

Fix: make CAN_CREATE_TEMPLATE_FROM_SNAPSHOT conditional on the same
flag as STORAGE_SYSTEM_SNAPSHOT (!BackupSnapshots). When snapshots
are backed up to secondary (the default), the old template creation
flow works. When snapshots stay on primary, the direct path is used.

Also fix checkstyle: remove unused DataObject import in test.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-29 11:23:08 +05:30
Abhishek Kumar 574f0ea40a address comments
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-29 10:46:22 +05:30
Abhishek Kumar 5710676961 fix eof
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-29 01:49:57 +05:30
Abhishek Kumar adb317d8b5 schema fix
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-29 01:28:57 +05:30
Abhishek Kumar 6b8a725de4 fix nic attach warning during restore
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-29 01:15:30 +05:30
Erik Böck e2c13da419
Remove UUID parse from param processing workflow (#13065) 2026-04-28 09:13:05 +02:00
Henrique Sato 6f4445c5c1
Add offering preset variables for `Network` and `VPC` Quota tariffs (#11810)
* Add offering preset variable to Network and VPC tariffs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Add tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-27 09:36:37 -03:00
Suresh Kumar Anaparti ffebe8eaa6
Fix bulk power state query missing VM lifecycle state field (#13027)
* Fix bulk power state query missing VM lifecycle state field

The IdsPowerStateSelectSearch partial select did not include the VM
lifecycle state, causing isPowerStateInSyncWithInstanceState to always
return true when state was null. This prevented retry of failed
StopCommands on subsequent ping cycles.

* Add defensive check for instance host ID to prevent NPE

Co-authored-by: Sachin R Doddaguni <s_rudrappadoddagu@apple.com>
Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2026-04-27 15:38:52 +05:30