여러 디스크로 인해 virsh/qemu 외부 스냅샷이 실패함

여러 디스크로 인해 virsh/qemu 외부 스냅샷이 실패함

나는 이 문제에 직면했고 내 연구에서 답을 찾지 못했습니다. SuperUser에도 비슷한 게시물이 있지만 거의 10개월 동안 답변은커녕 댓글도 없었습니다. 아마도 이것은 Linux의 KVM/virsh/QEMU와 관련되어 있기 때문에 가장 적합한 장소가 아닐 수도 있습니다.

잘 작동합니다:

sudo virsh snapshot-create-as --domain TEST_RUNNINGDISKS --name "backup-TEST_RUNNINGDISKS" --no-metadata --atomic --disk-only --diskspec vda,snapshot=external

작동하지 않습니다:

sudo virsh snapshot-create-as --domain TEST_RUNNINGDISKS --name "backup-TEST_RUNNINGDISKS" --no-metadata --atomic --disk-only --diskspec vda,snapshot=external --diskspec vdb,snapshot=external

반품:

error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

이것도 QEMU QMP를 이용해서 직접 시도해봤습니다.

스크립트:

#!/bin/sh
TEST='{"execute":"transaction","arguments":{"actions":[{"type":"blockdev-snapshot-sync","data":{"device":"drive-virtio-disk0","snapshot-file":"/media/data/kvm/TEST_RUNNINGDISKS-backup.qcow2"}},{"type":"blockdev-snapshot-sync","data":{"device":"drive-virtio-disk1","snapshot-file":"/media/data/kvm/TEST_RUNNINGDISKS-1-backup.qcow2"}}]}}'
virsh qemu-monitor-command TEST_RUNNINGDISKS --pretty $TEST

실수:

sudo ./test.sh
{  "id": "libvirt-83",  "error": {    "class": "GenericError",
    "desc": "Could not create file: Permission denied"
  }
}

답변1

문제를 발견했습니다. Ubuntu 18.04 패키지에 포함된 qemu-kvm 버전은 2.11입니다.진짜이전 버전에는 이런 방식으로 여러 디스크를 처리할 수 있는 기능이 없었습니다. qemu-kvm 버전 4.2가 포함된 20.04를 지우고 다시 로드했습니다. 증상이 사라졌습니다.

관련 정보