What’s a Virtual Machine?

A “Virtual” machine is a program that runs on a computer that emulates another computer.  For example, there’s an arcade game emulator called MAME (Multiple Arcade Machine Emulator) that can pretend to act like one of the computers inside a coin operated arcade machine.  People have used special hardware to copy the ROM images off the chips in the arcade machines and have made them available for download over the internet.  Anyone that downloads one of the ROM image files can load it up in MAME and run the actual coin operated game on their home computer.  The game program that’s running in the virtual machine has no idea that it’s NOT running on a real arcade machine.  It runs exactly as if it were in the arcade.  It even expects you to drop quarters in it.

image

image image

This game, “Pac-Man Plus” is NOT a PC game and was not written for PC operating systems or for PC hardware.  It’s completely incompatible with it.  But, as you can see, it’s running on a Windows machine.  It’s because of the MAME software which is emulating a completely different machine.  The Emulator (or “Virtual Machine”) is looking at the instructions in the game code and interpreting them, one at a time, and figuring out what that game is intending to do on the arcade hardware, and doing is instead doing it the Windows way.

There are many different types of emulators.  There are emulators for all the old game consoles like the old Atari 2600, Colecovision, Intellivision, Nintendo, Nintendo 64, GameCube, PlayStation, Sega GameGear handheld, Nintento DS, GameBoy, even emulators for the old Commodore 64 and Apple // and Macintosh (the old 6800 version, the PowerPC version, and now the Intel version with OSX).

But, when you emulate a desktop computer, the term “Virtual Machine” is usually used rather than the term “emulator”, though, they’re both the same thing, technically speaking… They both use a piece of software to emulate another computer.

Today, virtual machine software is fairly common in the business environment for servers.  Some popular VM programs are VMWare, Virtual PC, Xen, and Parallels.  There are others, but these three are, by far, the most popular.  They all emulate a computer.  But, they usually emulate a computer that’s similar.  In other words, you run these on an Intel based PC (like any Windows machine or any modern Mac or Linux) and the VM software emulates another computer that’s also an Intel based computer.  Check out this screen shot of VMWare running under Windows 7, but running Ubuntu Linux 8.10 inside of it:

image

As you can see, the frame of the VMWare program is clearly a Windows application.  Inside the window, you can see a Linux desktop.  This is not a remote control session.  This version of Linux is actually running at the same time, on the same machine as Windows 7.  The Linux that’s running inside that window has no idea that it’s not the primary operating system on the computer.  As you can see on the left, I have several different virtual machines that I can run.  I can actually run several of them at the same time.

This is a great way to try out different operating systems without having to commit to one or reformat my hard drive to install one.  It also lets me test software in a sandbox environment without putting my real computer at risk.  Big companies use this type of software to consolidate multiple servers onto fewer machines.  They can also crank up a new server in a matter of minutes without having to deploy new hardware.  Each virtual machine thinks it’s a whole computer on the network and other computers on the network can talk to these virtual machines as if they actually are whole computers on the network.  Each one can get assigned a unique IP address, just like a real computer.  As a matter of fact, many web sites you visit are actually hosted inside of virtual machines.  Other computers on the network cannot tell that they computer they’re talking to is not a real machine.

Ubuntu Linux: Upgrade to 9.10 Karmic Koala Experience (Part 1)

…from a Windows user’s point of view.

I’m writing this as I’m upgrading.  Keep checking back for progress.

I’m a Windows guy at the moment, but am attempting to see if I can make Linux my primary desktop.  I’m starting off with the Linux distro Ubuntu 8.10 “Jaunty Jackalope” from a VMWarevirtual appliance” that had Ubuntu 8.10 already installed.  All I had to do was download it and start running (no installation needed).  Obviously, I’m running this in a VM (virtual machine) with VMWare.  Tonight, I decided to get back into IM (Instant Messaging… I do this about once a year and end up uninstalling it after a month or so because it’s too distracting).  I redownloaded Pidgen for Windows, got it configured with AIM, Yahoo, MSN, Google, ICQ, & Facebook.  Then I decided to do the same in Ubuntu.  Turns out this distro already has Pidgen installed.  Cool.

I then wanted to make sure I was upgraded to the latest version of Pidgen.  This is where the differences between Windows and Linux really slap you in the face.  For example, here’s how to upgrade to the latest Pidgen for Windows version via the Pidgen website:

image

Couldn’t be simpler (unless, Pidgen auto-updated itself).  Here’s how to update Pidgen for Linux (same website):

image

As much as I’d love to see Linux take off with the masses, this is why it won’t any time soon.  No, not because of this particular Pidgen upgrade, but this seems to be a constant theme for working in Linux.  Normal computer users (those that aren’t Geeks, like us) won’t put up with this or can’t put up with it.

Anyway, that was just a diversion from the primary task here of upgrading to 9.10.  Ubuntu notified me that it had found a new version (I didn’t have to go looking).  I told it to go ahead and update, while I was in the middle of chatting with a friend with Pidgen.  It finished downloading while we were still chatting, so I had it start the upgrade.

image

Wow!  12 hours?!?!?  It kept changing from 7 to 14 hours.  It’s currently estimating 9 hours now (about 15 or 20 minutes after I took that snapshot).  Anyway, that’s a LOOOOONG time.  To be fair, this is in a VM, which is expected to be slower that running it natively.  I’ll continue the article after it finishes this 9 hour task…

Here’s part 2 of my upgrade experience:

Ubuntu Linux: Upgrade to 9.10 Karmic Koala Experience (Part 2)

What’s a Message Queue?

A Message Queue is a technology used to transfer information from one computer to another, one message at a time.  A message is defined as any type of data (text or binary) that can be sent in one chunk.  The purpose of a message queue is to allow one (or more) programs or computers on a network to send messages to a central place.  Messages are guaranteed to be sent, even if the network is occasionally down.  This is accomplished with the client side drivers that receive the messages from the local applications and queues them up locally, if the network is down, until the network or the message queue server becomes available, then starts sending the messages across.

The message queue server hosts a message queue and can receive messages from any program or computer on the network.  Generally, another application will monitor the message queue for new messages and pull them off, then act on them appropriately.

Depending on which vendor’s MQ product you choose, you’ll have different priorities set on how messages are sent.  Some set priorities on guaranteeing that message always arrive in the right order, others set a higher priority on guaranteeing that a message is never duplicated.

Security:

Message Queues can be secured by denying write or read access to all but selected accounts.

There are many competing technologies available to support message queues.  Microsoft provides a message queuing technology built into Windows clients and servers called “Microsoft Message Queues”.  IBM has WebSphere MQ (formerly MQ Series).  Oracle has “Oracle Advanced Queuing”.  Java has “Java Message Services”.  There are many others available, both paid and free.

To Create a Message Queue in Windows:

  1. Right-Click “My Computer” and choose “manage”.
  2. Expand “Message Queuing”, then “Public Queues” (to see a list of message queues already set up on your server.  It’s not likely that there are already any there unless you or someone at your organization has manually set one up).image
  3. Right-Click “Public Queues” and choose “New” then “Public Queue” and give it a name.image
  4. Click “OK”.

You’ve now created a message queue.  Now programmers can write code to send messages to the queue and pop messages off the queue.  It’s probably a good idea to secure the queue too:

  1. Right-Click the queue, choose “Properties”.
  2. Click on “Security” tab and secure the queue.

What’s BitLocker?

Bit Locker was a feature first introduced in Windows Vista Ultimate that provided you the ability to encrypt your whole hard drive.  No one knows my Microsoft didn’t make this a standard feature of all versions of Windows.  If they really were concerned about security, they’d have done this.  Nevertheless, they did not.

image

Now that Windows 7 is out, it’s still restricted to the Ultimate version (or “Enterprise” version… same thing).

What’s a Virtual Hard Disk?

A virtual hard disk is a “fake” hard disk.  It’s usually just a file (or a list of files in a folder) that is treated as if it were an entire hard disk when using Virtual Machine software such as VMWare, Virtual PC, or Xen.  All of these products are programs that you can run, just like any other program on your computer, but instead of opening a document, like a spreadsheet, image, or text file, they open a virtual hard disk.  In fact, the program window displays what looks like your machine booting up from a complete power off state, showing the BIOS setup options, memory checks, the operating system booting up, until it eventually gets to the desktop.  But, it does all this, in a window!

For example, below, is screen shot of my Windows 7 Ultimate desktop, with FireFox open to my blog, and in the middle of the screen, a Virtual Machine that’s been booted up to the Ubuntu 8.10 Linux desktop.  Inside of that virtual machine, is the Linux version of FireFox open to a web page describing Ubuntu.

image

Now, my real boot drive does NOT have Linux on it.  It boots directly to Windows 7.  So the question is how does the virtual machine boot up to anything different?  Instead of booting up on a real hard drive, when I set up the Linux virtual machine, I told it to use a file instead of a real hard drive.  From my Windows 7 host machine, it’s just a file (a large file, but just a file, buried in a folder of my choosing).  When the virtual machine goes through its simulated boot cycle, the virtual machine software (VMWare in this case) tricks the VM (virtual machine) into thinking that the file is an actual hard drive and Linux happily uses it as such.  That file that’s on my Windows 7 machine, is the “Virtual Hard Disk”.

Windows 7 has a new feature that let’s you really boot from a virtual hard drive file.  But, it has to be a Virtual PC compatible hard drive file.  I couldn’t do it with my VMWare compatible virtual hard drive file that I created for the ubuntu Linux VM in the image above.

Windows 7 App Locker

Windows 7 provides a new security model that can restrict what applications can run on a PC.  This new model is called “App Locker”.  This is a feature that’s more likely to be used in an enterprise environment that in home computers.

image

You can create rules based on executables and installers and can white list DLLs.  Publish rules using information in a digitally signed app.  You can restrict apps based on version and per user basis.  For example, you can block an administrator from running certain software, in spite of the fact that they’re an administrator.  White listing is blocking all software except for a list of apps you will allow as opposed to black listing which means everything can run, except for explicitly stated apps.

User local group policy editor to set up these rules.

[youtube=http://www.youtube.com/watch?v=ZJT802mD8KU]

Windows XP Mode in Windows 7

Windows 7 doesn’t come with Windows XP Mode, but you can download it for free from here.  Essentially, Windows XP Mode is virtual machine software (called Virtual PC) that can emulate a whole other computer even running a completely different operating system than what your computer booted up to.  AND, it can run this other operating system AT THE SAME TIME as your primary (called “host”) operating system.  Windows XP mode is Virtual PC running a Windows XP virtual machine.

Here’s a video demonstrating how it works:

[youtube=http://www.youtube.com/watch?v=eNFczLYBtrA]

The purpose of this product is to allow you to go ahead and make the switch to Windows 7, but without losing compatibility with older software that may only work on Windows XP.

Windows Media Center

Windows Media Center is a program that provides a DVR like user interface to all of your videos, music, CDs, DVDs, photos, recorded TV, & FM Radio.  It, itself, is a DVR, if you have a TV Tuner card in your computer.  You can use it to schedule recordings for TV shows and movies.  Any computer hosting Windows Media Center can stream content to other computers AND to Windows Media Center compatible hardware like XBox and XBox 360 (called Windows Media Extenders).  In other words, you can stream content from your home PC to your big screen HDTV in the living room.  This works quite well, but getting the connection configured can be frustrating, especially if your computer is on a different floor in the house than your XBox and TV.  For streaming HD content, you’ll want a 100mb network connection or better.

image

Windows Media Center used to be an off-shoot version of Windows XP called Windows XP Media Center Edition.  With Windows Vista, Windows Media Center came with Windows Vista Home Premium and Windows Vista Ultimate.  With Windows 7, it comes with Windows 7 Home Premium and Windows 7 Ultimate.

Windows Media Center is great for archiving all of your home movies and using a Windows Media Center Extender (Like XBox 360) to stream your movies to your living room TV.

Windows 7 Home Group

image“Home Group” is a new feature of Windows 7 that allows multiple Windows 7 machines on the same local area network to more easily share files, music, printers, and such.  Any Windows 7 computer on the network can create a home group and set a password.  Other Windows 7 computers on the network can easily find these home groups and connect to them with the same password.  Each computer can control what’s shared from it to the other computers.

CPU, Cores, What are they and What’s the difference?

Modern PCs have 1 CPU, but multiple cores.  Most people don’t really understand what that means.  Here’s an explanation:

image

First, until a couple of years ago, most computers had one CPU with one core.  A CPU is an acronym for “Central Processing Unit”.  It’s that big chip with a big fan mounted on it inside your computer.  It’s what Intel and AMD make.  It’s essentially the brain of your computer.  It’s where all the thinking occurs.  When you run a program, whether it’s a game, a word processor, a spreadsheet, or just booting up the computer to load and run the operating system (Like Windows, Mac OSX, Linux, etc…), what happens is the CPU activates the hard drive and starts it activating the motors to spin the disk, to move the read/write arm back and forth to read the magnetic bits on the surface of the disk, then translates those positive and negative recordings into bits or 1’s and 0’s and copies them into the computer’s memory, which it then looks at them, one byte at a time.  Each one is a specific instruction for the CPU to do, like copy a byte of data from one memory location to another, add 2 numbers, etc…  The CPU can do millions or billions of these instructions per second, but it can only do ONE at a time.

http://techreport.com/r.x/core-i7/die-callout.jpg

Newer CPUs now have what are essentially 2 or more CPUs on the same chip.  But, they don’t call these CPUs anymore.  They call them “cores”.  You can now have multiple cores on one chip.  The chip that contains all the cores is now called the “CPU”.

With a multi-core CPU chip, all of them run, independently, at the same time, all executing their own set of instructions, without waiting on the other cores to finish theirs.  So, if your CPU has 2 cores, your CPU can actually do 2 things at once,  If your CPU has 3, 4, 6, or 8 cores, your computer can execute that many instructions at once.  In general, the more cores you have, the more things your computer can run in parallel, and hence, is faster.

A multi-core CPU is not to be confused with a Multi-CPU computer.  A computer with 2 or more CPUs actually has 2 more actual CPU chips on the motherboard, with a big fan mounted on each one.  Each CPU may have 1, 2, 3, 4, 6, or 8 cores.  Generally an operating system recognizes all these cores as separate CPUs.  OS’s don’t generally care wither the cores are one per chip or multiple cores per chip.  The only time that really matters is if the operating system provider has implemented some bizarre licensing rules that says if you don’t pay up, then they’ll limit your installed operating system from using more than one physical CPU chip, but will allow multiple cores on that one chip.  Windows 7 Home Starter Edition is one of many examples that implements this simply for a licensing reason.

It actually gets much more complicated and involved in that and there are exceptions to these rules of speed, but for a simple explanation, this suffices.

In general, more cores = faster and better.