Debian 12 VM imported from VMware: local root login fails, but mount -a fixes missing filesystems

_Ernesto_

Active Member
Dec 12, 2019
4
0
41
43
Hi everyone,

I'm migrating several Debian 12 virtual machines from VMware to Proxmox VE using qm importdisk.

Most of the VMs booted correctly, while a few had boot issues after the import. For those VMs I solved the problem by booting into emergency mode and running:

mount -o remount,rw /
mount -a
mount --bind /dev /dev
mount --bind /proc /proc
mount --bind /sys /sys
update-initramfs -u -k all
update-grub
passwd root
sync
reboot -f

After this procedure, all the other VMs started working normally.

However, there is one Debian 12 VM that still has problems.

Symptoms​

  • The VM boots successfully until the text login prompt.
  • Some filesystems listed in /etc/fstab are not mounted automatically during boot.
  • If I enter the emergency shell and run:
mount -a
all filesystems are mounted correctly without any errors.

I have already verified:

  • /etc/fstab contains the correct UUIDs.
  • The filesystem types are correct.
  • The mount points are correct.
  • journalctl -b -p err reports no errors.

Login problem​

After boot, the console login prompt appears normally, but logging in as the local root user always fails.

Important details:

  • This is not an LDAP login.
  • Root is a local account.
  • I am logging in through the Proxmox console.
  • I even changed the root password from the emergency shell using passwd root, but after reboot the login still fails.
  • The login attempt takes several seconds before returning "Login incorrect".
The VM does use LDAP for normal users, but root is defined locally.

Migration details​

  • Source: VMware
  • Destination: Proxmox VE
  • Import method: qm importdisk
  • Guest OS: Debian 12
Since mount -a succeeds without errors and there are no errors in the journal, I'm not sure whether this is:

  • an initramfs issue,
  • a storage/controller issue after the VMware migration,
  • a PAM/NSS authentication issue,
  • or something else.
Has anyone experienced something similar after migrating a Debian VM from VMware to Proxmox?

What additional logs or checks would you recommend to identify the root cause?

Thanks in advance for any suggestions.
 
I had a different issue while importing Debian11 and Ubuntu 12, for me it didn't boot at all, and only after switching to SATA it worked.
therefore this is Just my 2 cent here, I would try since its quick change to switching the virtual disk bus to SATA:
Shut down the VM.
From the VM -> Hardware. Select your hard drive, click Detach.
Select the Unused Disk, click Edit. Change the Bus/Device type from SCSI/VirtIO to SATA.
Verify the boot order and test to start the VM.
 
Hi Longer,

Thank you very much for your reply. I tried following your suggestion and changed the controller from SCSI to SATA, but unfortunately this didn't solve the problem. The machine is still behaving in exactly the same way...