slavkap commented on code in PR #9270: URL: https://github.com/apache/cloudstack/pull/9270#discussion_r1741711850
########## plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java: ########## @@ -159,6 +178,49 @@ public class KVMStorageProcessor implements StorageProcessor { */ private long waitDelayForVirshCommands = 1000l; + private int incrementalSnapshotTimeout; + + private static final String CHECKPOINT_XML_TEMP_DIR = "/tmp/cloudstack/checkpointXMLs"; + + private static final String BACKUP_XML_TEMP_DIR = "/tmp/cloudstack/backupXMLs"; + + private static final String BACKUP_BEGIN_COMMAND = "virsh backup-begin --domain %s --backupxml %s --checkpointxml %s"; + + private static final String BACKUP_XML = "<domainbackup><disks><disk name='%s' type='file'><target file='%s'/><driver type='qcow2'/></disk></disks></domainbackup>"; + + private static final String INCREMENTAL_BACKUP_XML = "<domainbackup><incremental>%s</incremental><disks><disk name='%s' type='file'><target file='%s'/><driver type='qcow2'/></disk></disks></domainbackup>"; + + private static final String CHECKPOINT_XML = "<domaincheckpoint><name>%s</name><disks><disk name='%s' checkpoint='bitmap'/></disks></domaincheckpoint>"; + + private static final String CHECKPOINT_DUMP_XML_COMMAND = "virsh checkpoint-dumpxml --domain %s --checkpointname %s --no-domain"; + + private static final String DOMJOBINFO_COMPLETED_COMMAND = "virsh domjobinfo --domain %s --completed"; + + private static final String DOMJOBABORT_COMMAND = "virsh domjobabort --domain %s"; + + private static String CHECKPOINT_DELETE_COMMAND = "virsh checkpoint-delete --domain %s --checkpointname %s"; + + private static final String DUMMY_VM_XML = "<domain type='qemu'>\n" + Review Comment: thanks, @JoaoJandre, all looks good! I don't know if the emulator should be mandatory. Here is my dummy XML: ``` <domain type='qemu'> <name>DUMMY-VM-23ae60aa-be86-4a7a-a544-0315c1b3d4b4</name> <memory unit='MiB'>256</memory> <currentMemory unit='MiB'>256</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <devices> <emulator></emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/mnt/b206833c-4a77-3b14-9de5-3ac91cc6c417/0bfab443-f9a3-4c67-9fd2-6fc77e8afa60'/> <target dev='sda'/> </disk> <graphics type='vnc' port='-1'/> </devices> </domain> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org