Converting ctl.conf to UCL
- Reply: Ryan Stone : "Re: Converting ctl.conf to UCL"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Jun 2021 16:51:29 UTC
I'm trying to use configure ctld to create virtual disks suitable for use with virtio-scsi (I'm working with a VM that is hardcoded to require scsi disks, so the other virtio disk providers unfortunately can't be used in my case). I would like to use ctl.conf in UCL format so I can use UCL's file inclusion facilities, which will simplify managing my configuration. Unfortunately, I'm having trouble converting a file to UCL format and I'm beginning to suspect that the manpage is missing something. Here is my test configuration, which does work for me: lun foo_test_storage0 { serial "f1-1-1"; path "/usr/local/vmrc/vm/foo-test/storageHDD0.img"; } lun foo_test_storage1 { serial "f1-1-2"; path "/usr/local/vmrc/vm/foo-test/storageHDD1.img"; } target "iqn.com.example:foo-test" { port "ioctl/11/1" lun 0 foo_test_storage0 lun 1 foo_test_storage1 } My attempt at a UCL version resulted in this: lun { foo_test_storage0 { serial = "f1-1-1" path = "/usr/local/vmrc/vm/foo-test/storageHDD0.img" } foo_test_storage1 { serial = "f1-1-2" path = "/usr/local/vmrc/vm/foo-test/storageHDD1.img" } } target { "iqn.com.example:foo-test" { port = "ioctl/11/1" lun = [ { number = 0, name = foo_test_storage0 }, { number = 1, name = foo_test_storage1 } , ] } } But I just get the error: Starting ctld. ctld: no LUNs defined for target "iqn.com.example:foo-test" This seems to match the sample in the manpage, so I'm confused as to what has gone wrong. Does anybody have any pointers?