I am asking the GNOME forum to see if anyone else here uses GNOME Boxes and has expereience with this same issue - how to recover a password with a VM from GNOME Boxes.
I tried to boot with a recovery CD, but could not find how to reboot with USB in GNOME Boxes. Do you know how to recover a password using GNOME Boxes, like how to boot from ISO/ rescue USB?
Alternatively, do you have advice on how to recover/ change the password with a linux application (gui or terminal)?
Thank you .
Attempts to change the .qcow image file:
- I was able to start guestfish, but it did not launch.
- I tried using libguestfs-tools , which seemed to work and finish the process, but it was unsuccessful and showed errors such as:“virt-customize: warning: passwords could not be set for this type of guest” https://www.cyberciti.biz/faq/how-to-reset-forgotten-root-password-for-linux-kvm-qcow2-image-vm/
Attempts to boot from ISO rescue USB:
- GNOME Boxes does not allow me to connect the USB when the VM is turned off. When it shuts down it seems to disconnect from attached USBs. So when I try to boot from it by pushing ESC at restart, it doesn’t work.
- virt-manager doesn’t list out my GNOME Boxes VMs (for some reason) virtual machine - GNOME Boxes Boot From ISO After Installing An Operating System? - Unix & Linux Stack Exchange
[SOLUTION] Get out of GNOME Boxes and use virt-manager instead.
Thanks to this advice from a reddit user:
“It might be easier to just move your VMs from the Boxes location to where virt-manager does - /var/lib/libvirt/images. After that you just have to re-create the VMs in virt-manager, specifying the existing qcow2 file for storage rather than creating new.”
PROBLEM: In GNOME Boxes interface there is no way to change a lost password from rescue disc because the boot menu is not accessible.
SOLUTION: Move existing VM to libvirt, where you can access boot menu.
- Moved the GNOME Boxes VM image from here: ~/. local/share/gnome-boxes/
- Copied it to the libvirt location here: /var/lib/libvirt/images
- In virt-manager I created new VM importing existing data.
- From Boot Options, enable boot menu. Reboot from rescue usb.