Created
April 27, 2020 06:20
-
-
Save AndiSusanto15/8a169ebe873cf93214c056939cd5db37 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
#!/bin/bash | |
virt-install \ | |
--name $1 \ | |
--ram 2048 \ | |
-v \ | |
--autostart \ | |
--virt-type kvm \ | |
--disk path=/var/lib/libvirt/images/$1.qcow2,size=40 \ | |
--vcpus 1 \ | |
--cpu host \ | |
--os-type linux \ | |
--os-variant centos7.0 \ | |
--network bridge=br0 \ | |
--graphics none \ | |
--console pty,target_type=serial \ | |
--location '/root/iso/CentOS-7-x86_64-Minimal-2003.iso' \ | |
--extra-args 'console=ttyS0,115200n8 serial' | tee -a logs/kvm.install-$1.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment