Re: Netra T5220 and LDOMs

Irek Szcześniak <[email protected]> Mon, 19 Aug 2024 17:54:16 +0200
Newsgroups gmane.os.openbsd.sparc
Message-ID <[email protected]>
Thank you, Mark, for your response.  I managed to get the LDOMs work:
the control domain is OpenBSD, one guest is OpenBSD and another is
Debian.  It seems that the RAM assignment was the problem, as you
hinted.

My system has 32 GB.  With the factory-default, OpenBoot reports 32640
MB that is 128 MB short of the expected 32 GB.  So I configured the
primary domain with 16256 MB (16 GB - 128 MB), and the guest domains
with 8 GB each, and that works.  Then I tried to increase the RAM for
the primary domain just by 1 MB, and that failed.  So it seems that
exactly 128 MB is somehow needed.

As a side note, I might have run into some other problems because I
was reusing the files created by the init-system command, i.e., I was
changing ldom.conf and would run init-system again.  Once ldomctl even
crushed (SIGSEGV).  My guess is that the init-system command should be
run with the unmodified factory-default files only.

This is my ldom.conf:

domain primary {
        memory 16256 MB
}

domain puffy {
        vcpu 8
        memory 8G
        vdisk "/home/puffy/vdisk0"
        vdisk "/home/puffy/vdisk1"
        variable auto-boot?=false
        vnet
}

domain debian {
        vcpu 8
        memory 8G
        vdisk "/home/debian/vdisk0"
        vdisk "/home/debian/vdisk1"
        variable auto-boot?=false
        vnet
}

On 8/17/24 12:52, Mark Kettenis wrote:

>> Date: Sat, 17 Aug 2024 13:45:37 +0200
>> From: Irek Szcześniak <[email protected]>
>>
>> I've got more information.  Here:
>>
>> https://flak.tedunangst.com/post/OpenBSD-on-a-Sun-T5120
>>
>> I read to set in ILOM:
>>
>> set /HOST/bootmode config=configname
>>
>> Again, no effect.  Still in ILOM, I tried to list the domain configs,
>> but found none:
>>
>> -> show /HOST/domain/configs
>> show: Invalid target /HOST/domain/configs
>>
>> So it seems that downloading the LDOM configuration from OpenBSD took no
>> effect.
>>
>> Here:
>>
>> https://masto.theoks.net/@onekopaka/111873234122166837
>>
>> I found a note:
>>
>>   > My original intent was OpenBSD as the primary, but ldomctl
>>   > is generating configurations the hypervisor refuses to use.
>>   > Used ldm from within Solaris and that worked.
>>
>> So maybe the config that I generated was not accepted.
> 
> Yes, this is typically happens when you activate a config that is
> isn't entirely correct.  For example if you assign more memory than
> what is actually available.
> 
> The ldomctl(4) tool isn't very good at enforcing the appropriate
> constraints.  I've seen this happen with memory assignment for
> example.  It might be worth trying a configuration where you
> explicitly assign memory to all domains (including the primary domain)
> and leave some memory unassigned.
> 
>> On 8/16/24 20:30, Irek Szcześniak wrote:
>>
>>> Hi,
>>>
>>> I have a Sun Oracle Netra T5220 with the OpenBSD 7.5 running.  I wanted
>>> to create a guest logical domain (LDOM), and so I followed the example
>>> in the manual page of ldomctl.
>>>
>>> After I reset the system, the primary domain starts allright, but the
>>> guest domain does not:
>>>
>>> # ldomctl status
>>> primary    -    running    OpenBSD running    0%
>>>
>>> # ldomctl list
>>> factory-default [current]
>>> openbsd
>>>
>>> # ldomctl status openbsd
>>> ldomctl: unknown guest 'openbsd'
>>>
>>> In dmesg I can see:
>>>
>>> "ldom-primary" at vldc2 chan 0x1 not configured
>>>
>>> I would appreciate it if someone could help me out.
>>>
>>>
>>> Best,
>>> Irek
>>
>>