Hi,<br>actually with that command you're creating an empty image. Try the following resources:<br><br><a href="http://lists.opennebula.org/htdig.cgi/users-opennebula.org/2009-October/001061.html">http://lists.opennebula.org/htdig.cgi/users-opennebula.org/2009-October/001061.html</a><br>
<br>regards,<br>Jaime<br><br><div class="gmail_quote">On Mon, Nov 2, 2009 at 8:41 AM, 张佳宝 <span dir="ltr"><<a href="mailto:zhangjiabao@gmail.com" target="_blank">zhangjiabao@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<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>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br>