When I try to f8 the start up and go straight to a command prompt and start it from there I get an error saying you need 1024k of expanded memory. I tired to adjust the memory of the vm as shown above but I don't have enough ram available for the vm.
Expanded memory is a very old MS-DOS phenomenon. Windows versions up to Win98SE (ME was really a tweaked out version of 98) all still used an MS-DOS "kernel", MSDOS.sys, io.sys. The "shell" was command.com.
You can run DOS application from a pure command line with these OSes but some ancient drawbacks will come to light, such as the need for expanded memory. DOS was originally designed to use up to 640k (assuming the machine would only have about 1MB, leaving the difference to other functions...) of memory, which seems ridiculous today, but at the time that is how they made it. As it became clear that this was inadequate a number of memory schemes were developed to utilize more memory. Many DOS programs have specific needs regarding the first 640k (conventional memory), and you will have to do your own research to figure that out, but "upper memory", extended memory, and expanded memory refer to memory beyond 640k. You can set this up by editing config.sys (and probably autoexec.bat as well) to load memory managers emm386.exe and himem.sys.
Sorry to carry on like that, it's rare these days that I get to use this old knowledge. One could go into much more detail, but... the DOS version with Win98 is 7.1 I believe, and I would have thought that it would be "pre-setup" for extended memeory, but the GUI has its own system, so what the hell. For all that I can't tell you
exactly what to do, but if you look around a bit you should find more info on how to do this. Oh, you may also need to run MSCDEX.exe and possibly other DOS drivers get full functionality... (sound, mouse, etc. good old autoexec.bat...)