Skip to content
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

Add use_fixed_vhd_format Hyper-V ISO option #6101

Merged
merged 1 commit into from
May 11, 2018

Conversation

adarobin
Copy link
Contributor

@adarobin adarobin commented Apr 3, 2018

I have added an option to the Hyper-V ISO builder named "azure_compatible". This will instruct the builder to create a VM with a VHD that is compatible with Azure.

Azure needs a Fixed size VHD, the default is a dynamic VHDX.

Closes #5617

@adarobin adarobin requested review from taliesins and a team as code owners April 3, 2018 19:47
@SwampDragons
Copy link
Contributor

Thanks for the PR! I like this idea a lot, but I don't like the name you've given the feature; azure_compatible is not explicit and would be confusing to anyone who doesn't want to have to read source code. Can we name it something like use_vhd_format instead? We can talk in the docs about how this makes the VMs compatible with Azure. (While we're on the subject, this new feature could use some docs, too, and maybe a test or two checking the logic you've added to the config)

Copy link
Contributor

@SwampDragons SwampDragons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start; See my previous comment for some change requests.
-- docs
-- tests for config logic
-- more explicit feature name.

@adarobin
Copy link
Contributor Author

adarobin commented Apr 4, 2018

@SwampDragons Its funny you don't like the name. I had originally named the feature use_legacy_vhd, but I didn't like that name as Azure also needs a VHD file that is fixed size and not dynamic (which is the default if -Fixed is not passed to New-VHD).

This made me wonder if use_fixed_disk should be a separate option, but then that would need to be implemented for vhdx as well? I'm going to rename it to use_fixed_vhd_format for now and work on the other requested changes.

@adarobin adarobin force-pushed the azurecompatible branch 5 times, most recently from 7420c76 to 44e9ecc Compare April 4, 2018 16:29
@adarobin adarobin changed the title Add azure_compatible Hyper-V ISO option Add use_fixed_vhd_format Hyper-V ISO option Apr 10, 2018
@adarobin adarobin force-pushed the azurecompatible branch 4 times, most recently from b33d5f1 to 057965d Compare April 10, 2018 20:01
@adarobin
Copy link
Contributor Author

@SwampDragons I have made the requested changes. I'm much more familiar with PowerShell and Python than Go so look extra hard at the tests I added. I also realized that a VHD has a different maximum size than a VHDX so I added a check for that.

@SwampDragons
Copy link
Contributor

Thanks! This is definitely on my TODO list to review.

@adarobin adarobin force-pushed the azurecompatible branch 2 times, most recently from 2e9bfe5 to 25158d8 Compare April 23, 2018 17:47
@adarobin
Copy link
Contributor Author

@SwampDragons I rebased this in light of all the recent Hyper-V changes.

@SwampDragons
Copy link
Contributor

Good idea, thanks.

@SwampDragons SwampDragons added this to the v1.3.0 milestone Apr 27, 2018
@SwampDragons SwampDragons dismissed their stale review May 10, 2018 23:59

this review was stale, so dismissing it.

@SwampDragons SwampDragons merged commit 5871b82 into hashicorp:master May 11, 2018
@SwampDragons
Copy link
Contributor

Thanks for this PR!

@mwhooker mwhooker modified the milestones: v1.3.0, upcoming-05-2018-ish May 23, 2018
@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vhd file to upload to Azure
3 participants