Version 1.34.6 (on Debian Stretch)
Using virt-builder I tried to create a user and inject my ssh key:
virt-builder -v -x centos-7.4 --output testimage --format qcow2
--selinux-relabel --hostname testimage --firstboot-command 'useradd -m
-p "" dummy' --firstboot-command 'chage -d 0 dummy' --ssh-inject
dummy
...
[ 16.1] Installing firstboot command: useradd -m -p "" dummy
[ 16.1] Installing firstboot command: chage -d 0 dummy
[ 16.1] SSH key inject: dummy
virt-builder: error: ssh-inject: the user dummy does not exist on the guest
(Full debug output attached)
Seems like this can never work as the injection is carried out before
the first boot. Is this a bug in my version? Or is this limited to users
that are already in the image?
Guido