Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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