running openbsd 4.6 under qemu

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

running openbsd 4.6 under qemu

Sam Watkins-2
I have been playing with qemu and finally found out how to get
networking going for OpenBSD and NetBSD guests.  If you are
interested, please check out my qemu page.  It shows my little
Eee PC running 10 operating systems at once!

  http://sam.nipl.net/qemu.html

The short answer for OpenBSD networking in qemu:

  config -ef /bsd
  disable mpbios
  quit


all the best!

Sam Watkins

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Henning Brauer
* Sam Watkins <[hidden email]> [2009-12-13 20:45]:

> I have been playing with qemu and finally found out how to get
> networking going for OpenBSD and NetBSD guests.  If you are
> interested, please check out my qemu page.  It shows my little
> Eee PC running 10 operating systems at once!
>
>   http://sam.nipl.net/qemu.html
>
> The short answer for OpenBSD networking in qemu:
>
>   config -ef /bsd
>   disable mpbios
>   quit

huh? many of us are using qemu on their laptops to hack on openbsd.
i'm not doing this, and i doubt any of the others does.

--
Henning Brauer, [hidden email], [hidden email]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Abel Abraham Camarillo Ojeda
Henning Brauer <[hidden email]> wrote:

> * Sam Watkins <[hidden email]> [2009-12-13 20:45]:
> > I have been playing with qemu and finally found out how to get
> > networking going for OpenBSD and NetBSD guests.  If you are
> > interested, please check out my qemu page.  It shows my little
> > Eee PC running 10 operating systems at once!
> >
> >   http://sam.nipl.net/qemu.html
> >
> > The short answer for OpenBSD networking in qemu:
> >
> >   config -ef /bsd
> >   disable mpbios
> >   quit
>
> huh? many of us are using qemu on their laptops to hack on openbsd.
> i'm not doing this, and i doubt any of the others does.
>
> --
> Henning Brauer, [hidden email], [hidden email]
> BS Web Services, http://bsws.de
> Full-Service ISP - Secure Hosting, Mail and DNS Services
> Dedicated Servers, Rootservers, Application Hosting

Yup, me neither need this to run OpenBSD on qemu...
DISCLAIMER: http://goldmark.org/jeff/stupid-disclaimers/ 
This message will self-destruct in 3 seconds.

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Sam Watkins-2
On Sun, Dec 13, 2009 at 02:53:48PM -0600, [hidden email] wrote:
> huh? many of us are using qemu on their laptops to hack on openbsd.
> i'm not doing this, and i doubt any of the others does.

> Yup, me neither need this to run OpenBSD on qemu...

Ok that's good!  It makes a big difference for me and some others
though.  How do you invoke what version of qemu?  I am using qemu
0.11.1 with kqemu (not kvm).  It also occurs I think with plain
qemu (no kqemu).  As I understand the problem (broken networking)
occurs when a newish qemu is combined with a newish openbsd, and
it also occurs with netbsd (if acpi or smp is enabled).

Sam

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Henning Brauer
* Sam Watkins <[hidden email]> [2009-12-13 22:26]:

> On Sun, Dec 13, 2009 at 02:53:48PM -0600, [hidden email] wrote:
> > huh? many of us are using qemu on their laptops to hack on openbsd.
> > i'm not doing this, and i doubt any of the others does.
>
> > Yup, me neither need this to run OpenBSD on qemu...
>
> Ok that's good!  It makes a big difference for me and some others
> though.  How do you invoke what version of qemu?  I am using qemu
> 0.11.1 with kqemu (not kvm).  It also occurs I think with plain
> qemu (no kqemu).  As I understand the problem (broken networking)
> occurs when a newish qemu is combined with a newish openbsd, and
> it also occurs with netbsd (if acpi or smp is enabled).

echo -n ' qemu'
/usr/local/bin/qemu -m 480 -hda /var/qemu/terak/virtual.hd \
    -nographic -net nic,macaddr=...,model=rtl8139 -net tap \
    -serial stdio >/var/log/terak 2>&1 </dev/null &

I omitted the macaddr to prevent all the lazu copy & pasters using
it :)

--
Henning Brauer, [hidden email], [hidden email]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Marco Peereboom
In reply to this post by Sam Watkins-2
ETHER=em0 BRIDGE=bridge0 qemu-system-x86_64 -no-fd-bootchk -hda boot.img -hdb 1.img -hdc 2.img -hdd 3.img -net nic,model=rtl8139 -net tap -nographic -serial stdio

don't use kqemu; it simply doesn't work right.

On Mon, Dec 14, 2009 at 08:28:04AM +1100, Sam Watkins wrote:

> On Sun, Dec 13, 2009 at 02:53:48PM -0600, [hidden email] wrote:
> > huh? many of us are using qemu on their laptops to hack on openbsd.
> > i'm not doing this, and i doubt any of the others does.
>
> > Yup, me neither need this to run OpenBSD on qemu...
>
> Ok that's good!  It makes a big difference for me and some others
> though.  How do you invoke what version of qemu?  I am using qemu
> 0.11.1 with kqemu (not kvm).  It also occurs I think with plain
> qemu (no kqemu).  As I understand the problem (broken networking)
> occurs when a newish qemu is combined with a newish openbsd, and
> it also occurs with netbsd (if acpi or smp is enabled).
>
> Sam

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Nick Guenther
On Sun, Dec 13, 2009 at 6:56 PM, Marco Peereboom <[hidden email]> wrote:
> ETHER=em0 BRIDGE=bridge0 qemu-system-x86_64 -no-fd-bootchk -hda boot.img -hdb 1.img -hdc 2.img -hdd 3.img -net nic,model=rtl8139 -net tap -nographic -serial stdio
>
> don't use kqemu; it simply doesn't work right.

How so? Does it crash the kernel or does it not talk to devices
properly or what?

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Marco Peereboom
It crashes, hangs and does other nasty stuff.  Someone who cares needs
to go over it.

On Sun, Dec 13, 2009 at 07:44:53PM -0500, Nick Guenther wrote:
> On Sun, Dec 13, 2009 at 6:56 PM, Marco Peereboom <[hidden email]> wrote:
> > ETHER=em0 BRIDGE=bridge0 qemu-system-x86_64 -no-fd-bootchk -hda boot.img -hdb 1.img -hdc 2.img -hdd 3.img -net nic,model=rtl8139 -net tap -nographic -serial stdio
> >
> > don't use kqemu; it simply doesn't work right.
>
> How so? Does it crash the kernel or does it not talk to devices
> properly or what?

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Stuart Henderson
In reply to this post by Sam Watkins-2
On 2009-12-13, Sam Watkins <[hidden email]> wrote:

> On Sun, Dec 13, 2009 at 02:53:48PM -0600, [hidden email] wrote:
>> huh? many of us are using qemu on their laptops to hack on openbsd.
>> i'm not doing this, and i doubt any of the others does.
>
>> Yup, me neither need this to run OpenBSD on qemu...
>
> Ok that's good!  It makes a big difference for me and some others
> though.  How do you invoke what version of qemu?  I am using qemu
> 0.11.1 with kqemu (not kvm).  It also occurs I think with plain
> qemu (no kqemu).  As I understand the problem (broken networking)
> occurs when a newish qemu is combined with a newish openbsd, and
> it also occurs with netbsd (if acpi or smp is enabled).

qemu in OpenBSD ports has patch-hw_rtl8139_c which enables timer
interrupts in the emulated RTL8139C+ (by defining the macro
RTL8139_ONBOARD_TIMER). Many other OS packages of qemu (and qemu-
derived emulators/VMs) of course don't have this.

Our driver for this nic uses the timer for simulated interrupt
moderation. There's a patch to disable this for 8139C+ (only) which
will help some of the emulators, it works ok with real hardware but
could use performance tests to see what sort of impact it has there
(this IC is used on the landisk where there isn't much [for want of
a better word] performance to spare).

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Todd T. Fries-2
In reply to this post by Henning Brauer
Penned by Henning Brauer on 20091213 20:57.07, we have:
| * Sam Watkins <[hidden email]> [2009-12-13 20:45]:
| > I have been playing with qemu and finally found out how to get
| > networking going for OpenBSD and NetBSD guests.  If you are
| > interested, please check out my qemu page.  It shows my little
| > Eee PC running 10 operating systems at once!
| >
| >   http://sam.nipl.net/qemu.html
| >
| > The short answer for OpenBSD networking in qemu:
| >
| >   config -ef /bsd
| >   disable mpbios
| >   quit
|
| huh? many of us are using qemu on their laptops to hack on openbsd.
| i'm not doing this, and i doubt any of the others does.
|
| --
| Henning Brauer, [hidden email], [hidden email]
| BS Web Services, http://bsws.de
| Full-Service ISP - Secure Hosting, Mail and DNS Services
| Dedicated Servers, Rootservers, Application Hosting

The confusion lies in the fact that the version(s) of qemu are different.

Current qemu releases (more recent than in the ports tree) do not run on
OpenBSD (have not been able to solve this yet *sigh*) so the above person has
Linux running natively and OpenBSD inside a newer qemu.  Originally it was
kvm that had this bug but looks like qemu is now bug-for-bug compatible with
this in recent versions of qemu. Whee.
--
Todd Fries .. [hidden email]

 _____________________________________________
|                                             \  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC                 \  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com             \  1.866.792.3418 (FAX)
| 2525 NW Expy #525, Oklahoma City, OK 73112  \  sip:[hidden email]
| "..in support of free software solutions."  \  sip:[hidden email]
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                                                 
              37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
                        http://todd.fries.net/pgp.txt

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Bob Beck-4
> Current qemu releases (more recent than in the ports tree) do not run on
> OpenBSD (have not been able to solve this yet *sigh*) so the above person
has
> Linux running natively and OpenBSD inside a newer qemu.  Originally it was
> kvm that had this bug but looks like qemu is now bug-for-bug compatible
with
> this in recent versions of qemu. Whee.

arch=qemu, arch=vmware anyone?

it's not like it's and acutal PC :)

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Todd T. Fries-2
Penned by Bob Beck on 20091214 13:43.50, we have:
| >
| > Current qemu releases (more recent than in the ports tree) do not run on
| > OpenBSD (have not been able to solve this yet *sigh*) so the above person has
| > Linux running natively and OpenBSD inside a newer qemu. ?Originally it was
| > kvm that had this bug but looks like qemu is now bug-for-bug compatible with
| > this in recent versions of qemu. Whee.
|
| arch=qemu, arch=vmware anyone?
|
| it's not like it's and acutal PC :)

Its not like its any different than a cira 2000 1st gen 1ghz AMD I have.

If I don't `ukc> disable apm' it freezes when interrupts are enabled.

On kvm and current qemu, if I don't `ukc> disable mpbios' it freezes when
it sets tty flags (aka tickles the serial ports).

Tom-a-toe, to-mah-toe
--
Todd Fries .. [hidden email]

 _____________________________________________
|                                             \  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC                 \  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com             \  1.866.792.3418 (FAX)
| 2525 NW Expy #525, Oklahoma City, OK 73112  \  sip:[hidden email]
| "..in support of free software solutions."  \  sip:[hidden email]
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                                                 
              37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
                        http://todd.fries.net/pgp.txt

Reply | Threaded
Open this post in threaded view
|

Re: running openbsd 4.6 under qemu

Sam Watkins-2
> arch=qemu, arch=vmware anyone?

Unlike with xen, it should not be necessary to create a different arch
to run things in qemu.  I was impressed that it can happily run the 9
different operating systems I tried with it, with very few problems.

I guess it's difficult to know whether the bug is in openbsd or qemu or
both.  IIRC some qemu people said it's to do with some difference in
handling / using interrupts which may be tickling a bug in qemu.

I think to fix it properly might need someone who is an expert qemu
developer qemu to work together with someone who is an expert with the
kernel in openbsd (or netbsd as the bug occurs there also).  I think
this would be worthwhile, but as I am expert in neither, I can't really
help much with this except to encourage it.  qemu does claim *bsd guest
compatibility so it would be good if a qemu developer would take the
initiative in organizing to fix these things.

The existance of a hackaround as I have described (disabling mpbios,
acpi, smp) means people can run openbsd and netbsd with networking in
current qemu under Linux or another host OS.  This can be good for
people like me who don't currently use bsd as their main OS, but want to
test software on it or try it out.

Sam