diff options
Diffstat (limited to 'others/vm3/image')
| -rwxr-xr-x | others/vm3/image/fedora.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/others/vm3/image/fedora.sh b/others/vm3/image/fedora.sh index 109f4fc..cd05e10 100755 --- a/others/vm3/image/fedora.sh +++ b/others/vm3/image/fedora.sh @@ -8,15 +8,16 @@ image_url="https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2" -sshkeysdir="/root/keys" +sshkeysdir="/root/k" scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #&& echo $scriptdir dir_path="/var/lib/libvirt/images/.image_store" src_file="${dir_path}/fedora40.qcow2" config_dir="/var/lib/libvirt/images/.temp" -user_data="${config_dir}/user_data" -meta_data="${config_dir}/meta_data" +user_data="${config_dir}/user-data" +meta_data="${config_dir}/meta-data" seed_iso="${config_dir}/seed.iso" +# note that cloud init specifically looks for "user-data" and "meta-data" in the seed.iso disk. do not deviate from the naming convention. if [ $# -ne 1 ]; then echo "Usage: $0 <vm-name>" @@ -43,13 +44,14 @@ cat >> "$user_data" << 'EOF' sudo: ['ALL=(ALL) NOPASSWD:ALL'] groups: wheel shell: /bin/bash + password: 123 runcmd: - sudo growpart /dev/sda 1 - sudo xfs_growfs / - sudo dnf install -y vim git - cd /home/user - - git clone https://git.0nom.ch/setup - - sudo ./setup/setup.sh + - #git clone https://git.0nom.ch/setup + - #sudo ./setup/setup.sh - touch /home/user/runcmd_done EOF |
