Last active
October 6, 2023 03:27
-
-
Save tuna2134/0a85a3185f11025f3ae27f1b5b53ece3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF > user-data.yml | |
ssh_pwauth: true | |
password: sample | |
EOF | |
wget https://download.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2 | |
sudo virt-install --name vm \ | |
--memory 2048 \ | |
--vcpus 2 \ | |
--os-variant rocky9-unknown \ | |
--console pty,target_type=serial \ | |
--extra-args "console=ttyS0" \ | |
--network network=default \ | |
--cloud-init user-data=./user-data.yml \ | |
--import \ | |
--location http://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.2-x86_64-minimal.iso \ | |
--disk path=./Rocky-9-GenericCloud.latest.x86_64.qcow2,device=disk,bus=virtio,format=qcow2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment