1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/openeuler-stratovirt

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
stratovirt-img.md 2.2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
yexiao Отправлено год назад d89d858

stratovirt-img

stratovirt-img is an offline tool for virtual disks.

Usage:

stratovirt-img command [command options]

Command parameters:

  • img_path: the path for image.
  • fmt: disk format.
  • img_size: size for image, the unit can be K, M, G or none for bytes.
  • options is a comma separated list of format specific options in a name=value format.

Following commands are supported now:

Create

Create virtual disk with different format. Command syntax:

create [-f fmt] [-o options] img_path img_size

Sample Configuration:

stratovirt-img create -f raw img_path img_size
stratovirt-img create -f qcow2 -o cluster-size=65536 img_path img_size

Note: 1. The cluster size can be only be set for qcow2 or default to 65536. 2. Disk format is default to raw.

Check

Check if there are some mistakes on the image and choose to fix. Command syntax:

check [-r {leaks|all}] [-no_print_error] [-f fmt] img_path
  • -r: leaks means only the leaked cluster will be fixed, all means all repairable mistake will be fixed.
  • -no_print_error: do not print detailed error messages.

Sample Configuration:

stratovirt-img check img_path

Note: The command of check is not supported by raw format.

Resize

Change the virtual size of the disk.

  • +sizemeans increase from old size, while size means resize to new size.

Command syntax:

resize [-f fmt] img_path [+]size

Sample Configuration:

stratovirt-img resize -f qcow2 img_path +size
stratovirt-img resize -f raw img_path +size

Note: Shrink operation is not supported now.

Snapshot

Operating internal snapshot for disk, it is only supported by qcow2. Command syntax:

snapshot [-l | -a snapshot_name | -c snapshot_name | -d snapshot_name] img_path
  • -a snapshot_name: applies a snapshot (revert disk to saved state).
  • -c snapshot_name: creates a snapshot.
  • -d snapshot_name: deletes a snapshot.
  • -l: lists all snapshots in the given image.

Sample Configuration:

stratovirt-img snapshot -c snapshot_name img_path
stratovirt-img snapshot -a snapshot_name img_path
stratovirt-img snapshot -d snapshot_name img_path
stratovirt-img snapshot -l img_path

Note: The internal snapshot is not supported by raw.

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/openeuler-stratovirt.git
git@gitlife.ru:oschina-mirror/openeuler-stratovirt.git
oschina-mirror
openeuler-stratovirt
openeuler-stratovirt
master