clong / DetectionLab

Automate the creation of a lab environment complete with security tooling and logging best practices
MIT License
4.6k stars 980 forks source link

Feature Request: Proxmox VE Support #518 #737

Closed sukster closed 2 years ago

sukster commented 2 years ago

I am migrating from ESXi to Proxmox and so I developed the integration and tested it on Proxmox VE version 7.0. The deployment steps are very similar to the ESXi and I have documented them in the README.md file. At the moment the documentation is without any screenshots but I can provide these later.

clong commented 2 years ago

Hi @sukster - this is great! I'm sure this PR will make a lot of Proxmox users happy. I don't use it and therefore can't test this PR, but I did notice that the "verify" aspect of the build is failing when it runs terraform validate with:

Error: Missing required argument

The argument "pm_api_url" is required, but was not set.

Is this something that needs to be addressed?

sukster commented 2 years ago

Hi Chris,

When I run the terraform validate on my machine, it succeeds without any errors. The pm_api_url is referenced in the main.tf here: ttps://github.com/sukster/DetectionLab/blob/proxmox/Proxmox/Terraform/main.tf#L2

In the variables.tf, I am aliasing the pm_api_url with proxmox_api_url just to make it more user-friendly. Not everyone may understand what "pm" stands for. Perhaps this is why the validation is failing.

I can try to use the pm_api_url in variables.tf directly instead of aliasing it with proxmox_api_url. Would that help?

Regards, Ludek

jhill-cmd commented 2 years ago

@sukster Do you confirm, machine are not included in the DOMAIN and sysprep is not included on the proxmox deployment ?

sukster commented 2 years ago

@3skr0, it looks like I forgot to include sysprep.bat in the autounattend.xml which is in the https://github.com/clong/DetectionLab/blob/master/Proxmox/Packer/http/Autounattend_Win10.iso file. Let me fix that and thanks for pointing this out!

jhill-cmd commented 2 years ago

Looks like it s not so easy:

build-windows-images-for-proxmox-builder

ans-pve-win-templ

sukster commented 2 years ago

Sorry, I did have time yet due to family and work but I should be able to get to it in the next 3-4 weeks.

sukster commented 2 years ago

Hello, sorry for the delay. I was very busy. I made changes in one of my branches which I need to test: github.com/sukster/DetectionLab/tree/proxmox/Proxmox/Packer. See the files with "Testing Sysprep" comment. I will try to test this within the next days and keep you posted.

sukster commented 2 years ago

@3skr0 , sorry for the delay. There is now a pull request to address this issue: https://github.com/clong/DetectionLab/pull/776. Please let me know if you still experience issues with sysprep. Thanks.

jhill-cmd commented 2 years ago

I ll try it soon. Thank you !

rcastellanosDS commented 2 years ago

Hi, anyone else having problems when applying Terraform? If I run a plan with only one VM at a time, it will work but not when doing all 4.

sukster commented 2 years ago

I usually provision them one at a time which I found more stable on Proxmox but also on VMWare ESXi and Azure. Courious to hear if anyone else is having the same issue. Are the hardware specs on your Proxmox machine pretty good? I wonder if things like hardware or network latency could have effect.

rcastellanosDS commented 2 years ago

Yes, its a pretty big server but I am using Wifi (low latency and 600mpbs).