[CentOS] Install CentOS as KVM guest

Thu Apr 28 05:28:36 UTC 2011
Jussi Hirvi <listmember at greenspot.fi>

>> >  Here is one of my install commands that worked:
>> >  virt-install --name mail \
>> >  --os-variant rhel5.4 --ram 1024 \
>> >  --vcpus 2  --accelerate \
>> >  --nographics -v \
>> >  --location /mnt/centos56/  --network bridge:br0 \
>> >  --disk path=/kvmail/mail.img,size=290 \
>> >  --extra-args "console=ttyS0";

On 28.4.2011 8.11, Emmanuel Noobadmin wrote:
> I have pretty much the same thing except the names are slightly
> different and I've already created the disk with qemu-img so the size
> was omitted.

I tried it too, didn't work. Try virt-install without creating the image 
first. Virt-install will create the image (type "raw") on the go. If you 
want qcow2, you can convert the image later. Qcow2 has some special 
features but is slower than raw.

> Did you have to configure an additional tap interface? It seems like
> it might be necessary but all the guides just involve giving some
> command to create a temporary tap... which doesn't sound very safe if
> I want it to persist after a reboot. But I couldn't find any
> instructions on how a tap could be defined using a file like
> /etc/sysconfig/network-scripts/if_tap1.

No, I definitely did not do that. I don't know why that would be needed.

> I did this too, although my path was just centos56/
> Just in case the guest VM was connecting in an around about manner and
> iptables was blocking what appears to be an external connection. I
> tested that it was accessible from both a VNC session on the host
> itself, as well as from external network.
> So this is where my installation halts. I will get the message unable
> to retrievehttp://
> Just to be sure it was not just accessible but downloadable, I tried
> to download this exact URL including the double slash and it works.

The double slash does not look good... On next try, try it with no slash 
at the end of ip, and no slash at the beginning of path. (But keep the 
last slash.) :-)

> So it seems to me that the VM's networking is wrong somehow.
> Especially since the assigned IP is not pingable during this point.
> But I can't be sure if that's just because the OS is still being
> installed.

I would not expect ping to work at that point. I would do
	virsh destroy myvm
	virsh undefine myvm
	virt-install again...

- Jussi