-
Notifications
You must be signed in to change notification settings - Fork 1.3k
server: select root disk based on user input during vm import #4591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: select root disk based on user input during vm import #4591
Conversation
|
@blueorangutan package @DK101010 I've drafted this PR to add an optional param for selecting root disk while import |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2544 |
|
@shwstppr if this is a bugfix, pl change branch to 4.15 and milestone to 4.15.1.0 |
@shwstppr Great, for me it looks good. If you want then I can test it in my environment this week. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2545 |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2546 |
4240c54 to
9d532af
Compare
|
@rhtyd done @DK101010 I'm also deliberating of a way to select correct root disk without adding new param in API. For API, we already need to pass a diskid-diskoffering map for all data disks so with that info we can simply select the remaining disk as the root disk (will have to refactor some error messages and change the logic). Does that make sense? |
@shwstppr I'm not quite sure if I understand you right. The VCenter give you a list that enables you to find the right root disk? The diskoffering-map in CS will be created based on the collection sort algo. in my last PR and is wrong in case of that the HardDisk1 is not the root disk. (When I remind me right) |
Signed-off-by: Abhishek Kumar <[email protected]>
9d532af to
020c42a
Compare
|
@DK101010 I've refactored logic for handling disks and |
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2585 |
I'm a little bit skeptical regards the offeringMap :D but I will test it this week. |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3416)
|
|
@shwstppr I've tested it in our environment and it works perfectly. |
* 4.14: server: select root disk based on user input during vm import (#4591) kvm: Use Q35 chipset for UEFI x86_64 (#4576) server: fix wrong error message when create isolated network without SourceNat (#4624) server: add possibility to scale vm to current customer offerings (#4622) server: keep networks order and ips while move a vm with multiple networks (#4602) server: throw exception when update vm nic on L2 network (#4625) doc: fix typo in install notes (#4633)
* 4.15: server: select root disk based on user input during vm import (#4591) kvm: Use Q35 chipset for UEFI x86_64 (#4576) server: fix wrong error message when create isolated network without SourceNat (#4624) server: add possibility to scale vm to current customer offerings (#4622) server: keep networks order and ips while move a vm with multiple networks (#4602) server: throw exception when update vm nic on L2 network (#4625) doc: fix typo in install notes (#4633)
Description
Improves logic for selecting ROOT disk for VM to be imported when VM has multiple disks.
Based on user input of parameter - datadiskofferinglist, a check will be performed if user correctly provided disk offering mapping for n - 1 disks (one less than the total number of the disks). Remaining one disk will be considered as the ROOT disk.
This will allow correct ROOT disk being selected when first disk in the list of disks of listUnmanagedInstance API or list returned by vSphere SDK is not the ROOT disk.
Fixes #4547
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
CMK
Unmanaged VM
Import attempt without giving data disk mapping:
Import attempt without giving enough data disk mapping:
Import attempt with wrong data disk ids in mapping but correct mapping count:
Successful import with correct mapping: