VM will not boot after exporting from ESXi in VirtualBox

General support questions
fishface
Posts: 27
Joined: 2016/08/02 15:47:42

VM will not boot after exporting from ESXi in VirtualBox

Post by fishface » 2018/10/16 14:11:05

I have a ESXi VMWare Centos7 VM which I exported from ESXi using the Template > Export OVF Template function, I then import this into Virtualbox but it fails to boot correctly, it says the following

Code: Select all

[dracut-initqueue[263]: Warning: Could not boot.
dracut-initqueue[]: Warning: /dev/mapper/vg00-root root does not exist.
dracut-initqueue[263]: Warning: /dev/mapper/vg00 /swap does not exist.
dracut-initqueue[263]: Warning: /dev/mapper/root does not exist.
Starting Dracut Emergency Shell...
Warning: /dev/mapper/vg00-root does not exist
Warning: /dev/vg00/root does not exist
Warning: /dev/vg00/swap does not exist

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.
If I boot into rescue mode by selecting the option in the GRUB2 menu it boots fine and all is mounted auto magically, and it works just like if it had been a normal boot-up.

The VM is Centos7.5.1804, it works fine on many hosts in an ESXi environment, it has no GUI or anything, a very minimal OS.

Any help appreciated.

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by tunk » 2018/10/16 14:32:26

I have no experience moving VMs, so this is just a guess; maybe the virtual hardware isn't the same in VMWare and Virtualbox.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by TrevorH » 2018/10/16 14:58:38

You need to boot the rescue kernel and run dracut --kver 3.10.0-862.14.4.el7.x8_64 (or whatever your real current kernel is). The initramfs contains hardware support and it's built at kernel install time specific to the hardware that you ran the install on.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

fishface
Posts: 27
Joined: 2016/08/02 15:47:42

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by fishface » 2018/10/17 13:31:05

I tried your suggested and no joy.

Seeing as it works fine when using the rescue kernel, is there a way I can copy the rescue kernel to be the kernel to use for a normal boot?

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by tunk » 2018/10/17 13:37:58

What's the output of: ls -l /boot/vm* /boot/initram*
And what dracut command did you use?

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by TrevorH » 2018/10/17 14:05:05

I tried your suggested and no joy.
What did you run exactly and what was the output from it?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

fishface
Posts: 27
Joined: 2016/08/02 15:47:42

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by fishface » 2018/10/17 15:09:19

I select the first option in the GRUB2 menu, the one it would normally boot from, and then added systemd.unit=rescue.target parameter to the linux16 line, then Ctrl+X then ran dracut --k 3.10.0-693.el7.x86_64, it ran for around 30secs, no output, and then the cursor re-appeared, no errors or anything, I then rebooted.


]https://photos.app.goo.gl/6rycom3uRPrXroEF8

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by tunk » 2018/10/17 15:36:53

Could you try to run dracut with/on the newest kernel?

fishface
Posts: 27
Joined: 2016/08/02 15:47:42

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by fishface » 2018/10/17 16:13:11

I got the kernel version from the output of uname, which shows it as 3.10.0-693.el7.x86_64, but as you noticed, during boot GRUB2 shows several newer ones, I missed that detail.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: VM will not boot after exporting from ESXi in VirtualBox

Post by TrevorH » 2018/10/17 16:29:12

Yes. The rescue kernel uname is different as it's created at install time. You need to know and use the latest kernel that's installed - rpm -q kernel will show all of them (oddly random order so make sure you pick the latest)
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply