DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th November 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default Strange behavior of OpenBSD VM's created by Hyper-V Manager

Dear OpenBSD users,

For your information, I've detected some strange behavior while using OpenBSD VM's that have been created by Microsoft's Hyper-V Manager. In both installations I used Install, instead of Auto-Install.

1-Installed i386 OpenBSD 7.2 and there are missing files specifically in /etc like boot.conf, rc.conf.local.
2-Installed amd64 OpenBSD 7.2 and the result is same like above. There are missing files.
3-i386 couldn't detect the hvn0 interface but amd64 one did.

Best Regards.

Last edited by gordon.f; 24th November 2022 at 07:48 PM.
Reply With Quote
  #2   (View Single Post)  
Old 24th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

1 and 2: these two configuration files are not created during install unless the admin answers an install script question causing them to be provisioned, such as using a serial console or disabling xenodm(1).

3: OpenBSD/i386 does not support the hvn(4) driver -- it is not included with the i386 GENERIC kernel.
Reply With Quote
  #3   (View Single Post)  
Old 25th November 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi,

Thanks for the reply. The situation at #3 is well noted.
For #1 and #2, I chose I don't want to use X window system and I don't want to use com0 as default. Is this behavior(absence of files) related to those answers?
Reply With Quote
  #4   (View Single Post)  
Old 25th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Let's look at the 7.2 install script:
Code:
# Apply configuration settings based on the previously gathered information.
apply() {
    if [[ $START_SSHD == n ]]; then
        echo "sshd_flags=NO" >>/mnt/etc/rc.conf.local
    elif [[ -n $SSHD_ENABLEROOT ]]; then
        # Only change sshd_config if the user choice is not the default.
        if ! grep -q "^#PermitRootLogin $SSHD_ENABLEROOT\$" \
                /mnt/etc/ssh/sshd_config; then
            sed -i "s/^#\(PermitRootLogin\) .*/\1 $SSHD_ENABLEROOT/" \
                /mnt/etc/ssh/sshd_config
        fi
    fi

    [[ -n $APERTURE ]] &&
        echo "machdep.allowaperture=$APERTURE # See xf86(4)" \
            >>/mnt/etc/sysctl.conf

    [[ $START_XDM == y && -x /mnt/usr/X11R6/bin/xenodm ]] &&
        echo "xenodm_flags=" >>/mnt/etc/rc.conf.local

    if [[ $DEFCONS == y ]]; then
        cp /mnt/etc/ttys /tmp/i/ttys
        sed    -e "/^console/s/on  secure/off secure/" \
            -e "/^$CTTY/s/std.9600/std.${CSPEED}/" \
            -e "/^$CTTY/s/std.115200/std.${CSPEED}/" \
            -e "/^$CTTY/s/unknown/vt220    /" \
            -e "/$CTTY/s/off.*/on secure/" /tmp/i/ttys >/mnt/etc/ttys
        [[ -n $CPROM ]] &&
            echo "stty $CPROM $CSPEED\nset tty $CPROM" \
                >>/mnt/etc/boot.conf
    fi

    ln -sf /usr/share/zoneinfo/$TZ /mnt/etc/localtime
}
Reply With Quote
  #5   (View Single Post)  
Old 25th November 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi;

It says
Quote:
# Apply configuration settings based on the previously gathered information.
So I checked the previous pages of the link you've provided and there is a section related to $START_XDM variable. See below.
Code:
START_XDM=
	if [[ -n $(scan_dmesg '/^wsdisplay[0-9]* /s/ .*//p') ]]; then
		if [[ -n $(scan_dmesg '/^[a-z]*[01]: aperture needed/p') ]]; then
			ask_yn "Do you expect to run the X Window System?" yes &&
				APERTURE=$MDXAPERTURE
		fi
		if [[ -n $MDXDM && $resp != n ]]; then
			ask_yn "Do you want the X Window System to be started by xenodm(1)?"
			START_XDM=$resp
		fi
	fi
So I chose 'n' and just because of this code below
Code:
[[ $START_XDM == y && -x /mnt/usr/X11R6/bin/xenodm ]] &&
		echo "xenodm_flags=" >>/mnt/etc/rc.conf.local
I didn't get an rc.conf.local file. $START_XDM has to be equal to 'y', hasn't it?

What a script!
Reply With Quote
  #6   (View Single Post)  
Old 25th November 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

The defaults for rc.conf variables are stored in /etc/rc.conf, where you will see the default for xenodm_flags=NO.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory stream behavior in OpenBSD different from what is shown in APUE phillbush OpenBSD General 4 15th August 2020 01:11 AM
Python 3 strange behavior victorvas Programming 1 22nd December 2019 11:46 AM
OpenBSD OpenBSD disables Intel’s hyper-threading comet--berkeley News 3 16th November 2018 11:16 AM
strange behavior of PF majkelos OpenBSD Security 2 23rd October 2011 06:23 PM
Strange network behavior Weaseal Off-Topic 4 27th May 2008 05:34 PM


All times are GMT. The time now is 05:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick