« Previous | Next » 

Revision 5f045eb8

ID5f045eb857e5aa617689a5f9f4334a109234763b

Added by Apollon Oikonomopoulos about 10 years ago

(2.10) KVM: use running HVPs to calc blockdev options

Commit 0fe22ad2 moved the call to _GenerateKVMBlockDevicesOptions() from
_GenerateKVMRuntime() to _ExecuteKvmRuntime. However, while in
_GenerateKVMRuntime() there is only one set of HVPs, those of the
instance's configuration, in _ExecuteKVMRuntime there are two sets of
HVPs:

- The instance's configured HVPs
- The HVPs the instance used when it was started

Currently, _GenerateKVMBlockDevicesOptions() uses the first set of HVPs
only, meaning that it will always read the configured HVPs. Since
_ExecuteKVMRuntime() is also called at migration time, it should use the
instance's running HVPs, otherwise migration while fail.

The following scenario will lead to a crash on migration:

1. Start the instance (assuming 'paravirtual' disk_type)
2. gnt-instance modify -H disk_type=scsi <instance_name>
3. gnt-instance migrate <instance_name>

Step 3 will start the instance on the remote node with all disks
configured as 'scsi' and qemu will crash post-migration.

We fix this by making sure _GenerateKVMBlockDevicesOptions gets the
running HVPs as well.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Thomas Thrainer <>
Reviewed-by: Thomas Thrainer <>
Signed-off-by: Dimitris Aragiorgis <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences