summaryrefslogtreecommitdiff
path: root/others/vm3/image
diff options
context:
space:
mode:
authorYour Name <you@example.com>2024-12-21 16:45:32 +0800
committerYour Name <you@example.com>2024-12-21 16:45:32 +0800
commite94b275f5630e032a6971831f8be520ae81a5d02 (patch)
treec6819daab6bceff1477647f40d52fa23f2c88628 /others/vm3/image
parentbe3dde6ce14698c5818f21f65037a4beef1199cf (diff)
v1vm3-done
Diffstat (limited to 'others/vm3/image')
-rwxr-xr-xothers/vm3/image/fedora.sh12
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