As ericson007 has already mentioned, if you want to install from remote source, you have to point to a directory where iso file is already extracted. CDROM and ISO file are only applicable for local source.
Also, you may want to create a disk prior to installing OS, because by default the image (img) created by KVM will be equal to the size you mentioned. For example, if want disk size of 100 GB, then image file will be actually 100GB. So create disk file first:
Code:
# qemu-img create -f qcow2 /var/lib/libvirt/images/testbox.qcow2 100G
Then you can install any OS with
virt-install --prompt, and point to already created disk when asked.
Or, you can do the following (single step):
Code:
# virt-install --connect qemu:///system \
--name testbox --ram 1024 --vcpus 1 \
--disk path=/var/lib/libvirt/images/testbox.qcow2,format=qcow2,size=100 \
--network network=default \
--cdrom /var/ftp/pub/iso/centos65.iso \
--os-type linux --os-variant rhel6 \
--virt-type kvm --graphics vnc --hvm
OR
Code:
# virt-install --connect qemu:///system \
--name testbox --ram 1024 --vcpus 1 \
--disk path=/var/lib/libvirt/images/testbox.qcow2,format=qcow2,size=100 \
--network network=default \
--location ftp://192.168.1.74/pub/centos65
--os-type linux --os-variant rhel6 \
--virt-type kvm --graphics vnc --hvm