diff options
Diffstat (limited to 'others')
| -rwxr-xr-x | others/vm3/.config/cloud-init-generator/debian12.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/others/vm3/.config/cloud-init-generator/debian12.sh b/others/vm3/.config/cloud-init-generator/debian12.sh index 245f73c..d038822 100755 --- a/others/vm3/.config/cloud-init-generator/debian12.sh +++ b/others/vm3/.config/cloud-init-generator/debian12.sh | |||
| @@ -23,7 +23,6 @@ sudo mkdir -p "$config_dir" | |||
| 23 | 23 | ||
| 24 | [ ! -f "$src_file" ] && echo "source image does not exist! downloading..." && sudo wget -O "$src_file" "$image_url" | 24 | [ ! -f "$src_file" ] && echo "source image does not exist! downloading..." && sudo wget -O "$src_file" "$image_url" |
| 25 | 25 | ||
| 26 | |||
| 27 | # First create a command that will generate all the ssh-inject options | 26 | # First create a command that will generate all the ssh-inject options |
| 28 | SSH_INJECT_OPTS=$(find ${sshkeysdir} -name "*.pub" -exec echo "--ssh-inject user:file:{}" \;) | 27 | SSH_INJECT_OPTS=$(find ${sshkeysdir} -name "*.pub" -exec echo "--ssh-inject user:file:{}" \;) |
| 29 | 28 | ||
| @@ -34,6 +33,7 @@ if [ -f "$flag_file" ]; then | |||
| 34 | echo "Image already customized, skipping customization..." | 33 | echo "Image already customized, skipping customization..." |
| 35 | else | 34 | else |
| 36 | echo "Customizing image..." | 35 | echo "Customizing image..." |
| 36 | sudo dnf install -y libguestfs libguestfs-tools libvirt virt-install virt-manager guestfs-tools | ||
| 37 | export LIBGUESTFS_BACKEND=direct | 37 | export LIBGUESTFS_BACKEND=direct |
| 38 | sudo -E virt-customize -a /var/lib/libvirt/images/.image_store/debian12.qcow2 \ | 38 | sudo -E virt-customize -a /var/lib/libvirt/images/.image_store/debian12.qcow2 \ |
| 39 | --run-command 'useradd -m -s /bin/bash user' \ | 39 | --run-command 'useradd -m -s /bin/bash user' \ |
