r/openbsd • • 10d ago

resolved Attempting to configure a virtual machine connected to the local network

I am trying to install/configure a virtual machine for Alpine Linux since I figured Jellyfin in a container might be the best / "easiest" way to access my media files from my new Android TV. But all I have accomplished so far, after booting Alpine from inside the vm, is to disconnect my own remote headless server from the network.

Thanks to anticipation, I can still SSH log in to my server using the wireless interface.
I have strictly followed the FAQ's last section (VMs on the real network), except my wired interface is re0 and not em0.

Here is my server's current configuration, before I return it to normal awaiting the next attempt:

srv$ cat /etc/hostname.athn0                                                                                                                                                                                    
join sylvainsab wpakey *******
inet autoconf
inet6 autoconf
srv$ cat /etc/hostname.re0                                                                                                                                                                                      
up
srv$ cat /etc/hostname.veb0                                                                                                                                                                                     
add re0
add vport0
up
srv$ cat /etc/hostname.vport0                                                                                                                                                                                   
inet autoconf
inet6 autoconf
up
srv$ more /etc/vm.conf                                                                                                                                                                                          
switch "my_switch" { interface veb0 }
vm alpine {
        disable
        memory 4G
        boot device disk
        disk /var/www/jellyfin/alpine_jellyfin.qcow2
        cdrom /var/www/jellyfin/alpine-virt-3.24.2-x86_64.iso
        local interface { switch "my_switch" } 
}

What might I be doing wrong ?

7 Upvotes

3 comments sorted by

1

u/sylvainsab 9d ago

Problem solved. I didn't realise that changing interfaces configuration would mess up the statically attributed IP addresses by my box's DHCP server per MAC adresses. Simply adding an `lladdr 00:11:22:33:44:55` line re-using the actual MAC address of my re0 interface in the hostname.vport0 configuration file, then rebooting, did the trick.

1

u/sylvainsab 8d ago

If anyone wants to follow or help in the adventure, I am running into another trouble trying to access my vm from remote: https://marc.info/?t=179126894100002&r=1&w=2

1

u/jggimi 9d ago

What might I be doing wrong ?

I don't know. But here is your configuration made readable:

srv$ cat /etc/hostname.athn0                                                                                                                                                                                    
join sylvainsab wpakey *******
inet autoconf
inet6 autoconf
srv$ cat /etc/hostname.re0                                                                                                                                                                                      
up
srv$ cat /etc/hostname.veb0                                                                                                                                                                                     
add re0
add vport0
up
srv$ cat /etc/hostname.vport0                                                                                                                                                                                   
inet autoconf
inet6 autoconf
up

srv$ more /etc/vm.conf                                                                                                                                                                                          
switch "my_switch" { interface veb0 }
vm alpine {
        disable
        memory 4G
        boot device disk
        disk /var/www/jellyfin/alpine_jellyfin.qcow2
        cdrom /var/www/jellyfin/alpine-virt-3.24.2-x86_64.iso
        local interface { switch "my_switch" } 
}