[one-users] how to use lvm datastore for virtual machine disks

Denis J. Cirulis denis.cirulis at gmail.com
Tue May 28 08:17:38 PDT 2013


Two more questions:

1. Can I predefine the size of the vm disk in template, so that if ttylinux
is 40MB big virtual machine disk would be 10G not 40MB ?
2. I have a bunch of already running virtual machines libvirt/kvm, how can
I migrate them to opennebula ?

Thanks a lot for you help!


On Tue, May 28, 2013 at 6:02 PM, Denis J. Cirulis
<denis.cirulis at gmail.com>wrote:

> Tue May 28 18:02:03 2013 [ImG][D]: Message received: LOG I 8 sudo lvcreate
> -L40M prod-vm -n lv-one-8" failed: sudo: sorry, you must have a tty to run
> sudo
>
> Tue May 28 18:02:03 2013 [ImM][I]: sudo lvcreate -L40M prod-vm -n
> lv-one-8" failed: sudo: sorry, you must have a tty to run sudo
> Tue May 28 18:02:03 2013 [ImG][D]: Message received: LOG E 8 Error
> registering compute01:/dev/prod-vm/lv-one-8
>
> Tue May 28 18:02:03 2013 [ImM][E]: Error registering
> compute01:/dev/prod-vm/lv-one-8
> Tue May 28 18:02:03 2013 [ImG][D]: Message received: LOG I 8 ExitCode: 1
>
> Tue May 28 18:02:03 2013 [ImM][I]: ExitCode: 1
> Tue May 28 18:02:03 2013 [ImG][D]: Message received: CP FAILURE 8 Error
> registering compute01:/dev/prod-vm/lv-one-8
>
>
> I think I've got the solution :)
>
>
> On Tue, May 28, 2013 at 5:33 PM, Marlok Tamás <tmarlok at sztaki.hu> wrote:
>
>> Hi Denis,
>>
>> Can you give us the relevant output from the oned.log?
>> (with log level=3)
>>
>>
>> Cheers,
>> tmarlok
>>
>>
>> On Tue, May 28, 2013 at 4:21 PM, Denis J. Cirulis <
>> denis.cirulis at gmail.com> wrote:
>>
>>> Hi Marlok,
>>> maybe I'm giving too few details of the problem:
>>>
>>> lvm datastore:
>>> [oneadmin at master ~]$ onedatastore show 104
>>> DATASTORE 104 INFORMATION
>>>
>>> ID             : 104
>>> NAME           : production-ds
>>> USER           : oneadmin
>>> GROUP          : oneadmin
>>> CLUSTER        : production
>>> TYPE           : IMAGE
>>> DS_MAD         : lvm
>>> TM_MAD         : lvm
>>> BASE PATH      : /var/lib/one/datastores/104
>>> DISK_TYPE      : BLOCK
>>>
>>> PERMISSIONS
>>>
>>> OWNER          : um-
>>> GROUP          : u--
>>> OTHER          : ---
>>>
>>> DATASTORE TEMPLATE
>>>
>>> CLUSTER="production"
>>> DS_MAD="lvm"
>>> HOST="compute01"
>>> TM_MAD="lvm"
>>> VG_NAME="prod-vm"
>>>
>>> IMAGES
>>> [oneadmin at master ~]$
>>>
>>> compute01 is a kvm node where lvm operations will be held, cause backing
>>> storage for that is fibre channel lun, which then will be accessible on all
>>> compute nodes.
>>>
>>> Then, I imported ttylinux image to production-ds datastore and all I got
>>> in Images section of the Sunstone UI is :
>>>    Tue May 28 17:19:53 2013 : Error copying image in the datastore:
>>> Error registering compute01:/dev/prod-vm/lv-one-7
>>> User oneadmin is in sudoers and is able to launch any lv* command
>>> through sudo.
>>>
>>>
>>>
>>>
>>>
>>>  On Tue, May 28, 2013 at 5:08 PM, Marlok Tamás <tmarlok at sztaki.hu>wrote:
>>>
>>>> Hi Denis,
>>>>
>>>> You should first create, the lvm datasore in opennebula. After that,
>>>> when you import the image from marketplace, you can select this lvm
>>>> datastore (instead of default ds).
>>>>
>>>> Hope this helps.
>>>>
>>>> Cheers,
>>>> tmarlok
>>>>
>>>>
>>>> On Tue, May 28, 2013 at 3:24 PM, Denis J. Cirulis <
>>>> denis.cirulis at gmail.com> wrote:
>>>>
>>>>> Hello list,
>>>>> I imported predefined lvm vg to opennebula using lvm driver and lvm
>>>>> transfer driver. Adjusted HOST variable with hostname of compute node where
>>>>> all lvm operations will be held. oneadmin can login via ssh without
>>>>> password and is in sudoers group to execure all lvm related commands.
>>>>> I downloaded CentOS KVM ready-made image from marketplace, imported
>>>>> with default settings (default datastore).
>>>>>
>>>>> When I'm trying to create template for this image I can not see where
>>>>> should I mention datastore (in my case lvm ds) where virtual machine images
>>>>> will be created.
>>>>> What I'm doing wrong ? I see no lv-one-ID volumes in vg.
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists..opennebula.org <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/20130528/70628452/attachment-0002.htm>


More information about the Users mailing list