29 Commits

Author SHA1 Message Date
João Jandre
6fdaf51ddc
KVM incremental snapshot feature (#9270)
* KVM incremental snapshot feature

* fix log

* fix merge issues

* fix creation of folder

* fix snapshot update

* Check for hypervisor type during parent search

* fix some small bugs

* fix tests

* Address reviews

* do not remove storPool snapshots

* add support for downloading diff snaps

* Add multiple zones support

* make copied snapshots have normal names

* address reviews

* Fix in progress

* continue fix

* Fix bulk delete

* change log to trace

* Start fix on multiple secondary storages for a single zone

* Fix multiple secondary storages for a single zone

* Fix tests

* fix log

* remove bitmaps when deleting snapshots

* minor fixes

* update sql to new file

* Fix merge issues

* Create new snap chain when changing configuration

* add verification

* Fix snapshot operation selector

* fix bitmap removal

* fix chain on different storages

* address reviews

* fix small issue

* fix test

---------

Co-authored-by: João Jandre <joao@scclouds.com.br>
2025-05-12 10:50:30 -03:00
Daniel Augusto Veronezi Salvador
81b7e6e750
Fix extract snapshot from vm snapshot on kvm (#6422)
* Fix extract snapshot from VM snapshot on KVM

* Fix validation expression - does not need to escape the slash

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-05-31 14:30:36 -03:00
Daniel Augusto Veronezi Salvador
39fad2d9d7
KVM disk-only based snapshot of volumes instead of taking VM's full snapshot and extracting disks (#5297)
* Refactor create volume snapshot with running VM

* Refactor create volume snapshot with stopped VM

* Refactor create volume from snapshot

* Refactor create template from snapshot

* Refactor volume migration (migrateVolume/ migrateVirtualMachineWithVolume)

* Refactor snapshot deletion

* Refactor snapshot revertion

* Adjusts and fix cherry-pick conflicts

* Remove diffuse tests

* Add validation to add flag '--delete' on command 'virsh blockcommand' only if libvirt version is equal or higher 6.0.0

* Expunge temporary snapshot only if template creation is from snapshot

* Extract strings to constant

* Remove unused imports

* Fix error on revert backed up snapshot

* Turn method's return to void as it is not used

* Rename method in SnapshotHelper

* Fix folder creation when using SharedMountPoint pool

* Remove static import

* Remove unnused method

* Cover take snapshot in centos 7

* Handle right snapshot flag according to qemu version

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-04-12 08:14:27 -03:00
davidjumani
d949302d0f
packaging: Adding Centos8, Ubuntu 20.04, XCPNG8.1 Support (#4068)
* DB : Add support for MySQL 8

- Splits commands to create user and grant access on database, the old
statement is no longer supported by MySQL 8.x
- `NO_AUTO_CREATE_USER` is no longer supported by MySQL 8.x so remove
that from db.properties conn parameters

For mysql-server 8.x setup the following changes were added/tested to
make it work with CloudStack in /etc/mysql/mysql.conf.d/mysqld.cnf and
then restart the mysql-server process:

    server_id = 1
    sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION"
    innodb_rollback_on_timeout=1
    innodb_lock_wait_timeout=600
    max_connections=1000
    log-bin=mysql-bin
    binlog-format = 'ROW'

    default-authentication-plugin=mysql_native_password

Notice the last line above, this is to reset the old password based
authentication used by MySQL 5.x.

Developers can set empty password as follows:

    > sudo mysql -u root
    ALTER USER 'root'@'localhost' IDENTIFIED BY '';

In libvirt repository, there are two related commits

2019-08-23 13:13 Daniel P. Berrangé            ● rpm: don't enable socket activation in upgrade if --listen present
2019-08-22 14:52 Daniel P. Berrangé            ● remote: forbid the --listen arg when systemd socket activation

In libvirt.spec.in

        /bin/systemctl mask libvirtd.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-ro.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-admin.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-tls.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-tcp.socket >/dev/null 2>&1 || :

Co-authored-by: Wei Zhou <w.zhou@global.leaseweb.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-08-17 16:28:30 +05:30
Wei Zhou
92344c006d CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2 2015-08-24 11:01:50 +02:00
Edison Su
0e3aebbb9d CLOUDSTACK-5446:
delete all the leftover snapshots on primary storage in case of snapshot
errors, after a new backup snapshot is finished
2014-11-19 15:53:06 -08:00
Edison Su
f30fc6b673 need to check ccp-qemu-img 2014-08-12 15:13:42 -07:00
Edison Su
4fb4593553 CLOUDSTACK-4618: fix CLVM 2013-09-25 16:29:16 -07:00
Edison Su
bf32776f9f be able to upload template into swift 2013-07-16 18:07:06 -07:00
Edison Su
492127c035 fix kvm 2013-05-12 18:27:37 -07:00
Edison Su
263216caa5 Adds CLVM as an option for primary storage. It copies most of the RBD bits, in most cases simply adding an 'else if' or similar. In the managesnapshot.sh we add the ability to manipulate snapshots for the CLVM volumes, as well as a few minor fixes like adjusting the usage for the -b option to reflect that it accepts four arguments (note that it already accepted four args, it just wasn't reflected in the usage).
RB: https://reviews.apache.org/r/6470/
Send-by: shadowsor@gmail.com
2012-08-10 13:33:06 -07:00
David Nalley
d630fa8697 license header changes for scripts folder from Chip Childers 2012-06-23 00:58:00 -04:00
Edison Su
bafc3f2a5a CS-14521
Remove CLVM, due to license issue
2012-05-15 15:13:15 -07:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
kishan
606902ff09 Bug 11931: Add quotes to snapshot name and volume name. Fixed create template from snapshot also by adding quotes
Status 11931: resolved fixed
Reviewed-By: Nitin

Conflicts:

	scripts/storage/qcow2/createtmplt.sh
2012-02-08 17:24:17 +05:30
Edison Su
738a5927a8 quote the snapshot name 2012-01-31 16:23:34 -08:00
frank
52610ffcb3 add copyright header to shell scripts 2012-01-11 18:41:53 -08:00
Edison Su
c067763075 bug 12604: if there are actually snapshots creating on the volume, then don't move the snapshot
status 12604: resolved fixed
2011-12-20 15:12:31 -08:00
Edison Su
6841e265d3 bug 10330: finally merge Rommer's CLVM patch
status 10330: resolved fixed
2011-11-02 18:03:58 -07:00
Edison Su
8bcad6960c add rhel6.1 support 2011-07-29 20:05:01 -07:00
Frank
92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
Edison Su
c4ac92af3f fix destroy snapshot 2011-03-09 10:20:05 -05:00
Edison Su
c80335c9df bug 8783: user vm fs is crashed, use O_DIRECT instead of O_DSYNC/O_SYNC in qemu, aka cache=none. Hope we can reduce the possibility of guest vm crashed.
status 8783: resolved fixed
2011-03-01 16:38:23 -05:00
Kris McQueen
848ce60097 Merging master into 2.1.refactor, resolve the merge conflicts as best I can. New commands related to extracting template/iso/volume and related to instance groups were refactored to the new API framework. 2010-09-28 15:47:14 -07:00
Alex Huang
7249f168d5 more file changes 2010-09-09 13:27:20 -07:00
edison
3ab4651cf0 Issue #: 5978 5977 5971 5972
Status 5978: resolved fixed
Status 5977: resolved fixed
Status 5971: resolved fixed
Status 5972: resolved fixed
2010-08-25 15:27:34 -07:00
Manuel Amador (Rudd-O)
14ae76781e Committing Kris' big merge 2010-08-11 16:02:57 -07:00
Manuel Amador (Rudd-O)
ac730ec496 Branch 2.1.refactor committed 2010-08-11 09:13:42 -07:00
Manuel Amador (Rudd-O)
05c020e1f6 Source code committed 2010-08-11 09:13:29 -07:00