ionos-cloud / terraform-provider-ionoscloud

The IonosCloud Terraform provider gives the ability to deploy and configure resources using the IonosCloud APIs.
Mozilla Public License 2.0
34 stars 23 forks source link

Windows VMs generation #459

Closed Syndlex closed 4 months ago

Syndlex commented 11 months ago

Description

Windows Vms have the Problem that they can not start when using more than 8gb RAM. https://docs.ionos.com/cloud/compute/compute-engine/compute-engine-faq#what-are-the-maximum-resources-available-for-a-server

I haven't found a way to set the ram value to 8gb or less on the first apply and ingress it on the second without changing a Variable in some strange way.

This makes automating a Deployment with new Windows Vms Impossible and IaC useless.

Expected behavior

I dont know where this workaround should be. terraform sdk = first start a 4 gb vm and modify it to use the defined memory. cloud api = the cloud api could do the same while the underlying Problem is not fixed.

Environment

Terraform version:

Provider version:

OS:

Configuration Files

How to Reproduce

Error and Debug Output

Additional Notes

References

cristiGuranIonos commented 11 months ago

Thanks for raising this, we are looking at providing a workaround to be able to create using terraform and not needing to update after. We still need to do some research to how feasible it is.

adeatcu-ionos commented 10 months ago

Hello and thank you for raising this.

I tried to create a server with an Windows image with more than 8GB of RAM and it worked every time (more than 5 times, even with 32 GB). I know that there is a may not always work in the documentation, I will discuss with the other teams about that note that you highlighted. Anyways, for me it worked, I cannot take that for granted (I'm assuming that there are some cases in which this is failing), but I could successfully boot the machine, log in and play with the server, so I can't reproduce this problem.

For that reason, please, if possible, share with us a terraform plan that you used and that led you to this problem. Also, can you please tell me how do you know if there is a problem. I mean: is the provisioning done successfully and you can't boot the machine? Or is there any error message during the provisioning that says that the provisioning could not be done because of the RAM configuration? I want to know how we can identify the problem: maybe we can do it from the provisioning phase or maybe we need to manually boot the machine and check that everything is working fine.

Thank you!

adeatcu-ionos commented 10 months ago

Update: I've been told that this behavior is related to Windows Server 2012/R2 and older systems. I managed to reproduce it by creating a server with windows-2012-r2-server-2023-06 image. The provision is done successfully but if I try to boot the machine I have some configuration errors.

Creating the server and immediately changing the RAM memory does not solve the problem.

I will investigate this, in the mean time, if possible, please use a newer Windows image. This is the most basic work-around I can give you right now, but it's the only one.