Enhance your VMware productivity with little known VMware tricks


Updated: June 13, 2009

I call them secrets - not because they are actually secret, but because very few users are aware of them. We're talking about options and utilities you won't normally get to use while enjoying VMware virtualization. And yet, they are there, waiting for you to take advantage of them and boost your efficiency. So let's expose them.

Teaser

Defragment your virtual machines

You may be using VMware products on Linux, so this may sound to you like a Windows-only feature. Not at all. Virtual machines can be defragmented on Linux, too.

If you're not pre-allocating virtual machines to conserve space, then there's a chance the virtual hard disk could span across different areas of the hard disks, slowing down the performance. This is why I recommend storing virtual machines on a separate partition or even a separate drive, but if you can't, then a simple defrag might speed things up a little. What you need to do is edit the settings for your virtual machine:

Defrag on Linux

On Windows:

Defrag on Windows

Mind, this has nothing to do with the defragmentation inside the virtual machines. When you're running guest operating systems, they see their own, virtual hard disks. So if you're concerned about defragmentation of the filesystem in the virtual machines, you will need to perform a bit of maintenance there, too, regardless whether you defrag the actual virtual machine disk on the host.

Command line utilities

If you like to automate things, you must be fond of scripts. To work properly, scripts need command-line utilities. They cannot access the GUI functions of your virtualization products.

VMware lets you do quite a bit of stuff that way. Pretty much everything you can do through the management interface can be done from the command line. This means powering the machines on and off, resizing disks and many other tasks, allowing you to fully automate your virtualization. This is quite useful if you're managing machines on a remote server without a monitor.

On Linux, the toolbox of great utilities can be found under /usr/bin:

Command line Linux

On Windows, the path is a little more convoluted:

CLI on Windows

Snapshots

This feature does not exist on all VMware Products, but it is good to be aware thereof. VMware Server will let you keep a single snapshot of the operating system and will rotate it whenever you take a new one. VMware Workstation has no such limitation, allowing you to create numerous screenshots of the system.

Snapshots

Network configurations

VMware products have a very powerful network stack, in particular Server and "higher" products. When you install VMware (Server), you may notice that two additional network adapters are installed, named vmnet1 and vmnet8, which govern the networking for your host and guest, including Network Address Translation (NAT).

You have full control over these devices, even if you did not know that. Instead of going through the standard menus (like Control Panel, Network Manager, etc), you can use the built-in Virtual Networks Settings wizard (under Host in the menu) to fine-tune the networking in your VMware product. The wizard is very powerful and you are encouraged to use it.

Net config 1

You may want to add adapters or change the way their communicate with the host. For instance, you may want to dedicate virtual networks to a firewall wired or wireless host adapter only, while your actual host traffic flows on another network device, another subnet.

Net config 2

Also, you can change the IP ranges for each adapter:

Net config 3

Net config 4

Conclusion

This article may not turn you into virtualization gangstas over night, but it sure does have a few interesting points that should help you get around more efficiently. Network options are very useful for custom scenarios, especially if you run servers, while the snapshots allow you to create numerous incremental backups of your guests. Using scripts allows you to automate tasks, including installation and deployment. That's it for now, VMware secrets revealed. Until the next time.

Cheers.

RSS Feed icon

del.icio.us del.icio.us stumbleupon stumble digg digg reddit reddit slashdot slashdot



Advertise!

Would you like to advertise your product/site on Dedoimedo?

Read more

Donate to Dedoimedo!

Do you want to
help me take early retirement? How about donating
some dinero to
Dedoimedo?

Read more

Donate