<p>Hi,<br>I have installed opennebula in my hosts,and I want to create a VM using the following template:<br>------------------------------------------------------------------------<br>NAME = xen01<br>CPU = 1<br>MEMORY = 512<br>
OS = [ kernel = "/boot/vmlinuz-2.6.18-128.el5xen",<br> initrd = "/boot/initrd-2.6.18-128.el5xen.img",<br> root = "sda1"]<br>DISK = [ source = "/home/domains/disk.img",<br>
target = "sda1",<br> readonly = "no"]<br>DISK = [ type = "swap",<br> size = 512,<br> target = "sdb1",<br> NIC = [NETWORK="Public VLAN"]<br>
----------------------------------------------------------------------- <br>The Network "Public VLAN" is a vitural network I have defined,and I can see it has been defined succesfuly.<br>-------------------------------------------------------------------------<br>
[root@oneserver domains]# onevnet list<br>NID NAME TYPE BRIDGE<br> 1 Public VLAN Fixed eth0<br>[root@oneserver domains]# onevnet show 1<br>NID : 1<br>UID : 0<br>Network Name : Public VLAN<br>
Type : Fixed<br>Bridge : eth0</p>
<p> ....: Template :....<br> BRIDGE=eth0<br> LEASES=IP=192.168.1.249,MAC=00:1C:25:A2:8D:B7<br> NAME=Public VLAN<br> TYPE=FIXED<br>....: Leases :....<br>IP = 192.168.1.249 MAC = 00:1c:25:a2:8d:b7 USED = 1 VID = 42<br>
-------------------------------------------------------------------------</p>
<p>but now I am not sure how to create an image,in my template the question is how to define the 'source = "/home/domains/disk.img" '.</p>
<p>I use the following order to create the virtual-disk disk.img<br>------------------------------------------------------------------<br>dd if=/dev/zero of=/home/domains/disk.img bs=1M count=2000<br>mksf.ext3 /home/domains/disk.img<br>
------------------------------------------------------------------<br>after that I do not know if I should do something else with the disk.img<br>and how to do? is anyone knows? </p>