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

hyperv_vhd parallel clones fail due to resource state #204

Open
Scubastooge opened this issue Apr 17, 2023 · 3 comments
Open

hyperv_vhd parallel clones fail due to resource state #204

Scubastooge opened this issue Apr 17, 2023 · 3 comments

Comments

@Scubastooge
Copy link

Scubastooge commented Apr 17, 2023

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v1.4.4
on linux_amd64

  • provider registry.terraform.io/taliesins/hyperv v1.0.4

Affected Resource(s)

Please list the resources as a list, for example:

  • hyperv_vhd

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "hyperv_vhd" "siem" {
count = 6
path = "${local.diskBasePath}siem${sum([count.index,1])}.vhdx"
size = local.elOSDisk
source_vm = data.hyperv_machine_instance.baselineImage.name
}

Debug Output

https://gist.github.com/Scubastooge/f3046ced0a3e07a30c3d5f46d87ec8a5#file-debug-log

Panic Output

Expected Behavior

6 vhds cloned from a template

Actual Behavior

parallel vhd clones fail due to vhd already being cloned

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Work around by setting --parallelism=1 but this forces the whole build to run slow for obvious reasons

References

@Wei-Yo
Copy link

Wei-Yo commented May 4, 2023

Hello, I have a question for you.
Have you been able to successfully clone a VM?
If so, how did you do it?
Also, after successfully cloning a VM, did you encounter a situation where the directory disappeared?

Thanks a lot and looking forward to your reply,
I think it will help the problem I have ^^.

@taliesins
Copy link
Owner

I wonder if this is related to #188

@kosh000
Copy link

kosh000 commented Mar 24, 2024

I tried the --parallelism=1 option but it's not working for me.
I have tried Provider Versions 1.1.0 and 1.2.1 and the Terraform versions 1.3.3, 1.6.6 and 1.7.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants