I have a virtual ubuntu machine which I can not access any more. Some how the admin password does not work.
On a physical machine you could change the root/admin password in the early boot phase. Issue is that I do not manage to access the VM in that early boot stage.
So the only option seems to be to convert the VM-disk to a phyical disk and boot that disk on a physical machine.
So the big question is how to convert a ZVOL to a (bootable) physical disk.
During a few weeks I have been working on rebuilding the lost VM. Not yet done. What ever!
There should be a simple way to access a VM from the very first moment the VM starts. As it is now you start the vm and only after the moment the VM has become active you can access the VM-console or gui. That is to late to make changes as .e.g. required to recover the root password the way which should be possible on a physical machine.
As it stands now all kind of tricks to get to the VM via editing or moving the VM to a physical machine are just to complicated.
So I will rebuild the VM from the start, a lot of work! I will do some improvements during the process that is the positive part.
Normally this situation would not occur since normally you reload a snapshot. But I did delete snapshots not foreseeing this issue, in order to return to a more stable situation a months back.
What ever I would highly appreciate an option to have vm access in the very early phase of the boot process.
In the bad old days, Linux let you add “single” to the kernel line in Grub. That booted single user mode, which did not require a password.
Don’t think that has been an option for at least 10 years. At work we had to boot a RHEL ISO image, which allowed recovery of the VM’s data. (Even if on LVM or MD-RAID devices…) Which did occasionally include resetting the “root” password, or other OS related work.
Depending on security options, even just editing the Grub kernel line could be prevented without the Grub password. That was another reason I’ve used RHEL ISO images for VM recoveries.
Thank you. Well, concerning the OPs problem, booting the VM from another ISO image is perfectly possible in TrueNAS. For that, the ISO just has to be added as another device in the VM with lower device order than the original disk.