Last active
September 9, 2018 12:05
-
-
Save auth-day/2fc1835c1d80b932833c3ab599540317 to your computer and use it in GitHub Desktop.
Create vm in kvm
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/bash | |
virt-install -n $1 \ | |
--noautoconsole \ | |
--network=bridge:virbr0 \ | |
--ram 2024 \ | |
--arch=x86_64 \ | |
--vcpus=2 \ | |
--cpu host-model-only \ | |
--check-cpu \ | |
--disk path=/kvm/images/$1.img,size=16 \ | |
--location=/kvm/iso/CentOS-7-x86_64-Minimal-1602-99.iso \ | |
--graphics vnc,listen=0.0.0.0,password=password \ | |
--os-type linux \ | |
--os-variant=rhel7 \ | |
--boot cdrom,hd,menu=on \ | |
-x "ks=http://ip_where_nginx_is_running_and_is_having_ks.cfg/ks.cfg" \ | |
--debug | |
# Можно добавить статический адрес через kickstart: ks=http://ip_where_nginx_is_running_and_is_having_ks.cfg/ks.cfg | |
# ksdevice=eth0 ip=10.10.21.76 netmask=255.255.255.240 dns=10.10.21.1 gateway=10.10.21.100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment