I have used Windows 98 in all the ways mentioned. Which method is best for you, depends on your situation.
Virtual Machine

To my knowledge no virtual machine runs Windows 98 or Windows 95 well, without emulation. It can be done, however. VM Ware and Virtualbox seem to be the most attempted.

Neither VM Ware nor VirtualBox typically support MIDI or Windows 98 display requirements without significant effort. A midi emulator can be enabled in VM Ware and Windows 95 has a working display driver. Neither directly solve the problems, and both are some trouble to setup.

Emulation
I have all of these emulation options set up at home. I strongly prefer 86Box.
86Box

The most accurate emulation available is probably 86Box. 86Box attempts to fully emulate the original hardware. This is especially useful for software development, and for very picky old programs. Other options can run faster, though.

Do to the poor performance of full emulation, I recommend emulating:
- Pentium or Pentium MMX @ 200Mhz or less.
- 196MB RAM
- Voodoo 2
- SoundBlaster 16 (PnP)
you can work on it from there.
QEMU

QEMU is made to run operating systems designed for almost any type of hardware. It is more focused on speed than 86Box, though.
QEMU can be the most difficult to use, but it can also be the fastest. It runs a lot like a virtual machine. Not limiting the CPU speed, and using “virtual hardware”. So there is much less overhead in emulating peripherals, like sound & video cards.
Setup Guides
QEMU – Wikibooks – Computer Newb
DOSBox
While a bit difficult to use, DOSBox has decent performance.
DOSBox-X

I personally use DOSBox-X because it is easier to use.
PCem

86Box is derived from PCem. PCem can be faster, and easier to use. It is less accurate though, if that matters to you.

PCem has been abandoned by it’s developer. No new versions are expected. Version 17 from January of 2022 is the last one.
Hardware
CPU & Motherboard/Planar
Windows 98 requires a i486 DX2/66 processor, or better. I would recommend a Pentium MMX or better. Pentium Pro may have some performance issues do to a change in register behavior from then on. Pentium III and Pentium 4 systems often support Windows 98.
While Windows 98 can be forced to run on an i386, this may be unstable. It is certainly undesirable. Socket 775 systems (Core 2) can sometimes run Window 98, but they aren’t usually designed for it.
Video Card
Voodoo2 or Voodoo3 or newer
Sound Card
Sound Blaster 16 (PnP) – Recommended for high compatibility.
