New Question

Revision history [back]

click to hide/show revision 1
initial version

Hello Luc,

Just a small bit of information about how cold resize / migration generally works. Pretty much all of the Nova drivers are destroying VM on the source, copying the disks to the destination (FYI, this step takes the most time, especially if the disk is quite big), and recreating the VM at the destination with the copied disk. I think this might be part of the problem you're experiencing, but it shouldn't have been one in the first place. Anyways, we've changed the behaviour of how cold migration / resize works in Pike and the VMs are now exported / imported instead, keeping all of the VM configurations.

Now, I have some questions about the VM. When you say that the instance wasn't able to boot due to missing EFI, do you mean that the *.efi file is missing from the guest's /boot folder? I would assume not. And on the VM on which you've (re)installed the shim.efi file, can you execute this command on?

Get-VM  vm_name | Get-VMFirmware | fl *

Finally, how did you prepare the Centos image before uploading it to Glance (especially the EFI part)? For example, for Ubuntu images, you'll have to rename the EFI file before the image will be usable in any new VMs.

Best regards,

Claudiu Belu

Hello Luc,

Just a small bit of information about how cold resize / migration generally works. Pretty much all of the Nova drivers are destroying VM on the source, copying the disks to the destination (FYI, this step takes the most time, especially if the disk is quite big), and recreating the VM at the destination with the copied disk. I think this might be part of the problem you're experiencing, but it shouldn't have been one in the first place. Anyways, we've changed the behaviour of how cold migration / resize works in Pike and the VMs are now exported / imported instead, keeping all of the VM configurations.

Now, I have some questions about the VM. When you say that the instance wasn't able to boot due to missing EFI, do you mean that the *.efi file is missing from the guest's /boot folder? I would assume not. And on the VM on which you've (re)installed the shim.efi file, can you execute this command on?

Get-VM  vm_name | Get-VMFirmware | fl *

Finally, how did you prepare the Centos image before uploading it to Glance (especially the EFI part)? For example, for Ubuntu images, you'll have to rename the EFI file before the image will be usable in any new VMs.VMs. [1]

[1] https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/supported-ubuntu-virtual-machines-on-hyper-v

Best regards,

Claudiu Belu

Hello Luc,

Just a small bit of information about how cold resize / migration generally works. Pretty much all of the Nova drivers are destroying VM on the source, copying the disks to the destination (FYI, this step takes the most time, especially if the disk is quite big), and recreating the VM at the destination with the copied disk. I think this might be part of the problem you're experiencing, but it shouldn't have been one in the first place. Anyways, we've changed the behaviour of how cold migration / resize works in Pike and the VMs are now exported / imported instead, keeping all of the VM configurations.

Now, I have some questions about the VM. When you say that the instance wasn't able to boot due to missing EFI, do you mean that the *.efi file is missing from the guest's /boot folder? I would assume not. And on the VM on which you've (re)installed the shim.efi file, can you execute this command on?

Get-VM  vm_name | Get-VMFirmware | fl *

Finally, how did you prepare the Centos image before uploading it to Glance (especially the EFI part)? For example, for Ubuntu images, you'll have to rename the EFI file before the image will be usable in any new VMs. [1]

[1] https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/supported-ubuntu-virtual-machines-on-hyper-v

Best regards,

Claudiu Belu

EDIT:

So, looking at your paste, it is what I actually thought: Your VM's BootOrder contains a, EFI file in it (1st item in the list). When the VM is recreated on Ocata or older, that entry is lost. As I've mentioned, thi behaviour was changed in Pike, so using Pike would solve your issue on cold resize / migration, but it would still affect you when using operations which imply destroying / recreating the VMs (e.g.: shelve / unshelve).

The best way to solve this issue is to properly prepare the images. The BootOrder shouldn't have to contain the EFI file in order for the VM to properly boot. Template images should be prepared is such a way that it doesn't rely on it (see the Ubuntu example). From your comment, it seems that you didn't change / update the EFI in any way.

Doing a quick search [2], Centos requires a small change when it comes to the EFI file:

The proper way as I tested it (run it on your own risk, take backups first and I am not responsible for this):

In the Linux VM:

> cd /boot/efi/EFI
> cp /{your_linux_type}/* ./BOOT/ (For example, on centos this would be: cp /centos/* ./BOOT/)

Let us know how it works out for you.

[2] https://blogs.msdn.microsoft.com/virtualpcguy/2015/02/11/copying-the-vhd-of-a-generation-2-linux-vmand-not-booting-afterwards/