COA icon indicating copy to clipboard operation
COA copied to clipboard

libvirt & guestfish : Cannot run the image : Original error from libvirt: Cannot access storage file '/root/debian-9.1.1-20170725-openstack-amd64.qcow2' (as uid:107, gid:107): Permission denied [code=38 int1=13]

Open AJNOURI opened this issue 6 years ago • 2 comments

I would like to change the password of the default login username on Xenial from the image using guestfish

[root@devstack1 ~]# guestfish --rw -a debian-9.1.1-20170725-openstack-amd64.qcow2

Welcome to guestfish, the guest filesystem shell for editing virtual machine filesystems and disk images.

Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell

run ◓ 25% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒════════════════════════════════════════════════════════════════════════⟧ --:-- libguestfs: error: could not create appliance through libvirt.

Try running qemu directly without libvirt using this environment variable: export LIBGUESTFS_BACKEND=direct

Original error from libvirt: Cannot access storage file '/root/debian-9.1.1-20170725-openstack-amd64.qcow2' (as uid:107, gid:107): Permission denied [code=38 int1=13]

AJNOURI avatar Aug 05 '17 01:08 AJNOURI

I moved the images to /var/lib/libvirt/images as instructed here http://www.cloudkb.net/change-root-password-kvm-qcow2-image/

mv debian-9.1.1-20170725-openstack-amd64.qcow2 /var/lib/libvirt/images/debian-9.1.1-20170725-openstack-amd64.qcow2

Now I got another error:

[root@devstack1 images]# guestfish --rw -a debian-9.1.1-20170725-openstack-amd64.qcow2

Welcome to guestfish, the guest filesystem shell for editing virtual machine filesystems and disk images.

Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell

run libguestfs: error: could not create appliance through libvirt.

Try running qemu directly without libvirt using this environment variable: export LIBGUESTFS_BACKEND=direct

Original error from libvirt: internal error: process exited while connecting to monitor: qemu-kvm: /builddir/build/BUILD/qemu-2.6.0/target-i386/kvm.c:1736: kvm_put_msrs: Assertion `ret == n' failed. [code=1 int1=-1]

AJNOURI avatar Aug 05 '17 01:08 AJNOURI

Hi, did you got around this issue?

Masber avatar Mar 13 '19 02:03 Masber