[vox-tech] definition of a virtual machine

Alan H. Lake vox-tech@lists.lugod.org
01 Apr 2003 08:31:00 -0500


Yo, Pete.

I think you're on the right boat.  I have VMware.  I run RH 7.3 as the
host and can run NT, 98 and 95 simultaniously.  How it works internally
is something I don't know, but I am able to make some observations...

There are bridges from VMware to the hardware devices.  If I am using
the CD-rom (for example) when I start a virtual machine, VMware will
give me a warning message saying that the device is busy and won't be
available to the virtual machine.  If the device is not being used,
VMware will assign it to the virtual machine.  It will not be available
to another virtual machine, unless I virtually "disconnect" it from the
first machine.

Each VM is allocated memory (configurable).  This is real memory.  It's
no longer available to Linux or to any other virtual machine as long as
that machine is running.

My Windoze "hard drives" are Linux files.  VMware sports a virtual
network that works just like a physical network, Samba and everything.  

My Windows OSs are off-the-shelf products.  They have no idea that they
are running "virtual".  And, they run just fine.

If I were going to take issue with what you wrote (and I'm not certain
that I am), I'd take issue with the word "trick".  Here's why.  When my
application writes to a disk file (for instance), it's not really
writing to the disk.  It's communicating with the OS.  The OS, in turn,
has its drivers which change the form of my data so that I'm not writing
a file.  I'm modifying inodes, I'm writing sectors, etc., etc.  But, I
don't think of these things at all.  Is my computer "tricking" me?  No. 
This is just the process of getting from here to there.  In a virtual
machine, the process is different.  When I write to a file, it goes to
my guest OS and its drivers, which write to a virtual disk drive.  The
process of writing to a virtual disk drive involves communicating with
the host OS and its drivers to do the actual writing.  Therefore, there
are additional steps in the IO process, but that's all.

On Mon, 2003-03-31 at 15:39, Peter Jay Salzman wrote:
> can someone tell me if this is a formally correct explanation of what a
> virtual machine is?
> 
> pete
> 
> 
> A "real computer" provides an operating system many things, including a
> CPU, I/O channels, memory, a BIOS to provide low level access to
> motherboard and I/O resources, etc.  When an operating system wants to
> write to a hard drive, it communicates through a device driver that
> interfaces directly with the hardware device memory.
> 
> However, it's possible to give a program all the hardware resources it
> needs.  When it wants to access a hard drive, give it some memory to
> write to.  When it wants to set an IRQ, give it some bogus instructions
> that lets it think it set an IRQ.  If you do this correctly, then in
> principle, there's no way for the application to know whether it's
> really accessing hardware or tricked by being given resources which
> simulate hardware.  A virtual machine is the environment which tricks
> applications into believing they're running on a real computer.  It
> provides all the services that a real computer would provide.
> 		
> VM's were used initially in the 1960's to emulate time shared operating
> systems, but these days we use them to run software which was written
> for foreign operating systems, or more commonly, an entire operating
> system.  Because of the nature of the VM, the foreign OS can't tell the
> difference between operating in a VM or in a "real" machine.
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

________________________________________________________________________
Alan H. Lake
Lake Information Works   
6999 Dolan Road
Glouster, OH  45732-9003 
Phone: 888-806-4201
Fax:   309-279-8695 
Cell:  916-276-0913
Email: alan.lake@lakeinfoworks.com
Site:  www.lakeinfoworks.com