Windows 10 Cloudbase-init set registry value during boot

red_book

New Member
Oct 27, 2020
4
0
1
26
Is there a way to set a registry value during boot of a windows 10 VM?
Using snippets?
 
hi,

it's doable but probably not the best way to go about it via PVE snippets.
if you have qemu guest agent installed then you could execute shell commands through that [0] with qm guest exec <VMID> -- <yourcommand>
you could call that with a snippet.



but there are many other ways of doing this using windows-specific methods. you can have a powershell script like this:
Code:
Set-ItemProperty -Path "HKLM:\Some\Registry\Path" -Name "SomeEntry" -Value 123
and make it run at boot. this should set the value of the given path for the registry entry

you can then also add that in your cloudbase-init, with local script execution [1]

[0]: https://pve.proxmox.com/wiki/Qemu-guest-agent
[1]: https://cloudbase-init.readthedocs.io/en/latest/plugins.html#local-scripts-execution-main
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!