terraform-provider-proxmox: v3.0.1-rc2: Stuck on still creating
First of all I would like to thank you for such a great job in creating this provider for Proxmox, it rocks!
With that said I’m currently have one issue stopping me for using it fully. I’m trying to deploy some VMs with v3.0.1-rc2 but the the provider hangs in “Still creating…”.
The VM is created successfully in Proxmox but the terraform script hangs for about 9m10s with the message “Still creating…”, before it eventually stops with this error: Error: cannot find any IP address
I am not using cloud-init and the os_type is set to “Linux 6.x - 2.6 Kernel”. Agent is activated with agent = 1.
After some debugging of the provider it seems that the error stems from the VM not receiving an ipv6 address (which is to be expected since ipv6 is not configured).
I have tried to set skip_ipv6=true but this doesn’t help (the value is ignored). Is this setting only available for cloud-init configurations? If I change hasRequiredIP to the below in heper_qemu.go it works as expected.
func (conn connectionInfo) hasRequiredIP() bool {
if conn.IPs.IPv4 != "" || conn.IPs.IPv6 != "" {
return true
}
return true
// if conn.IPs.IPv4 == "" && !conn.SkipIPv4 || conn.IPs.IPv6 == "" && !conn.SkipIPv6 {
// return false
// }
// return true
}
I’m not so well versed with all the details in this provider but why must both ipv4 and ipv6 be mandatory. Is it not enough if one of them is set?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18
Commits related to this issue
- Merge pull request #1016 from Tinyblargon/#1015 Fix: v3.0.1-rc2: Stuck on still creating — committed to Telmate/terraform-provider-proxmox by Tinyblargon 2 years ago
I also ran into the issue of
Error: cannot find any IP addressusing v3.01-rc2 when deploying more than one VM using terraform count. The VM’s however got IPv4 and IPv6 just fine and they also get reported via Proxmox UI. No issues seen when running withcount=1.Long story short, when I build and use https://github.com/Telmate/terraform-provider-proxmox/pull/1016, it works:
I now understand whats happening here. Before we update the VM we read the current config of the VM, during this read step the error occurs. Because the error occurs during the read step, non of the new settings have been applied. Therefore you cannot influence how this step behaves.
Being unable to obtain an IP should give a warning instead of an error. This was changed everywhere except for: https://github.com/Telmate/terraform-provider-proxmox/blob/be2585614955f7ada0433c9a1fe34e604bb717cd/proxmox/resource_vm_qemu.go#L1886
could you try with #1016