virt-install

From Glee
Jump to: navigation, search

RHEL6

Here is an example to install a headless RHEL6 KVM virtual server. The local tree (exploded from the DVD image) is used only to start the installation, the kickstart file then points to the same tree through http. In this example, the LVM LV and network bridge are already created, and the MAC address has been set in order to be repeatable across re-installations.

virt-install \
  --name=burst07 \
  --ram=512 \
  --vcpus=2 \
  --os-variant=rhel6 \
  --hvm \
  --accelerate \
  --location=/home/install/os/rhel-server-6.0-x86_64 \
  --disk=path=/dev/vg1/burst07 \
  --bridge=br1 \
  --mac=54:52:00:52:fe:37 \
  --nographics \
  --keymap=fr \
  --extra-args="console=ttyS0,9600 ks=http://192.168.19.254/install/burst07.ks"

RHEL7

Mostly the same as above, but for Red Hat Enterprise 7. The installer triggers oomkiller with only 512MB RAM.

virt-install \
  --name=el7 \
  --ram=1024 \
  --vcpus=2 \
  --os-variant=rhel7 \
  --hvm \
  --accelerate \
  --location=/mnt/el7 \
  --disk=path=/dev/vg0/el7 \
  --bridge=br0 \
  --mac=52:54:00:1a:3b:c2 \
  --nographics \
  --keymap=fr \
  --extra-args="console=ttyS0,9600 ks=http://myvi/el7.ks"