Created
September 8, 2015 13:56
-
-
Save lemenkov/7c897c10089d755fc26b to your computer and use it in GitHub Desktop.
How to setup Virtual node using kickstart injection
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/sh | |
KSNAME=node00 | |
VIRTNAME=$KSNAME-`date +%Y-%m-%d` | |
virt-install --connect=qemu:///system \ | |
--network=bridge:virbr0 \ | |
--location=http://mirror.yandex.ru/centos/7/os/x86_64/ \ | |
--initrd-inject=/root/kickstart.ks \ | |
--extra-args="ks=file:/kickstart.ks ip=dhcp console=tty0 console=ttyS0,115200 ksdevice=eth0" \ | |
--name=${VIRTNAME} \ | |
--disk /var/lib/libvirt/images/${VIRTNAME}.img,size=20 \ | |
--ram 2048 \ | |
--vcpus=2 \ | |
--check-cpu \ | |
--accelerate \ | |
--hvm \ | |
--nographics \ | |
--noreboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment