Add support for setting root ssh pubkey to proxmox containers.

This commit is contained in:
Michael Lustfield 2018-10-20 19:03:40 -05:00
parent 0ece06ef66
commit 3a62f74758
No known key found for this signature in database
GPG key ID: 03A8891A765AD085
2 changed files with 7 additions and 0 deletions

View file

@ -156,6 +156,10 @@ with their default settings listed.
# Network interfaces, netX
net0: name=eth0,bridge=vmbr0,ip=dhcp
# Public key to add to /root/.ssh/authorized_keys.
pubkey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA...'
QEMU
====

View file

@ -726,6 +726,9 @@ def create_node(vm_, newid):
if prop in vm_: # if the property is set, use it for the VM request
newnode[prop] = vm_[prop]
if 'pubkey' in vm_:
newnode['ssh-public-keys'] = vm_['pubkey']
# inform user the "disk" option is not supported for LXC hosts
if 'disk' in vm_:
log.warning('The "disk" option is not supported for LXC hosts and was ignored')