LINSTOR addon 3.x: VM disks are created in image resource group instead of system datastore

Hello,

I recently migrated from the unofficial linstor_un driver to the official addon-linstor (v3.0.5) and noticed a change in behavior regarding VM disk placement.

Environment

  • OpenNebula: 7.0.1
  • LINSTOR addon: 3.0.5
  • Storage backend: LINSTOR + DRBD
  • Cluster: 3 frontend nodes, multiple hypervisors

Problem

When instantiating a VM, I explicitly select a SYSTEM datastore for disk placement (e.g. nebula-system-ssd-pc2, ID=107).

However, the VM is deployed using a system datastore (selected by scheduler), but the actual LINSTOR resource is created in the image datastore resource group (nebula-images)

Example

Selected in Web-UI

  • Placement → Datastore: nebula-system-ssd-pc2 (ID=107)

Resulting VM

A different system datastore is selected by the scheduler (ID=108):

VIRTUAL MACHINE HISTORY                                                         
SEQ UID  REQ   HOST         ACTION       DS           START        TIME     PROLOG
  0 -    -     hyperdev01   none        108  03/20 05:55:30   0d 01h00m   0h00m12s

Datastore configuration

Image datastore (ID=109):

DATASTORE TEMPLATE                                                              
ALLOW_ORPHANS="yes"
BRIDGE_LIST="hyperdev01 hyperdev02"
CLONE_TARGET="SYSTEM"
CLONE_TARGET_SHARED="SYSTEM"
CLONE_TARGET_SSH="SYSTEM"
COMPATIBLE_SYS_DS="107,106,108,0"
DISK_TYPE="BLOCK"
DISK_TYPE_SHARED="BLOCK"
DISK_TYPE_SSH="BLOCK"
DS_MAD="linstor"
LINSTOR_CONTROLLERS="192.168.250.101:3370,192.168.250.102:3370,192.168.250:3370"
LINSTOR_RESOURCE_GROUP="nebula-images"
LN_TARGET="NONE"
LN_TARGET_SHARED="NONE"
LN_TARGET_SSH="NONE"
PERSISTENT_SNAPSHOTS="YES"
RESTRICTED_DIRS="/"
SAFE_DIRS="/var/tmp"
TM_MAD="linstor"
TM_MAD_SYSTEM="ssh,shared"
TYPE="IMAGE_DS" 

System datastore with resource-group place count 2 (ID=107):

ALLOW_ORPHANS="yes"
BRIDGE_LIST="hyperdev01 hyperdev02"
DISK_TYPE="BLOCK"
DS_MIGRATE="YES"
LINSTOR_CONTROLLERS="192.168.250.101:3370,192.168.250.102:3370,192.168.250:3370"
LINSTOR_RESOURCE_GROUP="nebula-system-ssd-pc2"
RESTRICTED_DIRS="/"
SAFE_DIRS="/var/tmp"
SHARED="YES"
TM_MAD="linstor"
TYPE="SYSTEM_DS" 

LINSTOR resource

╭────────────────────────────────────────────────────────────────────────╮
┊ ResourceName                    ┊ ResourceGroup ┊ Layers       ┊ State ┊
╞════════════════════════════════════════════════════════════════════════╡
┊ OpenNebula-Image-37-vm288-disk0 ┊ nebula-images ┊ DRBD,STORAGE ┊ ok    ┊
╰────────────────────────────────────────────────────────────────────────╯

LINSTOR resource groups

╭─────────────────────────────────────────────────────────────────────────╮
┊ ResourceGroup         ┊ SelectFilter             ┊ VlmNrs ┊ Description ┊
╞═════════════════════════════════════════════════════════════════════════╡
┊ DfltRscGrp            ┊ PlaceCount: 2            ┊        ┊             ┊
╞┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╡
┊ nebula-images         ┊ PlaceCount: 1            ┊ 0      ┊             ┊
┊                       ┊ StoragePool(s): ssd-pool ┊        ┊             ┊
╞┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╡
┊ nebula-system-ssd-pc1 ┊ PlaceCount: 1            ┊ 0      ┊             ┊
┊                       ┊ StoragePool(s): ssd-pool ┊        ┊             ┊
╞┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╡
┊ nebula-system-ssd-pc2 ┊ PlaceCount: 2            ┊ 0      ┊             ┊
┊                       ┊ StoragePool(s): ssd-pool ┊        ┊             ┊
╞┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╡
┊ nebula-system-ssd-pc3 ┊ PlaceCount: 3            ┊ 0      ┊             ┊
┊                       ┊ StoragePool(s): ssd-pool ┊        ┊             ┊
╰─────────────────────────────────────────────────────────────────────────╯

Is it possible to make OpenNebula create VM disks in the system datastore resource group instead of inheriting from the image?

Hello @Get_Smile,

Apologies for the delay in the reply. From what I could investigate, this behavior is expected with the current LINSTOR add-on 3.x integration. VM disks are created in the image resource group by design, as LINSTOR handles placement differently compared to traditional system datastore workflows.

I suggest you to check this post from Linbit: How to setup Linstor on OpenNebula.
Or check for some support on Linbit forum, or User Guides and Product Documentation, also from Linbit.

Regards,

1 Like