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 31st October 2017
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Wink Network for vmm virtual machines?

Hi,

Can anyone guide me to configure a network for vmm virtual machines on OpenBSD 6.2? I have been trying to configure it for days, and I have not succeeded.
Reply With Quote
  #2   (View Single Post)  
Old 31st October 2017
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 456
Default

I used this guide by @jggimi a while ago but I'm not sure how much has changed since then:

http://daemonforums.org/showthread.php?t=10001

There is also the ever-reliable FAQ:

https://www.openbsd.org/faq/faq6.html#VMMnet

Also, if you detail exactly what you have tried so far then that will prevent duplication of effort by any who try to help.
__________________
Are you infected with Wetiko?
Reply With Quote
  #3   (View Single Post)  
Old 31st October 2017
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Default

This is what I have tried:

Put this line in /etc/sysctl.conf:
Quote:
net.inet.ip.forwarding=1
Put this line in /etc/pf.conf:
Quote:
match out on egress from !(egress) nat-to (egress)
Put this line in /etc/hostname.vether0:
Quote:
inet 10.9.0.1/24
Reboot

Run the following commands:
Quote:
vmctl create disk.drive -s 10g
sudo vmctl start install -c -b /bsd.rd -d disk.drive -i 1 -m 1g
After choosing (I)nstall on the virtual machine, I run this command on the host machine:
Quote:
sudo ifconfig bridge0 add vether0 add tap0 up
Back to the virtual machine, I set the vio0 network interface as 10.9.0.2, netmask 255.255.255.0, default IPv4 route 10.9.0.1, DNS server 10.9.0.1, but the virtual machine could not reach the internet:
Quote:
Let's install the sets!
Location of sets? (disk http or 'done') [http]
HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
HTTP Server? (hostname, list#, 'done' or '?') [openbsd.hk]
Server directory? [pub/OpenBSD/6.2/amd64]
Unable to connect using https. Use http instead? [no]
Reply With Quote
  #4   (View Single Post)  
Old 31st October 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
I used this guide by @jggimi a while ago but I'm not sure how much has changed since then ...
A lot has changed. That "How To" is missing a year of major developments and is somewhat out-of-date.

For networking, the biggest change has been the addition of local interfaces. See the -L option and the LOCAL INTERFACES section of the vmctl(8) man page.
Quote:
Originally Posted by notooth View Post
This is what I have tried...
This appears to be a reasonable set of provisioning steps. I'll guess your issue is caused by something you have not reported, such as the rest of your PF rule set. If you have a default block rule set, you must explicitly pass all desired network traffic for your host and guests.
Reply With Quote
  #5   (View Single Post)  
Old 31st October 2017
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Default

Quote:
Originally Posted by jggimi View Post
I'll guess your issue is caused by something you have not reported, such as the rest of your PF rule set. If you have a default block rule set, you must explicitly pass all desired network traffic for your host and guests.
My pf.conf file contains only that line.
Reply With Quote
  #6   (View Single Post)  
Old 31st October 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Then you have a default pass rule set. So PF is not the source of the problem. I'm not out of guesses, though. My second guess: Are you running a DNS server on your host? If not, then you've misconfigured your guest's domain name server address.

---

Local interfaces can simplify running vmm(4) guests. Once they became available I switched to using them exclusively for all of my guests. With a local interface, there is no need for a bridge(4), no need for any vether(4) device, and no need for static networking on guests. See my comments in my first post above regarding where to learn about this feature.
Reply With Quote
Reply

Thread Tools
Display Modes

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
KVM Virtual Machine network configuration J65nko Other BSD and UNIX/UNIX-like 3 2nd December 2014 06:00 AM
How to deploy pf.conf to multiple machines? Skinny OpenBSD General 2 5th July 2014 03:56 PM
allowing named machines only to connect via router daemonfowl OpenBSD Security 5 12th August 2012 04:26 AM
Rsync to compare two Synology - NAS machines? Broodjegehaktmetmayo Other BSD and UNIX/UNIX-like 0 24th June 2012 12:02 PM
What do do with these machines? billousek Off-Topic 8 11th June 2008 01:04 PM


All times are GMT. The time now is 09:06 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