Hi folks, I've been reading through the list a bit, and also looked at the KVM How-To on the wiki (http://wiki.centos.org/HowTos/KVM ) but I still have a question. I haven't yet begun to set up KVM, so I haven't made any mistakes yet. :-)
My company recently rented a server on which CentOS 5.0 is installed, and my goal is to set up a virtualized instance of CentOS for a new employee to tinker and learn on before I let him have hands on the real server. What I want to do is set up CentOS in KVM, and assign it one of the unused IP addresses on the server so that he and I can access it without having to first connect to the real server. The wiki didn't really give me a good idea of how to accomplish this, and I haven't done a bridge before, so I wanted to check with the list to see if I could get some advice on how to accomplish this.
For demonstration purposes, lets say that the external IP address of the real server is 10.0.0.1, and I want the virtualized install to be found at 10.0.0.2. Can someone show me how to modify the kvm rules found on the wiki (and pasted below) to accomplish this?
Thanks! Raymond
#!/bin/sh PATH=$PATH:/usr/sbin:/sbin sudo brctl addbr br0 sudo ifconfig eth0 0.0.0.0 sudo brctl addif br0 eth0 sudo ifconfig br0 192.168.1.120 netmask 255.255.255.0 up sudo route add -net 192.168.1.0 netmask 255.255.255.0 br0 sudo route add default gw 192.168.1.1 br0 sudo tunctl -b -u john sudo ifconfig tap0 up sudo brctl addif br0 tap0 export SDL_VIDEO_X11_DGAMOUSE=0 sudo iptables -I RH-Firewall-1-INPUT -i br0 -j ACCEPT qemu-kvm ~/win2k.img -m 512 -net nic -net tap,ifname=tap0,script=no
Raymond C. Rodgers wrote on Fri, 08 Aug 2008 09:27:50 -0700:
My company recently rented a server on which CentOS 5.0 is installed, and my goal is to set up a virtualized instance of CentOS for a new employee to tinker and learn on before I let him have hands on the real server.
If you are both so new to this then simply virt-install a CentOS VM. It will work out of the box without using brctl and what else. If not already in use, switch to the xen kernel for this.
Kai
Kai Schaetzl wrote:
Raymond C. Rodgers wrote on Fri, 08 Aug 2008 09:27:50 -0700:
My company recently rented a server on which CentOS 5.0 is installed, and my goal is to set up a virtualized instance of CentOS for a new employee to tinker and learn on before I let him have hands on the real server.
If you are both so new to this then simply virt-install a CentOS VM. It will work out of the box without using brctl and what else. If not already in use, switch to the xen kernel for this.
Kai
I'm more familiar with KVM than I am Xen; I've managed to get QEMU/KVM virtual machines up and running, I'm just concerned about the bridging angle. Although I haven't done any configuring yet, I'm not as sure of myself when it comes to Xen, and have only dabbled a bit.
That said, if Xen will let me accomplish this with minimum fuss, then I'll happily switch to that for this virtual box. Is there anything in particular I need to look out for with Xen?
Thanks, Raymond