Home > Blogs > VMware Fusion Blog > Monthly Archives: October 2008

Monthly Archives: October 2008

Windows 7 in a VM on VMware Fusion 2: Unity view too!

Dom Barnes twittered us at the VMware Fusion twitter address @vmwarefusion this morning, noting that he’s running a developer preview of Windows 7, the successor to Windows Vista, in a virtual machine on his MacBook Pro with VMware Fusion.

We were intrigued, of course, and my immediate response was, “Cool! Is Unity view working?”

Turn out, sure enough, it is.  And to prove it, Dom posted a screenshot of Windows 7, running in Unity view on Flickr.  Check it out:

Windows 7 running in Unity on Flickr - Photo Sharing!

Thanks for sharing Dom!


Tip: Defragmentation

As you use a computer, over time your files will tend to get scattered around the disk. This scattering is called fragmentation, and can slow down performance as the disk head has to seek back and forth between fragments (Note: doesn’t apply to solid state media, which doesn’t involve disk heads). Defragmentation (or defragging) is the act of reversing the process, putting order back into your system. With virtual machines, proper defragmentation is a little more complex than it is on a physical machine because of the layers involved.

Before we begin, it’s important to note that defragmentation isn’t a necessary task – your virtual machine will still work just fine even if you never defrag, and the effects of fragmentation are usually not noticeable. Personally, I’ve never feel the need to defrag. However, if for some reason you do feel the need to defrag, here’s how to do it. Note that snapshots get in the way of proper defragmenting.

Continue reading

VMware Fusion 2 Keyboard Mapping in the Wild: Visual Studio Shortcuts Edition

imageChris Chew is a .NET developer who recently switched to a MacBook Pro as his primary machine.  Of course, because Visual Studio, the integrated development environment for .NET development, only runs on Windows, Chris is running Windows on his Mac using VMware Fusion 2. 

Chris has a great blog post up about how he’s using VMware Fusion 2’s keyboard mapping functionality to access the “generate” Resharper shortcut—which requires “Alt + Insert,” two keys which don’t exist on the Mac.  You can read more about it on the post.

And to learn more about VMware Fusion 2’s keyboard mapping feature, you can check out the video below.

And for people already using VMware Fusion’s keyboard mapping feature, how are you using it?  For which applications and which keystrokes?  Sound off in the comments!

Keyboard Mapping in VMware Fusion 2 from VMware Fusion on Vimeo.

VMware Fusion 201: Sparse Virtual Disks

If you’re new to virtualization and computers, you might be confused about why deleting a virtual machine doesn’t seem to free up the space you think it should, or why the guest might be complaining it’s out of space when there’s plenty left on the host (or vice versa). Why this happens becomes clearer when you start thinking in layers.

Before we begin, one common misconception is that Fusion somehow partitions the physical drive – not so! For normal virtual machines, a virtual disk is simply a (probably pretty large) file. We use normal OS X file operations to access it. For Boot Camp virtual machines, there is partitioning of the physical drive involved, but Fusion doesn’t do it – you did it when you set up the Boot Camp partition in the first place. While we do use raw disk access for Boot Camp virtual machines, again, it’s by standard OS X APIs.

By default, VMware Fusion uses what are called "sparse" disks. That is, we don’t grab space upfront, but rather as needed. In the diagram, chunks of space (for technical users, blocks) are represented as squares; colored ones are occupied, white ones are unused. The guest (green) thinks it has an entire 20 GB (or whatever) drive. However, if the guest has only ever written 5 GB to the drive, the .vmdk file (red) will only be 5 GB, not 20. The host (blue) can store the .vmdk however it wants on the actual hard drive, perhaps interspersed with other files (grey).

Since Fusion doesn’t grab space upfront, deleting a virtual machine with a 20 GB disk might not (actually, probably will not) free up exactly 20 GB of space. It can be less (as in this example) or more (if you have a snapshot, which I’ll cover in a later post). There are other files in a virtual machine, but the virtual disk is usually most of it.

Each layer is (at least somewhat) separated from the others, which can lead to some misunderstandings. For example, if you run out of space in the host, it doesn’t matter if you still have 10 GB left in the guest – there’s simply nowhere to put the data. Conversely, even if you have 100 GB left on the host, if the guest has used up the entire (virtual) hard disk, it can’t write any more data. Keep an eye on free space in both the host and the guest.

The main advantage of using sparse virtual disks is, well, that they take up less space. As always, there’s a tradeoff involved, but we think the benefits for most people outweigh the inconveniences. In the next VMware Fusion 201 post I’ll talk about your other option, preallocated virtual disks.

Tip: Resource Monitoring

Sometimes your Mac might not run as quickly as you expect, and you’d like to know why. A good first stop that all Mac users should be aware of is Activity Monitor, located in /Applications/Utilities/. This program lets you see various statistics about what’s running on your Mac, as well as overall statistics like RAM, disk, and network usage. If you select a process, you can choose to sample it – for a short period the state of the program is periodically recorded, which helps developers figure out where a program is spending all its time.

If you’ve read A Beginner’s Guide to VMware Fusion, you know that Fusion really consists of two processes – a UI process called "VMware Fusion", which handles user input, and a backend process called vmware-vmx which does all the real work of virtualizing your guest. If you run multiple virtual machines, you’ll have a vmware-vmx for each guest but only one UI process. One catch is that vmware-vmx is root-owned, so if you want to see it in Activity Monitor, you need to select All Processes to be shown.

If you recall my previous post, we should try to think in layers. Activity Monitor only covers the host and Fusion layers, but things aren’t broken down beyond that. To see what’s going on inside the guest, we need guest-specific tools. A virtual computer is very similar to a physical computer, so we start with the same tools you would use on a real machine.

For Windows guests, a good next step is to check out Task Manager. You can get to Task Manager by Virtual Machine > Send Ctrl-Alt-Del. Note that unlike Activity Monitor, Task Manager has an entry for unused time, which falls under System Idle Process. In this example, I’ve just started Steam.

For Linux guests, a good next step is to use a tool like top or ps. These are both command-line programs, so open a terminal in the guest and run one. In this example, I’m applying a system update.

If you’re interested in this sort of thing, much more has been written on the subject by other people. This is just the very basics, intended to get you thinking about how to keep track of what’s going on in a virtual machine.

New MacBook Reviewed at Mobility Today; VMware Fusion 2 Again Features

First Look_ Apple Macbook @ Mobility TodayJust yesterday we blogged about Walt Mossberg’s review of the new MacBook complete with VMware Fusion 2.

Today we noticed another exhaustive review, complete with screencast, of the new MacBook over at Mobility Today with David Ciccone.

Well, sure enough, David’s review features heavily VMware Fusion running a Windows Vista virtual machine, and according to David, it’s smoking fast on his new MacBook.

Check out David’s video of the new MacBook running VMware Fusion 2 and Vista:

VMware Fusion 2 University: Video Tutorials for VMware Fusion

As part of our launch of VMware Fusion 2, our delightful eLearning department at VMware put together more than a dozen video tutorials to help VMware Fusion users get the most out of the product.

And what’s more, they’ve made them freely available to all the world, so people thinking about maybe using VMware Fusion can get an idea about what it’s like to run Windows on the Mac.

Topics include things like creating a Windows virtual machine, migrating an existing PC to a virtual machine, using all the great Mac-Windows sharing features, and more.

The tutorials are accessible on the VMware Fusion homepage, on the “Resources” tab, along with a variety of other great tools and resources.

They can also be accessed via the “Help” menu via the VMware Fusion user interface.

Picture 1

Below you can find the first in the series, “Create a Virtual Machine and Install Windows XP.”

New MacBook Gets Thumbs Up from Walt Mossberg; Windows Apps Included!

Apple - MacBook - Graphics Last week, Apple announced a new lineup of notebook computers, revamping the MacBook and MacBook Pro lines with a new aluminum shell, new LED-powered screens, and more.

Today, Walt Mossberg reviewed the new MacBook in his column for the Wall Street Journal.  His verdict?  He’s a fan.  Walt liked the new trackpad, especially the integrated button in the trackpad.

But he also really liked the power of the MacBook.  He thought it ran Mac apps great, but even better, he thought it ran Windows applications great too, using his favorite way to run Windows on the Mac: VMware Fusion 2. 

Walt tested the MacBook with Windows XP on VMware Fusion 2, and talks about using Outlook and Internet Explorer side by side with his Mac apps.  Worked great in his tests.

Here’s Walt’s video review of the new MacBook:

And for reference’s sake, here’s Walt’s video review of VMware Fusion 2 from a couple weeks ago.


VMware Fusion 201: Layers

When you run an application in a virtual machine, there are several things going on at the same time. At the lowest level is the host – in our case, OS X. On top of that is the virtualization layer, Fusion. Then there’s the guest OS, and finally any applications you’re running in the guest. If you want to think about, troubleshoot, or simply appreciate virtualization, you need to think in layers.

Suppose you ran into a problem in iTunes – maybe a song skips every time it reaches 1:17. It wouldn’t make much sense to try to fix the problem in iChat. Similarly, if something’s wrong at one layer of a virtual environment (say in the guest OS), the first thing you should do is probably not to try to fix it in a completely different layer (say the host OS).

If some program is displaying a message and you’re not sure what it means, a good first step is to pay attention to where it comes from – does it look like something you expect to see in the host or the guest? If the message is from Fusion, does it specifically mention the host or the guest? For example, if a message refers to a C: drive, it’s probably not from OS X or Fusion. Conversely, if you’re in single window mode and get a message outside the console window, it’s probably not from the guest.

This isn’t to say the layer theory is completely perfect – it’s possible for problems in one layer to affect others. However, it’s a useful first step.

Tip: Security

One of the nice things about virtualization is that you can run just about any program you can on a physical computer. One of the drawbacks of virtualization is that you can run just about any program you can on a physical computer. Why the seeming contradiction? While most programs are useful things you’ll install yourself, malware like trojans, viruses, worms, and so on are also all programs – and will happily run in a virtual machine. Unfortunately, malware authors frequently forget to set the Evil Bit, so it’s not simple to only run "good" programs.

From a security standpoint, you should treat a virtual machine just like you would a physical computer. For most users, this means you should have a firewall, antivirus, and software updates turned on. If you don’t need networking, disable it. Don’t visit shady websites or run untrusted programs.

If you’re a longtime Mac user, you’ve probably never needed to worry about this sort of thing; simply running OS X is a good first line* of defense in a Windows-centric world. But if you run Windows in a virtual machine, you need to be able to think like a Windows user.

* Disclaimer: Using a Mac is not a silver bullet, so
don’t get too complacent – malware could still theoretically hit us.
But it’s less likely.

Personally speaking, most of my virtual machines have no need for network access, so I disable networking (and actually remove the virtual network card to make sure I can’t accidentally enable it). With no networking, there’s no need for a firewall. If I need to get programs or data into the virtual machine, I use drag-and-drop or a read-only HGFS shared folder. I don’t keep important data in my virtual machines or allow them write access to HGFS shared folders, so even if something somehow gets through to the guest and runs amok, I won’t lose anything important. My setups are pretty simple, but if I had a complex one (e.g. if I had to spend hours installing software), I would back up a clean copy. Because of all this, I feel like I can get away without antivirus.

I suppose the managers and PR folks would want me to point out that Fusion 2.0 comes with a complimentary 1-year subscription to McAfee VirusScan Plus, which will run on 32-bit Windows 2000, XP, Vista, and 64-bit Vista. If you’re not a McAfee fan or are using other guest OSes, that’s cool; you can use whatever you want. My point is simply that you do need to take precautions even with a virtual machine.