Skip to content

Instantly share code, notes, and snippets.

@RVIRUS0817
Created September 9, 2016 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RVIRUS0817/a094273096532a5a143fe46e3226137a to your computer and use it in GitHub Desktop.
Save RVIRUS0817/a094273096532a5a143fe46e3226137a to your computer and use it in GitHub Desktop.
txt
### 1. make Disk Imange
qemu-img create -f qcow2 /var/lib/libvirt/images/cent7.qcow2 20G
### 2. install and boot guest server
virt-install \
--connect qemu:///system \
--name cent7 \
--vcpus=2 \
--ram=2048 \
--hvm \
--disk path=/var/lib/libvirt/images/cent7.qcow2 \
--network bridge=br219 \
--nographics \
--os-type=Linux \
--os-variant=virtio26 \
--location='/var/tmp/CentOS-7-x86_64-DVD-1511.iso' \
--initrd-inject=/var/tmp/cent7.cfg \
--extra-args='ks=file:/cent7.cfg console=tty0 console=ttyS0,115200n8'
## delete guestSV
virsh destroy cent7; virsh undefine cent7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment