[one-users] How to create an image in opennebula system?

Jaime Melis j.melis at fdi.ucm.es
Mon Nov 2 03:22:14 PST 2009


Hi,
actually with that command you're creating an empty image. Try the following
resources:

http://lists.opennebula.org/htdig.cgi/users-opennebula.org/2009-October/001061.html

regards,
Jaime

On Mon, Nov 2, 2009 at 8:41 AM, 张佳宝 <zhangjiabao at gmail.com> wrote:

> Hi,
> I have installed opennebula in my hosts,and I want to create a VM using the
> following template:
> ------------------------------------------------------------------------
> NAME   = xen01
> CPU    = 1
> MEMORY = 512
> OS = [ kernel     = "/boot/vmlinuz-2.6.18-128.el5xen",
>        initrd     = "/boot/initrd-2.6.18-128.el5xen.img",
>        root       = "sda1"]
> DISK = [ source   = "/home/domains/disk.img",
>          target   = "sda1",
>          readonly = "no"]
> DISK = [  type     = "swap",
>           size     = 512,
>           target   = "sdb1",
>  NIC = [NETWORK="Public VLAN"]
>  -----------------------------------------------------------------------
> The Network "Public VLAN" is a vitural network I have defined,and I can see
> it has been defined succesfuly.
> -------------------------------------------------------------------------
> [root at oneserver domains]# onevnet list
> NID NAME              TYPE BRIDGE
>    1 Public VLAN      Fixed   eth0
> [root at oneserver domains]# onevnet show 1
> NID               : 1
> UID               : 0
> Network Name      : Public VLAN
> Type              : Fixed
> Bridge            : eth0
>
>  ....: Template :....
>          BRIDGE=eth0
>         LEASES=IP=192.168.1.249,MAC=00:1C:25:A2:8D:B7
>         NAME=Public VLAN
>         TYPE=FIXED
> ....: Leases :....
> IP = 192.168.1.249  MAC = 00:1c:25:a2:8d:b7  USED = 1 VID = 42
> -------------------------------------------------------------------------
>
> 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" '.
>
> I use the following order to create the virtual-disk disk.img
> ------------------------------------------------------------------
> dd if=/dev/zero of=/home/domains/disk.img bs=1M count=2000
> mksf.ext3 /home/domains/disk.img
> ------------------------------------------------------------------
> after that I do not know if I should do something else with the disk.img
> and how to do? is anyone knows?
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20091102/4ae9af16/attachment-0003.htm>


More information about the Users mailing list