VMware Cloud Community
bnz
Contributor
Contributor
Jump to solution

P2V for efi-based linux (debian stretch)

Hi,

I have a minipc based debian stretch linux server that I want to migrate to my vmware esxi hypervisor 6.7u2. For that purpose, I have tried the converter, but it reports "The destination does not support EFI firmware". I tried to search for solutions, but the solutions I have found range from "it should work with virtual machines >11" to disabling the EVC mode in the cluster which as far as I can see does not even exist on the free esxi hypervisor. After some frustration, I have tried to dd the harddisk to an usb stick and tried to convert the raw image to vmdk with qemu. This didn't boot either.

I'm really glad for any suggestions how to move this physical machine to the esxi server.

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
patanassov
VMware Employee
VMware Employee
Jump to solution

Hi

My wild guess would be that Converter didn't recognize DebianStretch, treated it as OtherLinux, asked vSphere whether it supports EFI for OtherLinux, which then answered 'no'.

The workaround would be to tweak the source (e.g. in /etc/os-release or /etc/debian_version) into reporting something else ('debian' should do).

You may try it or, if you want a less blind guess, post the worker log.

HTH,

Plamen

View solution in original post

Reply
0 Kudos
5 Replies
patanassov
VMware Employee
VMware Employee
Jump to solution

Hi

My wild guess would be that Converter didn't recognize DebianStretch, treated it as OtherLinux, asked vSphere whether it supports EFI for OtherLinux, which then answered 'no'.

The workaround would be to tweak the source (e.g. in /etc/os-release or /etc/debian_version) into reporting something else ('debian' should do).

You may try it or, if you want a less blind guess, post the worker log.

HTH,

Plamen

Reply
0 Kudos
bnz
Contributor
Contributor
Jump to solution

That guess seems pretty educated to me as it is true. Once I changed the version number to something like Debian 8, the detection started working. However, the whole process still didn't go through as expected and failed somewhere at grub-install. I guess I'll try it somehow differently as it seems to cause too much trouble with the converter.

Thanks for the hint anyway!

Reply
0 Kudos
patanassov
VMware Employee
VMware Employee
Jump to solution

Well, so the guess was right. This is good. That reconfiguration failed is not good, though not much of a surprise, as Debian, although recognized by Converter, is not supported, while Stretch  not even that.

If you feel like giving Converter one more try, you could retain the converted VM and reconfigure it manually. First disable deleting the destination VM on failure (see VMware Knowledge Base​​ ), attach a live CD ISO, e.g. the installation ISO for the source Debian Stretch, boot in rescue mode (or however it is called), then install GRUB and create the initramfs (as bash commands). Hopefully that ought to work.

P.S. You may also need to touch network config files, especially if they contain MAC addresses and predictable iface names. Those are changed during conversion.

Reply
0 Kudos
bnz
Contributor
Contributor
Jump to solution

Hi,

that is what I tried for some time and unfortunately failed in doing so. It seems the EFI partition wasn't transfered by Converter so I tried to convert back to bios-based booting which was a mess and didn't work out for unknown reasons. I have to setup the complete EFI bootloading and recreate the EFI partition. Maybe I'll try again at the weekend.

Reply
0 Kudos
patanassov
VMware Employee
VMware Employee
Jump to solution

Hi,

Sorry, didn't guess it could be EFI. The EFI system partition has actually been cloned by Converter. What is missing is a boot entry. You can create it with efibootmgr.

Another possible issue - if you have SELinux, you'll need to initiarte relabelling (touch /.autorelabel)

HTH

Reply
0 Kudos