Skip to content

Instantly share code, notes, and snippets.

@lemenkov
Created September 8, 2015 13:56
Show Gist options
  • Save lemenkov/7c897c10089d755fc26b to your computer and use it in GitHub Desktop.
Save lemenkov/7c897c10089d755fc26b to your computer and use it in GitHub Desktop.
How to setup Virtual node using kickstart injection
#!/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