Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multiple KVM guests script using virt-install

I would like install 3 KVM guests automatically using kickstart. I have no problem installing it manually using virt-install command.

virt-install \
-n dal \
-r 2048 \
--vcpus=1 \
--os-variant=rhel6 \
--accelerate \
--network  bridge:br1,model=virtio \
--disk path=/home/dal_internal,size=128 --force \
--location="/home/kvm.iso" \
--nographics \
--extra-args="ks=file:/dal_kick.cfg console=tty0 console=ttyS0,115200n8 serial" \
--initrd-inject=/opt/dal_kick.cfg \
--virt-type kvm

I have 3 scripts like the one above - i would like to install all 3 at the same time, how can i disable the console? or running it in the background?

like image 247
Erez Kirson Avatar asked Sep 16 '25 00:09

Erez Kirson


1 Answers

Based on virt-install man page: http://www.tin.org/bin/man.cgi?section=1&topic=virt-install

--noautoconsole

Don't automatically try to connect to the guest console. The
           default behaviour is to launch virt-viewer(1) to display the
           graphical console, or to run the "virsh" "console" command to
           display the text console. Use of this parameter will disable this
           behaviour.

virt-install will connect console automatically. If you don't want, just simply add --noautoconsole in your cmd like

virt-install \
-n dal \
-r 2048 \
--vcpus=1 \
--quiet \
--noautoconsole \
...... other options
like image 61
kalu Wang Avatar answered Sep 17 '25 19:09

kalu Wang