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

Tuesday, January 18, 2011

digging down into a linux process

So I inadvertantly exited out of my Fedora X server without saving or exiting my VMware Player's open virtual machine:

This left my vm in an unknown state. You could still see the lock files in the Virtual Machine's directory:
[sodo@ogre ~]$ ll Virtual\ Machines/Windows\ 7\ x64/
total 10976188
drwxrwxr-x 3 sodo 4096 2011-01-07 12:53 caches
-rw-r--r-- 1 sodo 320659 2011-01-18 14:41 vmware-0.log
-rw-r--r-- 1 sodo 359599 2011-01-18 14:14 vmware-1.log
-rw-r--r-- 1 sodo 565465 2011-01-08 00:14 vmware-2.log
-rw-r--r-- 1 sodo 317488 2011-01-18 17:33 vmware.log
-rw-rw---- 1 sodo 8684 2011-01-18 14:42 Windows 7 x64.nvram
-rw------- 1 sodo 2103836672 2011-01-18 17:35 Windows 7 x64-s001.vmdk
-rw------- 1 sodo 2121203712 2011-01-18 17:35 Windows 7 x64-s002.vmdk
-rw------- 1 sodo 2145255424 2011-01-18 17:35 Windows 7 x64-s003.vmdk
-rw------- 1 sodo 2145976320 2011-01-18 14:49 Windows 7 x64-s004.vmdk
-rw------- 1 sodo 955 2011-01-18 14:41 Windows 7 x64.vmdk
drwxrwxrwx 2 sodo 4096 2011-01-18 14:41 Windows 7 x64.vmdk.lck
-rw-rw---- 1 sodo 1073741824 2011-01-08 00:14 Windows 7 x64.vmem
-rw-rw---- 1 sodo 0 2011-01-07 12:37 Windows 7 x64.vmsd
-rw-rw---- 1 sodo 182610705 2011-01-18 10:18 Windows 7 x64.vmss
-rwxrwxr-x 1 sodo 2477 2011-01-18 14:42 Windows 7 x64.vmx
-rw-rw-r-- 1 sodo 1645 2011-01-07 12:53 Windows 7 x64.vmxf
drwxrwxrwx 2 sodo 4096 2011-01-18 14:41 Windows 7 x64.vmx.lck


But after some Googling, there seemed to be no way to restart the orphaned vm without killing the process that was hanging out there. Before I killed the vm process, I researched it to find out more about it. First, I did a search on the process:
[sodo@ogre ~]$ ps -ef | grep vmx
sodo 4629 1 13 10:18 ? 00:31:48 /usr/lib/vmware/bin/vmware-vmx -ssnapshot.numRollingTiers=0 -sRemoteDisplay.vnc.enabled=FALSE -s vmx.stdio.keep=TRUE -# product=8;name=VMware Player;version=3.1.3;buildnumber=324285;licensename=VMware Player;licenseversion=6.0; -@ pipe=/tmp/vmware-sodo/vmxb90ce351150180d7;readyEvent=90 /home/sodo/Virtual Machines/Windows 7 x64/Windows 7 x64.vmx


I saw that the process number was 4629. The command that started the process was vmware-vmx:
[sodo@ogre ~]$ ps -p 4629
PID TTY TIME CMD
4629 ? 00:31:48 vmware-vmx


Digging into the process directory, I saw the status of the process was sleeping:
[sodo@ogre ~]$ cat /proc/4629/task/4629/status
Name: vmware-vmx
State: S (sleeping)
Tgid: 4629
Pid: 4629
PPid: 1
TracerPid: 0
Uid: 500 500 0 500
Gid: 500 500 500 500
Utrace: 0
FDSize: 256
Groups: 500
VmPeak: 3281396 kB
VmSize: 3131036 kB
VmLck: 0 kB
VmHWM: 1409588 kB
VmRSS: 1343972 kB
VmData: 2727812 kB
VmStk: 288 kB
VmExe: 6784 kB
VmLib: 134888 kB
VmPTE: 3212 kB
Threads: 1
SigQ: 0/80092
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: fffffffe7ffbfeff
SigIgn: 0000000000301000
SigCgt: 0000000193c9eeef
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: 0000000000000000
CapBnd: ffffffffffffffff
Cpus_allowed: ff
Cpus_allowed_list: 0-7
Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 4744582
nonvoluntary_ctxt_switches: 7620


Alas, the vmware service offered no consolation..I could not shutdown the daemon gracefully:
[sodo@ogre ~]$ sudo /etc/init.d/vmware restart
Stopping VMware services:
VMware USB Arbitrator [ OK ]
At least one instance of VMware Player is still running.
Please stop all running instances of VMware Player first.


VMware Authentication Daemon [FAILED]


And so, good readers, I was forced to kill the process. And hard, as I had to add the -9 switch to kill, which effectively says "kill the process and don't do any cleanup". "Kill that sucker, but good!"
[sodo@ogre Windows 7 x64]$ kill 4629
[sodo@ogre Windows 7 x64]$ ps -ef | grep 4629
[sodo@ogre Windows 7 x64]$

Yes, this harsh kill command did the trick. And then I had to explain to my poor Win7 vm why I had pulled the plug so harshly:


Oh cruel fate, why dost thou mock me?
TAG

Reference
http://aplawrence.com/SCOFAQ/FAQ_scotec6killminus9.html

Friday, January 07, 2011

creating ISO file from bootable install media

As our company's secure VPN software doesn't work on my Linux box, I decided to install an XP VM to use as a launchpad to my corporate network. Unfortunately, VMware Player failed to install my XP with the message:
An error has been encountered that prevents Setup from continuing
One of the components that Windows needs to continue setup could not be installed.
The parameter is incorrect.
Press OK to view the Setup log file


The Main Issue
This indicated that either my media or the DVD drive was bad. To find out which one was the true culprit, I used my Macbook's Disk Utility to convert the XP installer CD to an ISO. You want to select an Image Format of "DVD/CD master", as shown in the graphic below:


As is my open source bent, I'd rather be using mkisofs, but I was under some time pressure to get some videos out the door. In any case, I scp'd the ISO version of the install CD over to my main box with VMware Player and low and behold, the ISO version worked just fine. So it looks like my bloody DVD drive is going! Off to Newegg..

In retrospect, the occasional problems I've been experiencing over the last two years with my bootable installs were now probably due to the DVD drive having trouble reading ISOs! Argh. I tell you, its tough being an idiot. Still odd, as the DVD burner works fine for recording and reading DVDs. It just doesn't seem to like booting install media. Ah well.

Another Problem Creeps Up on The Guy
While I was successful in installing the XP OS into a VM, once I started the VM and used it for its intended purpose, that of logging into my corporate network, up crops a problem with the Juniper client:
dshostchecker.exe has exited unexpectedly
logged to eacHttpNar.dmp


Double Yarg! This time, in order to resolve the issue, I decided to use a new OS as basis for a VM: Win7. I should have used in the first place, but the Win7 install takes 7GB and the XP install only takes 1.5GB, so I opted for the lighter XP.

Win7 to the Rescue!
As before, I converted the Win7 install media (a DVD) to ISO file using the Mac's Disk Utility. I copied the ISO to my main rig and lo and behold, the ISO installed perfectly into VMware Player. Lastly, I had no issues with my secure VPN installation.

Moral of the story: don't disregard a problem! It will bite you in the rear later!

Things I learned along the way
1) mounting a UDF disk
mount -t udf /dev/dvd /mnt/dvd
2) interesting scheme to use VMware as a host for Windows XP Linux Application
http://www.stat.ufl.edu/system/vmware.html
3) haven't tried this, but this link has a way to create a Windows bootable CD/DVD using mkisofs
http://hints.macworld.com/article.php?story=20080416134218704
4) Windows System Assessment Tool for Win7 comes on when the box is idle and consumes a shitload of CPU
- disable that f*ckr by following these directions


Tally Ho!
TAG

Thursday, June 07, 2007

VMware Player install on Linux (Fedora Core 6)

As I happen to live in all three worlds (Mac, Linux and Windows), I occasionally need to run XP programs. I thought it would be an even better idea to be able to run XP programs while in Linux, so I recently converted my XP OS to a virtual machine using VMware Converter. If you wish to convert your 2000/XP system to a vm, here is one way to do that:
http://www.techanswerguy.com/2007/06/converting-physical-server-using-vmware.html

Once I had a working virtual copy of my XP system, I then installed VMware Player on my Fedora Core 6 system.

Here are the steps to do that:

1) Get the RPM download from VMware:
http://www.vmware.com/download/player

2) Install the RPM:
[root@computer ~]# rpm -ivh VMware-player-2.0.0-45731.i386.rpm
Preparing... ########################################### [100%]
1:VMwarePlayer ########################################### [100%]

3) Configure VMware Player:
[root@computer ~]# /usr/bin/vmware-config.pl
Making sure services for VMware Player are stopped.

Stopping VMware services:
Virtual machine monitor [ OK ]

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the theme icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

None of the pre-built vmmon modules for VMware Player is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system
(you need to have a C compiler installed on your system)? [yes]

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running kernel? [/lib/modules/2.6.18-1.2798.fc6/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.18-1.2798.fc6/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2798.fc6-i686'
CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o
CC [M] /tmp/vmware-config0/vmmon-only/common/comport.o
CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o
CC [M] /tmp/vmware-config0/vmmon-only/common/hash.o
CC [M] /tmp/vmware-config0/vmmon-only/common/memtrack.o
CC [M] /tmp/vmware-config0/vmmon-only/common/phystrack.o
CC [M] /tmp/vmware-config0/vmmon-only/common/task.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciContext.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciDatagram.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciDriver.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciDs.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciGroup.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciHashtable.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciProcess.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciResource.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmciSharedMem.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmx86.o
CC [M] /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o
LD [M] /tmp/vmware-config0/vmmon-only/vmmon.o
Building modules, stage 2.
MODPOST
CC /tmp/vmware-config0/vmmon-only/vmmon.mod.o
LD [M] /tmp/vmware-config0/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2798.fc6-i686'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
The module loads perfectly in the running kernel.

Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmblock-only'
make -C /lib/modules/2.6.18-1.2798.fc6/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2798.fc6-i686'
CC [M] /tmp/vmware-config0/vmblock-only/linux/block.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/control.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/dbllnklst.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/dentry.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/file.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/filesystem.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/inode.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/module.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/stubs.o
CC [M] /tmp/vmware-config0/vmblock-only/linux/super.o
LD [M] /tmp/vmware-config0/vmblock-only/vmblock.o
Building modules, stage 2.
MODPOST
CC /tmp/vmware-config0/vmblock-only/vmblock.mod.o
LD [M] /tmp/vmware-config0/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2798.fc6-i686'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-config0/vmblock-only'
The module loads perfectly in the running kernel.

Do you want networking for your virtual machines? (yes/no/help) [yes]

Configuring a bridged network for vmnet0.

The following bridged networks have been defined:

. vmnet0 is bridged to eth0

All your ethernet interfaces are already bridged.

Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes] yes

Do you want to be able to use host-only networking in your virtual machines?
[no]

Extracting the sources of the vmnet module.

Building the vmnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.18-1.2798.fc6/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2798.fc6-i686'
CC [M] /tmp/vmware-config0/vmnet-only/driver.o
CC [M] /tmp/vmware-config0/vmnet-only/hub.o
CC [M] /tmp/vmware-config0/vmnet-only/userif.o
CC [M] /tmp/vmware-config0/vmnet-only/netif.o
CC [M] /tmp/vmware-config0/vmnet-only/bridge.o
CC [M] /tmp/vmware-config0/vmnet-only/filter.o
CC [M] /tmp/vmware-config0/vmnet-only/procfs.o
CC [M] /tmp/vmware-config0/vmnet-only/smac_compat.o
SHIPPED /tmp/vmware-config0/vmnet-only/smac_linux.x386.o
LD [M] /tmp/vmware-config0/vmnet-only/vmnet.o
Building modules, stage 2.
MODPOST
WARNING: could not find /tmp/vmware-config0/vmnet-only/.smac_linux.x386.o.cmd for /tmp/vmware-config0/vmnet-only/smac_linux.x386.o
CC /tmp/vmware-config0/vmnet-only/vmnet.mod.o
LD [M] /tmp/vmware-config0/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2798.fc6-i686'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
The module loads perfectly in the running kernel.

Starting VMware services:
Virtual machine monitor [ OK ]
Blocking file system: [ OK ]
Virtual ethernet [ OK ]
Bridged networking on /dev/vmnet0 [ OK ]
Host network detection [ OK ]

The configuration of VMware Player 2.0.0 build-45731 for Linux for this running
kernel completed successfully.

Enjoy,

--the VMware team

You can now run VMware Player by invoking the following command:
"/usr/bin/vmplayer".


4) Run VMware Player:
You can now run VMware Player by invoking the following command:
"/usr/bin/vmplayer":

[root@computer ~]# /usr/bin/vmplayer
Ah, the lovely splash screen!


5) Open an existing virtual machine:


6) Find your existing virtual machine's .vmx file:


Your existing virtual machine will start:


Don't forget..you cannot start virtual machines within a virtual machine!

Enjoy!

Wednesday, June 06, 2007

VMware Player: no sound / "bad directsound driver"

After I converted my Windows 2000 Professional machine over to a virtual machine, I was disappointed to find that VMware Server doesn't support sound. Here's non-official confirmation of that:
http://kontrawize.blogs.com/kontrawize/2006/03/vmware_server_v_2.html

UPDATE 7/6/2007: I have gotten sound to work using both a Windows 2000 Advanced Server and an XP guest system in VMware Server. You will need to apply the tweak below to enable sound.

Therefore, I downloaded VMware Player, simply to play sound from my VM. Upon installing Player, I saw this error when I tried to initialize my audio application:
"Bad DirectSound Driver"

Apparently, VMware Player sets its config file for the virtual machine to use Sound Blaster emulation. When in truth, the emulation should be Creative AudioPCI (ES1371,ES1373).

So if you have working sound on your host system, but not on the vm running in VMware Player, here are the configuration lines in your VMs .vmx file you need to have in order to enable sound in the virtual machine running in VMware Player:
sound.present = "TRUE"
sound.virtualDev = "es1371"
sound.filename = "-1"
sound.autodetect = "TRUE"

Just make sure to edit/add the lines while your virtual machine is powered off.

It would be nice if VMware could somehow do a pass-through to the actual hardware device installed on the host so that you could do nice things like get low latency for recording software applications like Cubase or Reason.

I will ask the gurus..
UPDATE: Pass through to the real sound card not possible with Workstation or Player. Sound only works as emulated.

VMware Player is a bit of a kids toy, as there is not much to configure and the CD/Floppy/Network/Sound devices are all toggles at the top of the Player window:


Kinda weak. But hey, its free and it works.

Kontrawize also has their own opinions of the differences between VMware Server and Workstation here:
http://kontrawize.blogs.com/kontrawize/2006/03/vmware_server_v.html

Ah, the silliness continues..
Feel free to drop me a line or ask me a question.