Vmware-tools vss driver

Killing hung/frozen or otherwise unresponsive VM:s

Information found on various places about how to stop a hung/frozen or otherwise unresponsive virtual machine.
Use any SSH-client to connect to the service console of the host running the VM.

Nice way:
List virtual machines and worlds.

vm-support -x

Run support script to shutdown/kill the machine and collect troubleshooting data.

vm-support -X worldid

Note that the parameter (-x -X) is case sensitive.

Other ways:
List virtual machines:

vmware-cmd -l

Try stopping softly

vmware-cmd /vmfs/volumes/datastorename/vmname/vmname.vmx stop trysoft

Try stopping hard

vmware-cmd /vmfs/volumes/datastorename/vmname/vmname.vmx stop hard

Since neither of those ever worked for me in a hung/frozen VM I’ve always had to resort to killing the VM:s process (PID) by hand.
Try:

ps auxfww | grep vmname
kill -9 PID

Where vmname is the name of your VM and PID is the process ID.

If you use the last method you may have to do some manual cleaning. I’ve had to remove .swp file from the VM:folder on a few occasions.

It is also a good thing to do a service mgmt-vmware restart when troubleshooting troublesome virtual machines.

Aligning disks in virtual machines

To avoid performance issues in virtual machines (and physical for that matter) you should align new disks/partitions when you create them.

Have a look here: http://www.vmware.com/pdf/esx3_partition_align.pdf for more information on the benefits of partition aligning.

Anyhow, to make a long story short, when you create a new virtual disk for a server (or workstation) you should use VirtualCenter to create the disk, that way the DISC get aligned properly automatically. Then you must use DISKPART to create a new partition in Windows or, probably, FDISK on a linux machine.

On Windows
Start a Command Prompt and type diskpart (make sure you use Diskpart, not Diskpar).
List your disks by typing List.
Select your disk byt typing Select disk x where x is the disk you would like to work with.
Create the new partition by typing CREATE PARTITION PRIMARY ALIGN=64
Exit Diskpart

Format the new disk with NTFS and an ‘allocation unit size’ of 32KB (rekommended by Vmware but you should check with your storage vendor and consider WHAT you are going to use the disk for).
Assign a drive letter if not done automatically.

Sysprep on Windows Server 2003 x64

OK,
I recently had to create Vmware ESX template (VI3, Virtual Center) of a Windows Server 2003 x64 machine.
Normally I would have used the ‘clone to template’ and then run a customization on the new machine. This option is not available for x64 OSs so I had to find another way.
I found a thread on VMTN and a fair solution (until customization for x64 is included in VC):

if you run the setupmgr that is included in the deploy.cab (on the x64 windows server cd), it will walk you through the creation of the file.

long story short (your situation may vary):
1. copy everything in that cab to c:\sysprep
2. run setupmgr- select sysprep setup, select your version, fully unattended
4. copy the sysprep.inf file somewhere secure (password is in it) and leave a copy in c:\sysprep (this folder is deleted during the 1st bootup)
5. run sysprep.exe from c:\sysprep – select reseal, leave the defaults
6. once the system shuts down, convert to template

Smart Array 532 with VMware ESX 2.5.3

Problem encountered with a HP Smart Array 532 controller with VMware ESX 2.5.3 when installed in an already configured server.
The controller was found by the service console, but not configured in modules.conf and vmmodules.conf.

* Installed an additional RAID controller.
* LSPCI found the controller, but no disks showed in VM Manager.
* Ran KUDZU and found the controller, but still no luck in VM Manager.
* Added a new CCISS in /etc/modules.conf and in /etc/vmware/vmmodules.conf.
* Rebooted the server and was able to use the added disk.

Experiments with Linux, VMware Workstation and a virtual workstation.

Install log for my Ubuntu server on a HP Compaq nc6220.

Why?

– My reason for installing a minimal version of linux on my laptop is to use it as a base for running VMware Workstation with my other workrelated stuff on. This way I can use cloning, non-persistent disks and other nice features of VMware to keep my work-images nice and tidy.

The plan.1.

Install minimal version of linux dist (as it turns out it is an Ubuntu server
without any services/daemons running).
2. Install XServer (Xorg).
3. Install a small window manager (Fluxbox)
 – I will also install a Mozilla Firefox. I may need a browser..
4. Install VMWare Workstation.
5. Get USB automount to work (I have a few VM’s on an external USB drive).

The Hardware.

I have a HP Compaq nc6220 as a work laptop. It is a pretty lousy piece of hardware and I have had a bunch of problems with it in Windows. It has an Intel Graphics chip (i915) that share RAM. Not good! It has 2 GB of RAM and a 80 GB harddrive. There is a gigabit LAN card and a wireless 802.11b/g card for networking and bluetooth support.

How did I do?

1. Install Ubuntu Server.

So, I downloaded the server version of Ubuntu Efty(?) with kernel version 2.6.17-10-server and installed from a CDROM. No problems encountered. I was asked which NIC I wanted to use as default and my choice is the gigabit card.

Since this is a test I’d like to keep my existing installation of windows on one partition and give the new Ubuntu install another partition. The installer was very helpful and even allowed me to change my windows partition size (which I didn’t so I don’t know if it actually work).

When asked if I wanted to install LAMP or DNS I answered NO. I want this to be a lightweight background system without any burdens I don’t really need. Installatin finished, reboot. NICE black screen with white text. Logon TADA!!

2. Install Xserver.

Since I will run VMware Workstation on the machine (not VMware server) I must have a graphical interface to be able to interact with my VM’s. My choice is the Xorg Xserver and it installed without any problems. I used the available i815 graphic chip in the config and it seems to work just fine.

3. Install small windows manager.

I choose Fluxbox since I’m allready familiar with it and it has a decently small fingerprint on hardware resources.
apt-get install fluxbox (and a few helper apps like fluxconf etc). No problems.

Then I installed the Mozilla-Firefox web browser. Not entirely necessary, but if I know me I will need to use the web from this install to troubleshoot this or that.

4. Install VMware Workstation

Then I downloaded vmware workstation 5.5.3 (see, I knew I’d need firefox for something!), unpacked and ran sudo ./vmware-install.pl

Followed instructions and also ran the config script. I let it configure NAT’ed network and internal network and voila! I’m up and running VMware. Nice!

5. Automount USB drives.

Now, this is not fully working yet. My drive is recognized and I can mount it manually (mount -t ntfs /dev/sda1 /media/usb1 (yes,
I know, ntfs won’t do later on. Have to change that)), but I cant access it as a normal user. No problem to play with stuff as root (sudo), but as my normal user I get permission denied.

Tried “chmod 777 /media/usb1” and that makes the folder accessible. But as soon as I mount the drive the permissions are changed.

OK, I found a tip on a web-page stating that this line in /etc/fstab would do the trick:

/dev/sda1       /media/usb1     ntfs nls=utf8,umask=0222    0       0

and it did. My problem is off course NTFS. Now, I don’t think that I will use fstab for this, but I guess that I can mount a drive with UMASK functionality. Some more searching to do..
Installation done! What now?

Well, I installed a Windows XP Pro in a VM from a CD and it worked lika a charm. I even got the lousy windows theme playing through registration/setup. A few things to do with the virtual machine though; install vmware tools for one, patch, patch, patch..

Stuff that needed mending:

1. Graphics resolution was not right. I choose 1400*1050 in xorg.conf but the resolution became 1280*1024. Not very good on a screen optimized for 1400*1050.

apt-get install 915Resolution (install software)
915Resolution -l (check bios resolutions)
nano -w /etc/default/915resolution. Enter your preffered resolution.