VMware

November 07, 2008

Tip: Control-click

Unlike OS X, most other operating systems require the use of multibutton mice. Most Mac users know you can ctrl-click to simulate a right click, and you can do that in Fusion as well. But what if you actually want to ctrl-click in the guest - say, to select multiple items in Explorer?

Mouseshortcuts In Fusion's Preferences, go to the Keyboard & Mouse tab, Mouse Shortcuts. Uncheck the secondary button shortcut (or map it to something else) - now you can ctrl-click in the guest.

If you still need to right click and don't want to remap to a different shortcut, there may be other options. For laptop users, you can enable two-finger right clicks in System Preferences > Keyboard & Mouse > Trackpad. If you have a Mighty Mouse, you can enable right click in System Preferences > Keyboard & Mouse > Mouse. And of course, since OS X has always supported multibutton mice, you can always plug in your favorite multibutton mouse.

November 05, 2008

VMware Fusion 2 University: Create a Virtual Machine from a PC with VMware Converter

Apple likes to talk about how 50% of all Mac purchasers are switching over to the Mac from the PC. 

Just recently, Apple’s COO, Tim Cook, Apple specifically called out VMware Fusion as one of the driving factors helping people to switch to the Mac, by making it easy to run the Windows apps you’ve come to love, or which don’t have Mac versions, on your Mac, virtually.

Bring your PC with you as you switch

One of the things that helps people do this, is the ability to move an existing PC, a physical Windows box, like a Dell or HP or what have you, to a virtual machine, to run on VMware Fusion.

Yes, it does sound like black magic, but really, it’s quite easy.  In fact, we provide a free tool, VMware Converter, which runs on pretty much any Windows OS, that will make a bit-by-bit virtual machine copy of your existing PC to run on any VMware virtual machine runtime (Fusion, of course, being this team’s favorite).

To help you get a better idea, here are two videos that show exactly how to switch to the Mac with VMware Fusion by bringing along your existing Windows PC.

These are both taken from the more than dozen VMware Fusion 2 video tutorials made freely available to help you get the most out of VMware Fusion 2.

VMware eLearning step-by-step video:

VMware Fusion team’s slightly sexier, though less exhaustive video:


Migrate Your Windows PC to your Mac with VMware Fusion from VMware Fusion on Vimeo.

November 03, 2008

Make Windows Unity windows look like Mac OS X Windows: WindowsBlinds with VMware Fusion

Chris White pinged us on Twitter the other day saying that he was using WindowsBlinds to skin his VMware Fusion Unity windows (Unity demo video here) in Windows look like Mac OS X windows.

We were intrigued, and asked him to take some screenshots to share with everyone.

Chris was nice enough to do so.

Here’s a shot of Internet Explorer with a Mac OS X WindowsBlinds skin on it.  The visual style is “Leo.”  Hmmmm…wonder what that stands for….?

Note how the “close” “minimize” and “maximize” buttons in the upper right of the window look like Mac OS X buttons:

20081103-qrq21jrp6hbcci3dfmim3r5629

And in a too-meta-moment, here’s a screenshot of the WindowsBlinds UI, which has itself been skinned!

20081103-tq7p32fg7akypeq2s2itb7736r

VMware Fusion 201: Preallocated Virtual Disks

Last time I covered sparse virtual disks. This time, let's look at the other option: preallocated virtual disks.

Preallocatedvmdk If you recall, the main advantage of sparse disks is that space is not grabbed upfront, but rather as needed. A preallocated disk, on the other hand, is (as you might expect) preallocated. You tell Fusion that the virtual disk should be 10 GB, and Fusion goes off and grabs 10 GB of disk space. Performance may be slightly better with a preallocated disk.

There are fewer problems with fragmentation on a preallocated virtual disk. As you might recall, there are three layers where a sparse virtual disk can get fragmented: the guest filesystem, the .vmdk file, and the host filesystem. A preallocated disk avoids fragmentation at the .vmdk file level, and fragmentation at the host OS filesystem level will not grow worse over time (since Fusion already grabbed all the disk space, there's no need to get more). For best results, you can defragment the host filesystem before creating a preallocated virtual disk to make sure it's as contiguous as possible.

Having a preallocated disk doesn't mean that your virtual machine will always be the same size, however. The most obvious example is that taking a snapshot or using AutoProtect will increase the needed space, and snapshots tend to grow over time.

Personally, I stick with sparse virtual disks. I like the flexibility of having extra space, which lets me keep more virtual machines at the same time than if I had to commit all that space right away. The only downside is that I have to be a little more careful about not running out of space, but I keep enough free that it's never a problem.

November 01, 2008

Bonus Tip: Snapshots

People sometimes get confused about how snapshots work and how to use them. While snapshots are incredibly useful for many things, one major misconception is thinking that they are a form of backup - they're not! If a lightning strike totally fries your computer, a snapshot won't help if it's on the same disk (because your snapshot just got fried too). Sure, you'll probably get lucky - if your computer merely shut down uncleanly, your snapshot may still work. You might not even need to go use the snapshot. But this is not a backup, it's gambling.

If you want to back up a normal virtual machine, shut down (or suspend) the virtual machine and quit Fusion -- you never want to try to read or modify virtual machines when Fusion is working on them. From the Finder, copy the virtual machine to a suitable external drive. Done! If you're feeling really backup-ful, keep the external drive offsite - this way you're protected against disasters that affect your entire location (e.g. fire, flood, etc.) A snapshot is better than nothing, but it's not true backup.

Continue reading "Bonus Tip: Snapshots" »

October 31, 2008

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 "Tip: Defragmentation" »

October 27, 2008

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.

Sparsevmdk_2 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.

October 24, 2008

Tip: Resource Monitoring

Activitymonitor 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.

Taskmanager 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.

Top 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.

October 20, 2008

VMware Fusion 201: Layers

Layers_4 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.

October 17, 2008

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.

About This Blog

A blog about virtualization on the Mac platform, and how it’s changing the way people interact with their Macs, PCs, and more. From the team that brought you VMware Fusion, the most seamless way to run Windows on your Mac.

Subscribe

Subscribe via RSS 

Subscribe via email

Search Team Fusion Blog