[one-users] OpenNebula 3.4 with Clustered LVM

Vogl, Yves vogl at adesso-mobile.de
Fri May 11 03:47:59 PDT 2012


Hi Jamie,

thanks for you answer.

I did the steps you suggested and fail with an error - it seems that there's something messed up when deploying a vm.
The error occures on cloning.

Error executing image transfer script: Error cloning /dev//dev/vg01/master//dev/vg01/master to /dev//dev/vg01/master//dev/vg01/master-429-0

I intended to clone /dev/vg01/master to /dev/vg01/master-429-0


I'll have a look at the drivers - but maybe I'm doing something wrong?

Thanks,
Yves



Thats my datastore:

DATASTORE 105 INFORMATION                                                       
ID             : 105                 
NAME           : kvm02               
USER           : oneadmin            
GROUP          : oneadmin            
CLUSTER        : -                   
DS_MAD         : lvm                 
TM_MAD         : lvm                 
BASE PATH      : /var/lib/one/datastores/105

PERMISSIONS                                                                     
OWNER          : um-                 
GROUP          : u--                 
OTHER          : ---                 

DATASTORE TEMPLATE                                                              
DS_MAD="lvm"
HOST="kvm02.example.org"
TM_MAD="lvm"
VG_NAME="vg1"


That my image:


IMAGE 20 INFORMATION                                                            
ID             : 20                  
NAME           : Master             
USER           : oneadmin            
GROUP          : oneadmin            
DATASTORE      : kvm02               
TYPE           : OS                  
REGISTER TIME  : 05/11 12:32:10      
PERSISTENT     : No                  
SOURCE         : /dev/vg01/master    
SIZE           : 0                   
STATE          : used                
RUNNING_VMS    : 1                   

PERMISSIONS                                                                     
OWNER          : um-                 
GROUP          : ---                 
OTHER          : ---                 

IMAGE TEMPLATE                                                                  
BUS="virtio"
DEV_PREFIX="hd"
DRIVER="raw"


That's my template:

TEMPLATE 23 INFORMATION                                                         
ID             : 23                  
NAME           : kvm02               
USER           : oneadmin            
GROUP          : oneadmin            
REGISTER TIME  : 05/11 12:32:56      

PERMISSIONS                                                                     
OWNER          : um-                 
GROUP          : ---                 
OTHER          : ---                 

TEMPLATE CONTENTS                                                               
CPU="100"
DISK=[
  BUS="virtio",
  DRIVER="raw",
  IMAGE="Master",
  IMAGE_UNAME="oneadmin" ]
FEATURES=[
  PAE="no" ]
MEMORY="1024"
NAME="kvm02"
NIC=[
  NETWORK="kvm02",
  NETWORK_UNAME="oneadmin" ]
OS=[
  ARCH="x86_64",
  BOOT="hd" ]
RAW=[
  TYPE="kvm" ]
TEMPLATE_ID="23"
VCPU="1"


That's my instantiated template_

VIRTUAL MACHINE 429 INFORMATION                                                 
ID                  : 429                 
NAME                : one-429             
USER                : oneadmin            
GROUP               : oneadmin            
STATE               : FAILED              
LCM_STATE           : LCM_INIT            
START TIME          : 05/11 12:34:53      
END TIME            : 05/11 12:35:51      
DEPLOY ID           : -                   

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

PERMISSIONS                                                                     
OWNER               : um-                 
GROUP               : ---                 
OTHER               : ---                 

VIRTUAL MACHINE TEMPLATE                                                        
CPU="100"
DISK=[
  BUS="virtio",
  CLONE="YES",
  DATASTORE="kvm02",
  DATASTORE_ID="105",
  DISK_ID="0",
  DRIVER="raw",
  IMAGE="Master",
  IMAGE_ID="20",
  IMAGE_UNAME="oneadmin",
  READONLY="NO",
  SAVE="NO",
  SOURCE="/dev/vg01/master",
  TARGET="hda",
  TM_MAD="lvm",
  TYPE="DISK" ]
ERROR=[
  MESSAGE="Error executing image transfer script: Error cloning /dev//dev/vg01/master//dev/vg01/master to /dev//dev/vg01/master//dev/vg01/master-429-0",
  TIMESTAMP="Fri May 11 12:35:50 2012" ]
FEATURES=[
  PAE="no" ]
MEMORY="1024"
NAME="one-429"
NIC=[
  BRIDGE="br0",
  IP="176.9.163.37",
  MAC="02:00:b0:02:a3:04",
  NETWORK="kvm02",
  NETWORK_ID="10",
  NETWORK_UNAME="oneadmin",
  VLAN="NO" ]
OS=[
  ARCH="x86_64",
  BOOT="hd" ]
RAW=[
  TYPE="kvm" ]
TEMPLATE_ID="23"
VCPU="1"
VMID="429"

VIRTUAL MACHINE HISTORY                                                         
 SEQ        HOSTNAME REASON           START        TIME       PTIME
   0 kvm02.ams-cloud   erro  05/11 12:35:46    0d 00:00    0d 00:00












On 10.05.2012, at 20:01, Jaime Melis wrote:

> Hello Yves,
> 
> there was a big change from OpenNebula 3.2 to 3.4, and we pulled out the LVM drivers temporarily. The new LVM drivers are already in place for the next OpenNebula release 3.6 [1][2][3].
> 
> However, those new drivers will not work for as-is OpenNebula 3.4, you will need to apply the following patch:
> 
> --- a/src/tm_mad/lvm/clone
> +++ b/src/tm_mad/lvm/clone
> -VM_ID=$3
> +VM_DIR=$(basename `dirname $DST`)
> 
> Note that I haven't tested it with OpenNebula 3.4, but they should work like that. If it doesn't, please let me know and I'll be glad to help.
> 
> [1] http://opennebula.org/documentation:rel3.6:lvm_ds
> [2] https://github.com/OpenNebula/one/tree/master/src/datastore_mad/remotes/lvm
> [3] https://github.com/OpenNebula/one/tree/master/src/tm_mad/lvm
> 
> Cheers,
> Jaime
> 
> On Thu, May 10, 2012 at 7:06 PM, Vogl, Yves <vogl at adesso-mobile.de> wrote:
> Hi,
> 
> I've setup OpenNebula 3.4 together with 5 KVM hosts.
> Those 6 hosts are member of a clustered LVM. 
> 
> The OpenNebula host holds the „Master“ image in form of a logical volume "/dev/vg1/master".
> Every KVM host synchronizes with this image and therefore has a local copy of this image represented by its own "/dev/vg1/master" volume.
> 
> Now I'd like OpenNebula to deploy a virtual machine by creating a new logical volume as LVM snapshot from /dev/vg1/master - manually it'll look like this on the KVM host:
> 
> # lvcreate -n vm01 -L40G -s /dev/vg1/master 
> 
> When the virtual machine is removed, I just need a:
> 
> # lvremove -f /dev/vg1/vm01 
> 
> 
> I've read in the change logs of OpenNebula 3.2 that the tm_lvm driver was removed and superseded by the iSCSI driver.
> I'm clueless… iSCSI simply is not LVM…
> 
> 
> My next step would be to create a custom transfer manage to realize the steps I need.
> But… do I really need to do this? 
> 
> 
> Help from someone who's running the same setup is greatly appreciated :-)
> 
> 
> Thanks so far,
> 
> Yves
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> 
> 
> 
> 
> -- 
> Jaime Melis
> Project Engineer
> OpenNebula - The Open Source Toolkit for Cloud Computing
> www.OpenNebula.org | jmelis at opennebula.org




More information about the Users mailing list