It seems that they are quite different... but...
Yup. Sure is confusing.
Imagine back in the days when "memory" sometimes meant RAM (which was short term), and sometimes meant disk space (which was long term storage). Well, that is what I was taught back in the days of the Apple 2. Trends have changed over the years.
Both types of "virtual machines" refer to a machine that is not physical, so they are both virtual machines. The term "virtual machine" was used by Java from the time of its invention in the mid to late 1990s. It referred to the fact that the compiler didn't compile into assembly language intended for any real physical CPU, but rather a "byte code" which was a specification if an imaginary computer platform. People were pleased to see the compatibility of software working well on multiple computer platforms, and some people speculated whether this conceptual design would be a major part of computing's future.
Today the term "virtual machine" tends to refer to an instance of software that emulates lots of details, including CPU registers and RAM, or software which performs a "higher level" of emulation capable of similar results, except frequently at higher speed.
As technology changes, I anticipate that some terminology will change, particularly if the words would sensibly apply to another concept.