Created
November 24, 2019 20:39
-
-
Save neklaf/c6a19d6cacfe48e786211c4e6c2e40eb to your computer and use it in GitHub Desktop.
Script to create a VM based on Debian GNU/Linux v10.1.0 (debian-10.1.0-amd64-netinst.iso)
This file contains 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
#!/bin/sh | |
if [ -z "$1" ] ; | |
then | |
echo Specify a VM name. | |
exit 1 | |
fi | |
virt-install \ | |
--name $1 \ | |
--ram 4096 \ | |
--disk path=/your/path/images/$1.img,size=10 \ | |
--vcpus 2 \ | |
--os-type linux \ | |
--os-variant dewbian10 \ | |
--network bridge:br0,model=virtio \ | |
--graphics none \ | |
--console pty,target_type=serial \ | |
--location /your/path/images/debian-10.1.0-amd64-netinst.iso \ | |
--extra-args 'console=ttyS0,115200n8 serial' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment