Ok. Now the problem is half-solved.<br><br>1) The vnet I have created: Note that I didn't include the "bridge". I'm not sure about this parameter.<br><br><i>NAME = "fixed"<br>TYPE = FIXED<br><br>
#We have to bind this network to ''virbr1'' for Internet Access<br>#BRIDGE = vbr1<br><br>LEASES = [IP=192.168.2.2, MAC=00:16:3e:00:00:01]<br>LEASES = [IP=192.168.2.3, MAC=00:16:3e:00:00:02]</i><br><br><br>
2) The VM template:<br><i>NAME = vm-example<br>MEMORY = 768<br>OS = [<br> kernel = "/boot/vmlinuz-2.6.26-2-xen-686",<br> initrd = "/boot/initrd.img-2.6.26-2-xen-686",<br> root = "sda1 ro"]<br>
<br>DISK = [<br> source = "/path/debian.img",<br> target = "sda1",<br> readonly = "no" ]<br><br>NIC = [ mac = "00:16:3e:00:00:01", network = "fixed" ]</i><br>
<br>3) Of course, I include the vmcontext.sh script in the VM<br><br>Now, the result is that the VM seems to ask for the IP, but it still gets IP from DHCP server.<br><br>* As we can see, the IP is "assigned" to the VM:<br>
<i>NID : 7<br>UID : 0<br>Network Name : fixed<br>Type : Fixed<br>Bridge :<br><br>....: Template :....<br> LEASES=IP=192.168.2.2,MAC=00:16:3e:00:00:01<br> LEASES=IP=192.168.2.3,MAC=00:16:3e:00:00:02<br>
NAME=fixed<br> TYPE=FIXED<br><br>....: Leases :....<br>IP = 192.168.2.2 MAC = 00:16:3e:00:00:01 USED = 0 VID = -1<br>IP = 192.168.2.3 MAC = 00:16:3e:00:00:02 USED = 1 VID = 73</i><br><br>* I think that the IP assigned by the script is replaced by the one from DHCP. So, I thought about disabling DHCP. However, the /etc/network/interfaces file shows that eth0 is configured as "static"<br>
<i><br>auto lo<br>iface lo inet loopback<br><br>auto eth0<br>iface eth0 inet static<br> address 62.0.0.2<br> network 62.0.0.0<br> netmask 255.255.255.0<br> gateway 62.0.0.1<br></i><br>Thanks again.<br><br><br><br>