Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts

Monday, December 14, 2009

'Virtual Machine in Use' in VMWare Workstation 6.5

Sometimes for whatever reason VMWare Workstation 6.5 does not exit cleanly when  you shut it down. Rarely when you re-enter VMWare Workstation the application will not let you start one of the workstations, citing:

The virtual machine appears to be in use

The first an obvious check you should make is to ensure two instances of Workstation (or Workstation and Player, etc) are not running. If this is not so, go ahead and try to Take Ownership as prompted by Workstation.

This is a quick note to myself that when this fails a simple resolution may just to the navigate to the virtual machine directory in your file manager and delete any folder ending in .lck. A .lck folder contains locking information that it definitely not required when a virtual machine is running.

Wednesday, July 8, 2009

Growing a VMWare Workstation 6.5 disk

I need to grow one of my VMware virtual machines hard drives. I have done this before a couple of times, but each time I do I need to research how to do it again. So that I may actually learn and remember, I'll post the method here. There are a lot of possibly older and longer methods around (including using VMware converter). This is the short, easy and effective way that worked for me:

  1. Turn off the virtual machine (don't laugh, I caught myself about the run this command with the virtual machine running).
  2. Back up the virtual machine (some sites say to back up only the vmdk file in question, but I am not sure how that intersects with separate 2GB files...anyone?)
  3. Jump into the command prompt and run the following command from your VMware workstation program directory:
    vmware-vdiskmanager -x [size]Gb path\to\filename.vmdk
Note the size to enter is the total desired size, and you should obviously replace the path and filename with the vmdk file path you want to resize. And to clarify, to find out the correct vmdk file view the settings of the virtual machine in workstation, or look at the VM configuration file.

I found the above information a few times on the internet last night while I was looking it up. When I went to do it today I found it here , which also has information for Fusion and ESX flavors of VMware.

Tuesday, July 7, 2009

Checklist for New VM Base Builds

I use desktop virtual machines (using VMWare Workstation) intensely for work and I was recently rebuilding a base virtual machine for the Windows 7 Release Candidate. My usual approach is to build a base machine that I can then clone - however many times for however many purposes I have.

It defeats the purpose of creating a base VM if I forget something critical before I start cloning, so I created a list of standard installations I should make on a base virtual machine for it to be ready for cloning.

Here is the current list (and this is a MS Windows-centric guide - sorry I have not made many Linux or other VMs yets). If you have any additions or comments (or alternatives), let me know.

New VM Checklist

During New VM Wizard

  1. Customise Hardware: This is pretty obvious and I do not stray much from the OS-based defaults. One habit I think that is emerging is adding a second HDD for data and programs that are specific to a clone. And I always split the data files on this host to the 2Gb, since backing up 200 Gb files over my current network is a non-starter, and more importantly, some flash storage devices struggle with files over 2Gb.
  2. Set Networking Appropriately. I usually use NAT for desktop operating systems and Briding for Server operating systems. On rare occasions I create a virtual network when running a team of virtual machines.
During OS install

  1. During OS I make sure I set up an admin or root user. This stipulation seems silly on Linux systems but on MS Windows I find that I want to automatically create a administrator account that is not my login account. So I don't create an account for myself to login here.

Post OS install

  1. Make sure VM Ware tools installed. If not installed, install manually.
  2. Create an unprivileged user to log in with. You always need one so create it during your base build
  3. Install anti-virus software. This is a no-brainer. For non-commercial virtual machines I use Avast since it seems pretty lightweight in comparison to AVG.
  4. Select a wallpaper. I always customise the wallpaper, even on Base machines, for the login user (I really enjoy wallpapers from here)
  5. Map or Share your standard drives. I've found through unscientific experimentation that sharing folders on the host has the best performance. Mapping drives from network resources is next fastest and sharing a mapped drive from the host is slowest. I minimise sharing or mapping of drives on servers.
  6. Install a good compression program since you always need them; and they need to cope with a variety of formats (RAR compatibility is the one that frequently catches me out). After a recent endorsement from a Podcast I am trying to standardise on Pkware's SecureZip express. Its free and uses industry standard encryption using public and private keys.
  7. Install notepad++. One day I might find a more general useful text editor but it is not today. You start taking having notepad++ installed on the systems you work on for granted very quickly.
  8. Set up BgInfo. BgInfo is from the SysInternals pack and writes system information to the current wallpaper. Called from a startup script it can very usefully display your machine name, current user, IP address, free HDD and other vital on your desktop, which when you work with virtual machines a lot is dead useful.
  9. Set up Junkdrawer deletion script. I saw this tip on www.lifehacker.com and it is somewhat useful. I set up a folder in the "My documents" location called 'Junkdrawer' and set all of my download locations to point to that folder. As I use a machine I also put any temporary files here. At this stage in my setup I create the folder, install a nifty utility called Tdel and create a simple script to run it at start up. TDel is an intelligent delete utility that is called from the script to delete files and folders under Junkdrawer older than, say, 14 days. This is a neat way to keep the folder clean without losing downloads or other temporary files that should stick around for a few days.
  10. Turn on automatic updates if required. This is essential - your virtual machines will hopefully have some life in them and they need to stay up to date and secure.
  11. Check the time and timezone; VMWare tools will normally synchronise the time but the timezone is often not set.
Desktop

Some additional installs only for desktop machines ( mostly self explanatory). Note I find I need to be really careful with licensing and remember that most license agreements consider virtual machines as separate install sites.
  1. Install Adobe Flash Runtime
  2. Adobe Acrobat Reader (Although I am considering getting a lighter reader for this base image instead, like Foxxit)
  3. Adobe AIR
  4. Java Runtime
  5. Additional Browser(s) (like Mozilla Firefox)
  6. Your mandatory browser plugins - in my case Delicious
~FIN~