New Question
0

Hyper-V instance resize

asked 2019-04-17 19:38:25 +0300

laurodias1 gravatar image

Hi

In our environment, we have an OpenStack Ocata controller and Clustered Microsoft Hyper-V nodes (Windows Server 2016 Datacenter). The compute management is made using the HyperVClusterDriver provided by cloudbase.it and it works quite well. However, we are facing some - intermitent - problems during instance resizing. In some cases, it works ok, in another, it fails.

During the process, the virtual machine is removed from Failover Cluster and Hyper-V Manager and, if the process works good, imported again, with the new configuration. If the process fails, OpenStack sets ERROR in the instance status and didn't returns the instance to the hypervisor.

Based on that, there are some questions:

  1. Is it possible to configure the system to execute the process without removing and including the instance in the hypervisor? If not, is it possible to recreate/import the instance after the error?
  2. What are the configurations related to instance resize?

Thank you in advance.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-04-19 18:21:04 +0300

lpetrut gravatar image

updated 2019-04-19 18:38:55 +0300

Hi,

Resizes and cold migrations follow the same workflow, which goes like this:

  • the vm is unclustered
  • the instance files are moved to a temporary location (having the "_revert" suffix). Those are the original files, which can be used to revert the migration/resize, if needed
  • the original vm is deleted from the hyper-v inventory (but not its files)
  • the instance files are now copied to their destination (which may or may not be on the same host/location)
  • image files (as well as other resources) are resized, if requested and the instance is imported on the destination and clustered again.
  • the backup files are removed when the migration is confirmed

The main advantages of this workflow are that:

  • it allows recovering the unaltered instance files in case of resize/migration failures
  • it doesn't rely on hyper-v assisted migrations nor shared storage, simplifying the deployment and its requirements
  • the destination host pulls the files, so the source doesn't have to know where the instance will be placed, nor have access to the new location
  • the workflow is more or less the same both in the situation in which the instance is resized on the same host, as well as migrations that don't actually involve resizes

We're aware that this comes with a couple of disadvantages that may be addressed in the future:

  • the instance files are copied to a backup location even if shared storage is used and the instance is just migrated yet not resized
  • the instance is removed from the failover cluster and hyper-v inventories. This comes from the fact that we're not using the standard Hyper-V migration APIs.

To answer your questions: it's possible to recover the instance. The required actions depend on which step failed:

  • are the instance files copied at their destination? if not (or you'd like to use the original files), copy them from the '*_revert' dir.
  • import the vm to the hyper-v inventory as well as failover cluster. You may simply use import-vm and add-vmtocluster
  • update the nova state (double check the vm state as well as the host set in the Nova DB)
  • are you using OVS? If so, you'd need to either re-attach the ovs ports manually or simply restart nova-compute after importing the vm to have Nova automatically reattach the port
  • double check your instance. if everything worked as expected, feel free to remove the backup files
  • for more recent releases that make use of the placement service, the placement inventories would have to be checked, making sure that the allocations are set against the right provider (host) and that the resource quantities are correct.

The nova revert-resize command won't help too much in this situation. While some docs state that it can be used to recover failed resizes, it doesn't accept instances that are in ERROR state or instances that have been cold migrated and not resized (which may be considered a Nova limitation).

There are a couple of ... (more)

edit flag offensive delete link more

Comments

Hi Lucian, I really appreciate your response. I will review the configurations related to live/cold migration as suggested. As the problem is intermitent, I'll keep monitoring it and will check if I can find something in the hypervisor logs. Any update I let you know. Thank you very much!

laurodias1 gravatar imagelaurodias1 ( 2019-04-23 16:42:04 +0300 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-04-17 19:38:25 +0300

Seen: 327 times

Last updated: Apr 19 '19