How to install a virtual guest from console

As simple as it gets. A quick reminder on how to install your virtual guest from Linux console. This yields a usable virtual guest with console access out of the box and skips all the GUI stuff not needed for server operation.

Install your guest with following command but please take note of:

virt-install \
--name my_virtual_guest \
--arch x86_64 --cpu host --ram 2048 \
--disk path=/path/to/your_device,io=native,format=raw \
--vcpus 2 \
--os-type linux \
--os-variant centos7.0 \
--network bridge=br0,mac=mac_address \
--network bridge=br1,mac=mac_address \
--graphics none \
--console pty,target_type=serial \
--location '/path/to/installimage' \
--extra-args 'console=ttyS0,115200n8 serial'

You also can install GUI tools later with

yum groupinstall "Server with GUI"

See “yum grouplist” for more options.