Cannot resize VM to a different compute node when using hyperv_utils_v2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
High
|
Feng Ju | ||
| Havana |
Undecided
|
Unassigned |
Bug Description
The bug is when you resize a VM to another compute node using Hyper-V VMUtilsV2, there will be an exception in the compute node which the VM located before resizing.
The exception is "Cannot find boot VHD file for instance: instance-0000000e".
After debuged, the issue maybe in funtion get_vm_
If using Hyper-V v1, the get_vm_
[u'Microsoft Virtual Keyboard',
u'Microsoft Virtual PS2 Mouse',
u'Microsoft S3 Display Controller',
u'Microsoft Synthetic Diskette Drive',
None,
u'Microsoft Serial Controller',
u'Microsoft Serial Port',
u'Microsoft Serial Port',
u'Microsoft Synthetic Disk Drive',
u'Microsoft Virtual Hard Disk',
u'Microsoft Synthetic DVD Drive',
u'Microsoft Virtual CD/DVD Disk',
u'Microsoft Emulated IDE Controller',
u'Microsoft Emulated IDE Controller',
u'Microsoft Synthetic Mouse',
u'Microsoft Synthetic Display Controller',
u'Microsoft Synthetic SCSI Controller']
If using Hyper-V v2, the get_vm_
Microsoft:
Microsoft:
Microsoft:
Microsoft:
None
Microsoft:
Microsoft:
Microsoft:
Microsoft:
Microsoft:
Microsoft:
Microsoft:
Microsoft:
Microsoft:
Microsoft:
I also find in Hyper-V v2 I can find Microsoft Virtual Hard Disk from class Msvm_StorageAll
Maybe the Hyper-V v2 api changed, but the codes in nova didn't change.
Feng Ju (jufeng) wrote : | #1 |
Feng Ju (jufeng) wrote : | #2 |
I debuged Hyper-V V1 API and Hyper-V V2 API for function get_vm_
I set breakpoint at function get_vm_
When using Hyper-V v1 API:
(Pdb) pp [r.ResourceSubType for r in rasds]
[u'Microsoft Virtual Keyboard',
u'Microsoft Virtual PS2 Mouse',
u'Microsoft S3 Display Controller',
u'Microsoft Synthetic Diskette Drive',
None,
u'Microsoft Serial Controller',
u'Microsoft Serial Port',
u'Microsoft Serial Port',
u'Microsoft Synthetic Disk Drive',
u'Microsoft Virtual Hard Disk',
u'Microsoft Synthetic DVD Drive',
u'Microsoft Virtual CD/DVD Disk',
u'Microsoft Emulated IDE Controller',
u'Microsoft Emulated IDE Controller',
u'Microsoft Synthetic Mouse',
u'Microsoft Synthetic Display Controller',
u'Microsoft Synthetic SCSI Controller']
(Pdb) jf = vmsettings[
(Pdb) pp [r.ResourceSubType for r in jf]
[]
There is 'Microsoft Virtual Hard Disk' in rasds' ResourceSubType and not i jf.
When using Hyper-V v2 API:
(Pdb) pp [r.ResourceSubType for r in rasds]
[u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
None,
u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
u'Microsoft:
(Pdb) jf = vmsettings[
(Pdb) pp [r.ResourceSubType for r in jf]
[u'Microsoft:
u'Microsoft:
(Pdb) pp ["obj.%s = %s" % (p, getattr(jf[0], p)) for p in jf[0]._properties]
[u'obj.
u'obj.
u'obj.InstanceID = Microsoft:
u'obj.
u'obj.
u'obj.Access = None',
u"obj.HostResource = (u'd:\\
u'obj.
u'obj.
u'obj.ElementName = Hard Disk Image',
u'obj.Description = Settings for the Microsoft Hard Disk Image.',
u'obj.Parent = \\\\ABBA-
8141B-6228-
u'obj.
u'obj.
u'obj.
u'obj.PoolID = ',
u'obj.
u'obj.Reservation = 1',
u'obj.
u'obj.
u'obj.
u'obj.Address = None',
u'obj.
u'obj.OtherRe...
Feng Ju (jufeng) wrote : | #3 |
code review is here https:/
Changed in nova: | |
status: | New → In Progress |
assignee: | nobody → Feng Ju (jufeng) |
Fix proposed to branch: stable/havana
Review: https:/
Changed in nova: | |
importance: | Undecided → High |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 6847a0ef927929e
Author: jufeng <email address hidden>
Date: Thu Nov 7 14:12:36 2013 +0800
Fixes get_vm_
Add get_vm_
get_
compared to previous V1 API. In previous V1 APIs, using
Msvm_
paths, but in V2 API, only using Msvm_StorageAll
class can get the storage paths.
Closes-Bug: #1248463
Change-Id: Ica73221524f162
Changed in nova: | |
status: | In Progress → Fix Committed |
Alessandro Pilotti (alexpilotti) wrote : | #6 |
Feng Ju, this one needs to be backported to Havana.
Would you like to commit the Havana patch? If not I can do it of course.
Thanks!
Alessandro
tags: | added: havana-backport-potential |
Changed in nova: | |
milestone: | none → icehouse-2 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: stable/havana
Review: https:/
Alessandro Pilotti (alexpilotti) wrote : | #9 |
The Havana branch proposed patch is here:
https:/
The bug page didn't get updated.
Changed in nova: | |
milestone: | icehouse-2 → 2014.1 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: stable/havana
commit 65fedbdd9a250d3
Author: Feng Ju <email address hidden>
Date: Thu Jan 30 15:59:13 2014 +0800
Fixes get_vm_
Add get_vm_
get_
compared to previous V1 API. In previous V1 APIs, using
Msvm_
paths, but in V2 API, only using Msvm_StorageAll
class can get the storage paths.
Closes-Bug: #1248463
Change-Id: Ica73221524f162
(cherry picked from commit 6847a0ef927929e
tags: | added: in-stable-havana |
If I change Msvm_ResourceAl locationSetting Data in get_vm_ storage_ paths function in vmutils.py to Msvm_StorageAll ocationSettingD ata, the disk_resource. Connection at line 398 will be null in get_vm_ storage_ paths function in vmutils.py. Connection will be something like this (u'd:\\ hyper-v\ \instances\ \instance- 0000001d\ \root.vhd' ,)
In Hyper-V v1 the disk_resource.