marcinbojko / proxmox-kvm-packer Goto Github PK
View Code? Open in Web Editor NEWProxmox and KVM Templates - Virtual Machines using packer
License: Apache License 2.0
Proxmox and KVM Templates - Virtual Machines using packer
License: Apache License 2.0
I have a challenging one for you. I have this working pretty easily on a bare metal machine, but gave up trying on proxmox.
Hardware:
Intel Xeon w7 chip
Nvidia rtx 4090 (not the primary GPU)
Intel or Nvidia Enterprise NICs cards
Software
Win 2025 Datacenter
Nvidia Cuda drivers
Windows containers (with docker ce install to manage win vms) (can't share Cuda but can share directml)
Hyper v, which can paravirtualize the 4090, and share the NICs via sr-iov/NUMA. (Paravirualize means multiple guests shared GPU via "Add-VMGpuPartitionAdapter", instead of pass-through via "Add-VMAssignableDevice")
Ubuntu WSL2, with a 2nd install of docker (for Linux machines) and Nvidia container toolkit to share gpu with wsl and it's docker containers.
The win host, wsl ubuntu, any wsl docker containers, and hyper guests all recognizing the Nvidia 4090 when "nvidia-smi.exe" is run. And Windows containers via docker recognizing the 4090 (but directx acceleration instead of Cuda since Nvidia container toolkit doesn't work with win containers).
Its the ultimate AI setup, and it's pretty easy to do baremetal, but haven't had much luck inside proxmox.
hey, you have done amazing work here. generally speaking was easy to setup once I figured out the proxmox token part.
I did run into an issue though. Any idea where the issue might be?
==> proxmox-iso.linux: Uploading /home/packer/proxmox-kvm-packer/extra/files/cloud-init/rhel/generic/cloud.cfg => /etc/cloud/cloud.cfg
proxmox-iso.linux: cloud.cfg 2.68 KiB / 2.68 KiB [======================================] 100.00% 0s
==> proxmox-iso.linux: Provisioning with shell script: /tmp/packer-shell3547237650
==> proxmox-iso.linux: Unit /usr/lib/systemd/system/qemu-guest-agent.service is added as a dependency to a non-existent unit dev-virtio\x2dports-org.qemu.guest_agent.0.device.
==> proxmox-iso.linux: Provisioning with Ansible...
proxmox-iso.linux: Setting up proxy adapter for Ansible....
==> proxmox-iso.linux: Executing Ansible: ansible-playbook -e packer_build_name="linux" -e packer_builder_type=proxmox-iso -e packer_http_addr=192.168.1.27:8378 --ssh-extra-args '-o IdentitiesOnly=yes' -e @extra/playbooks/provision_oracle9_variables.yml -e @variables/oraclelinux9.yml -v -e ansible_ssh_private_key_file=/tmp/ansible-key1881435401 -i /tmp/packer-provisioner-ansible1614403870 /home/packer/proxmox-kvm-packer/extra/playbooks/provision_rhel.yaml
proxmox-iso.linux: Using /etc/ansible/ansible.cfg as config file
proxmox-iso.linux:
proxmox-iso.linux: PLAY [prepare_rhel_machine] ****************************************************
proxmox-iso.linux:
proxmox-iso.linux: TASK [verify_ansible_meets_version_requirements] *******************************
proxmox-iso.linux: ok: [default] => {
proxmox-iso.linux: "changed": false,
proxmox-iso.linux: "msg": "All assertions passed"
proxmox-iso.linux: }
proxmox-iso.linux:
proxmox-iso.linux: TASK [run_initial_setup_instead_of_gather_facts] *******************************
proxmox-iso.linux: fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via scp: bash: line 1: /usr/lib/sftp-server: No such file or directory\nConnection closed\r\n", "unreachable": true}
proxmox-iso.linux:
proxmox-iso.linux: PLAY RECAP *********************************************************************
proxmox-iso.linux: default : ok=1 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
proxmox-iso.linux:
==> proxmox-iso.linux: Provisioning step had errors: Running the cleanup provisioner, if present...
==> proxmox-iso.linux: Stopping VM
==> proxmox-iso.linux: Deleting VM
Build 'proxmox-iso.linux' errored after 6 minutes 3 seconds: Error executing Ansible: Non-zero exit status: exit status 4
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.