Skip to content

Commit

Permalink
QCOW2 images for VMs should be created with subclusters enabled #PSBM…
Browse files Browse the repository at this point in the history
…-131094

L2 subcluster is an extension for qcow2 format:

- it saves on disk space if the subcluster will contain hole
- it improves backup speed
  • Loading branch information
Yuriy Pudgorodskiy authored and dmission committed Jul 15, 2021
1 parent 8165198 commit ba14b5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dispatcher/Dispatcher/Tasks/Task_MigrateVmTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ void Frontend::create(const CVmHardDisk& event_)
}
QStringList a;
a << "create" << "-f" << "qcow2";
a << "-o" << "cluster_size=1M,lazy_refcounts=on";
a << "-o" << "cluster_size=1M,lazy_refcounts=on,extended_l2=on";
a << event_.getSystemName();
a << QString::number(event_.getSize()).append("M");

Expand Down
2 changes: 1 addition & 1 deletion Dispatcher/Dispatcher/Tasks/Task_RestoreVmBackupTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ PRL_RESULT Assistant::operator()(const QString& image_, const QString& archive_,
QStringList cmdline = QStringList() << QEMU_IMG << "convert" << "-O" << format_
<< "-S" << "64k" << "-t" << "none";
if (format_ == "qcow2")
cmdline << "-f" << "raw" << "-o" << "cluster_size=1M,lazy_refcounts=on";
cmdline << "-f" << "raw" << "-o" << "cluster_size=1M,lazy_refcounts=on,extended_l2=on";
cmdline << e.value() << image_;

Program::result_type q = Program::execute(cmdline, *m_task);
Expand Down

0 comments on commit ba14b5b

Please sign in to comment.