Hardware Emulation in a Virtual Machine
Hardware Emulation in a Virtual Machine
First off, I have only used VirtualPC and real computers to test my OS. But, for the sake of convenience, is there a way to have a virtual machine that has emulated hardware modules?
As an example, is there a way for me to have a virtual 386+ machine with two NE2K complient network cards virtualized?
VPC doesnt give me control over the network cards in my real PC, at least not enough to access them through my OS.
As an example, is there a way for me to have a virtual 386+ machine with two NE2K complient network cards virtualized?
VPC doesnt give me control over the network cards in my real PC, at least not enough to access them through my OS.
Website: https://joscor.com
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
It's quite simple to do it under QEMU, I'll show a few examples...
QEMU 8.2, With 1 Realtek 8029(NE2000) and a Reltek 8139..
This boots a OpenBSD ramdisk kernel.. with 16mb of RAM..
Here are the devices as shown in dmesg...
Also, QEMU emulates DHCP - gateway & DNS.. within the 10/8 subnet
I'm not entirely sure how many cards you can emulate at a time.. but the supported "model=" options are: ne2k_pci, ne2k_isa, rtl8139, smc91c111 and lance.. you can even customize the MAC addresses using "macaddr=".
Have fun.. http://fabrice.bellard.free.fr/qemu/qemu-doc.html
QEMU 8.2, With 1 Realtek 8029(NE2000) and a Reltek 8139..
Code: Select all
qemu -net nic,model=ne2k_pci -net nic,model=rt8139 -fda floppy42.fs -boot a -m 16
Here are the devices as shown in dmesg...
Code: Select all
ne3 at pci0 dev 3 function 0 "Realtek 8029" rev 0x00: irq 10, address 52:54:00:12:34:56
re0 at pci0 dev 4 function 0 "Realtek 8139" rev 0x20: RTL8139C+ (0x7480), irq 9, address 52:54:00:12:34:57
I'm not entirely sure how many cards you can emulate at a time.. but the supported "model=" options are: ne2k_pci, ne2k_isa, rtl8139, smc91c111 and lance.. you can even customize the MAC addresses using "macaddr=".
Have fun.. http://fabrice.bellard.free.fr/qemu/qemu-doc.html
perfect.
I've never used that emulator before, but it seems to have way more functionality than VPC. Its even more perfect as right now I am used the rtl8139 chipset as test cards.
I've never used that emulator before, but it seems to have way more functionality than VPC. Its even more perfect as right now I am used the rtl8139 chipset as test cards.
Website: https://joscor.com
vmware lets you use an arbitrary number of network cards. They follow the AMD PCNet II spec.
The cake is a lie | rackbits.com
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
That adapter is for Gigabit networking, it's rather new.. probably quite complex?Candy wrote:Can QEmu do RTL8169 support?
For now, It only supports 10Mbit/100Mbit networking....
QEMU supports "AMD PCNet" as of 8.2, via the lance option IIRCucosty wrote:vmware lets you use an arbitrary number of network cards. They follow the AMD PCNet II spec.
You might have to explicitly enable it during ./configure.. probably not default yet.
Well, MS VPC 2007 emulates DEC 21140A 10/100 network card (aka Intel 21140). Win95, 98,... no problem, except for WfW 3.11.
Strangely enough, in QEMU, Win95 guest OS, I had to use the rtl8319 and the drivers from WfW... Win95 didn't recognize properly the NE2k card, also I failed at manual set-up.
Regards
inflater
Strangely enough, in QEMU, Win95 guest OS, I had to use the rtl8319 and the drivers from WfW... Win95 didn't recognize properly the NE2k card, also I failed at manual set-up.
Regards
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Is there a way in BOCHS or QEMU to set up 2 NIC's?? I've figured it out to set ONE up but not two exact same cards.
Website: https://joscor.com
I have the docs, it's a tiny bit easier than the RTL8139. You can tell that they're related by the way - most registers are equal and the access methods (and the bug I have right now that I can't figure out - memory access doesn't work) are equal too.Brynet-Inc wrote:That adapter is for Gigabit networking, it's rather new.. probably quite complex?Candy wrote:Can QEmu do RTL8169 support?
RTL8139 has four explicit TX descriptors and iirc one or four RX descriptors. The RTL8169 has three queues of descriptors fully in memory accessed as busmaster PCI device - so if you want to send hundreds of packets, it's much easier.