[one-users] Error with TM_LVM

Anoop L anpl1980 at gmail.com
Wed Feb 16 07:31:19 PST 2011


Hi Jaime,

Thanks for the reply. My VM ID is 86 but still ONE uses 0 as identifier for
LV. Even the working VM with ID  is using lv-one--0.

I have already tried removing LV manually. I guess issue is that ONE is
trying to create the LV of same name and some how VM ID is not appended to
the LV_NAME.

One more things is when second VM fails it deletes the lv-one--0. Also any
idea how can I force set a VM template that a swap space/disk to be created
on LV.

Some more information:

 onevm list
   ID     USER     NAME STAT CPU     MEM        HOSTNAME        TIME
   85 oneadmin centos55 runn   0      2G     ast-wks-348 00 02:00:16
   86 oneadmin centos55 fail   0      0K     ast-wks-348 00 00:00:42


onevm show 86 gives:

VIRTUAL MACHINE 86
INFORMATION
ID             : 86
NAME           : centos55
STATE          : FAILED
LCM_STATE      : LCM_INIT
START TIME     : 02/16 20:49:13
END TIME       : 02/16 20:49:55
DEPLOY ID:     : -

VIRTUAL MACHINE
MONITORING
NET_TX         : 0
NET_RX         : 0
USED MEMORY    : 0
USED CPU       : 0

VIRTUAL MACHINE
TEMPLATE
CPU=1
DISK=[
  CLONE=YES,
  DISK_ID=0,
  IMAGE=centos5564_Base.img,
  IMAGE_ID=8,
  READONLY=NO,
  SAVE=NO,

SOURCE=/opt/cloud/one/var//images/fd34675a5656d3b5b92e01b11dbae9c819e5f4c4,
  TARGET=hda,
  TYPE=DISK ]
DISK=[
  DISK_ID=1,
  SIZE=5120,
  TARGET=hdd,
  TYPE=swap ]
FEATURES=[
  ACPI=no ]
GRAPHICS=[
  LISTEN=0.0.0.0,
  PORT=5916,
  TYPE=vnc ]
MEMORY=2048
NAME=centos55
NIC=[
  BRIDGE=xenbr0,
  IP=10.20.30.1,
  MAC=02:00:0a:14:1e:01,
  NETWORK=LAN2,
  NETWORK_ID=2 ]
OS=[
  BOOTLOADER=/usr/bin/pygrub ]
VMID=86



lvdisplay on node:

  --- Logical volume ---
  LV Name                /dev/vg00/lv-one--0
  VG Name                vg00
  LV UUID                0ENQKV-L8qi-APmD-iGiv-uRfj-vVNv-nkWud4
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                20.00 GB
  Current LE             640
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2


Any help would be appreciated.

Thanks,
Anoop



On Wed, Feb 16, 2011 at 8:44 PM, Jaime Melis <jmelis at opennebula.org> wrote:

> Hello Anoop,
>
> Is the ID of the VM you're trying to deploy '0' ? When you deploy a new vm
> the following LV volume will be created: lv-one-<ID>. If that LV already
> exists then it fails. My guess is that it's failing because for some reason
> OpenNebula didn't get the change to do a 'delete' removing the LV partition.
>
> I suggest you remove manually all the LVM partitions. You can find out the
> existing ones with "lvs" and remove them with "lvremove" (do that as root in
> the Xen node).
>
> Cheers,
> Jaime
>
> On Wed, Feb 16, 2011 at 2:26 PM, Anoop L <anpl1980 at gmail.com> wrote:
>
>> Hi,
>>
>> I have successfully created a VM from Front-End to a Xen node However on
>> creating the second VM I get an error:
>>
>> Wed Feb 16 18:45:24 2011 [TM][I]: tm_clone.sh: Creating LV lv-one--0
>> Wed Feb 16 18:45:24 2011 [TM][I]: tm_clone.sh: ERROR: Command
>> "/usr/bin/ssh node-1 /usr/bin/sudo /sbin/lvcreate -L20G -n lv-one--0 vg00"
>> failed.
>>
>> My VM template:
>> NAME   = centos55
>> CPU    = 1
>> MEMORY = 2048
>> OS      =   [ bootloader = "/usr/bin/pygrub" ]
>>
>> DISK  = [  image = "centos5564_Base.img"]
>>
>> DISK   = [
>>  type     = swap,
>>  size     = 5120
>>  #target   = sdb
>> ]
>>
>>
>> NIC = [ BRIDGE = "xenbr0", MAC = "00:16:3E:02:03:05" ]
>> FEATURES=[ acpi="no" ]
>>
>> GRAPHICS = [
>>  type    = "vnc",
>>  listen  = "0.0.0.0",
>>  port    = "5916" ]
>>
>> The same template is used for creating first VM and it all was working
>> fine. Except the swap is not created as an LV.
>>
>> How can I change this template so as to create a new LV for swap
>> partiotion. Please note that I have not created any LV manually. If I create
>> a LV manually how can I specify this in the VM template.
>>
>> I am stuck on this for some time and posted this multiple times with no
>> answer.
>>
>> Any help would be appreciated.
>>
>> Thanks,
>> Anoop
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>
>
> --
> Jaime Melis, Cloud Technology Engineer/Researcher
> Major Contributor
> OpenNebula - The Open Source Toolkit for Cloud Computing
> www.OpenNebula.org | jmelis at opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110216/c1d45a5b/attachment-0003.htm>


More information about the Users mailing list