VMware

From ArchWiki
Revision as of 09:47, 24 July 2005 by Klapmuetz (talk | contribs) (Wiki migration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[1] installs on ArchLinux VMware pretty well, but its not totally straight forward.

1) First you need to create some folders.

mkdir /etc/rc.d/vmware.d
mkdir /etc/rc.d/vmware.d/rc0.d
mkdir /etc/rc.d/vmware.d/rc1.d
mkdir /etc/rc.d/vmware.d/rc2.d
mkdir /etc/rc.d/vmware.d/rc3.d
mkdir /etc/rc.d/vmware.d/rc4.d
mkdir /etc/rc.d/vmware.d/rc5.d
mkdir /etc/rc.d/vmware.d/rc6.d

2) Start the vmware installation

3) When it asks where the directories for rc0.d thru rc6.d are, use /etc/rc.d/vmware.d

3) When it asks where the init directory is, use /etc/rc.d

4) It will probably say that the modules supplied dont match the kernal version and asks you if you want to compile it, do yes.

5) If it complains that the gcc compiler is of a different version and that if you use it, your virtual machines will likely crash, select yes as it seems to work anyway. You cannot complete the installation if you say no to this.

6) The rest of the install should work pretty well.

7) There is now a vmware init script in /etc/rc.d. you can add this to your daemons list if you want. I personally dont do this, but if you intend to use the vmware network's when not actually using vmware, then you will need to do this. You will need to start it before you can run vmware though.

8) To start vmware, you just do vmware from a console window, or create a shortcut or menu item however you like.

Leave the /etc/rc.d/vmare.d/ folders there, because it is needed whenever you perform vmware-config.pl.

Remember, if the kernel is changed or updated, you will need to run vmware-config.pl again.

There is a problem with vmware unable to run correctly after a reboot. I am trying to find a permenant fix to this, but have managed to get by with running vmware-config.pl again each time I reboot. I'll update when I have a better solution.


Solution: edit /etc/rc.d/vmware

find the text below

case "$1" in
  start)

and put "rm /etc/vmware/not_configured" without the quotes immediately after that line.



Kernel 2.6 and udev.

Follow the steps above and then:

1 - modify udev config.

edit /etc/udev/rules.d/00-myrules.rules and add 2 lines:

# tty devices
KERNEL<code>"tty[[0-9]]*", NAME</code>"vc/%n", SYMLINK="%k"

# floppy devices
KERNEL<code>"fd[[0-9]]*", NAME</code>"floppy/%n" , SYMLINK="fd%n"

2 - start/stop script

it takes care of devices and start vmware, also stop vmware and remove dev entries), call it, for examples, mkvmdev, chmod it 755 and put in /etc/rc.d:

#!/bin/sh

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
     start)
     stat_busy "Creating /dev entries for vmware and start"
     mknod /dev/vmnet0 c 119 0
     mknod /dev/vmnet1 c 119 1
     mknod /dev/vmnet2 c 119 2
     mknod /dev/vmnet3 c 119 3
     mknod /dev/vmnet4 c 119 4
     mknod /dev/vmnet5 c 119 5
     mknod /dev/vmnet6 c 119 6
     mknod /dev/vmnet7 c 119 7
     mknod /dev/vmnet8 c 119 8
     mknod /dev/vmnet9 c 119 9
     chmod 0600 /dev/vmnet0
     chmod 0600 /dev/vmnet1
     chmod 0600 /dev/vmnet2
     chmod 0600 /dev/vmnet3
     chmod 0600 /dev/vmnet4
     chmod 0600 /dev/vmnet5
     chmod 0600 /dev/vmnet6
     chmod 0600 /dev/vmnet7
     chmod 0600 /dev/vmnet8
     chmod 0600 /dev/vmnet9
     mknod /dev/parport0 c 99 0
     mknod /dev/parport1 c 99 1
     mknod /dev/parport2 c 99 2
     mknod /dev/parport3 c 99 3
     chmod 0600 /dev/parport0
     chmod 0600 /dev/parport1
     chmod 0600 /dev/parport2
     chmod 0600 /dev/parport3
     mknod /dev/vmmon c 10 165
     chmod 0660 /dev/vmmon
     /etc/rc.d/vmware start
     ;;

     stop)
     stat_busy "Removing /dev entries and stop vmware"
     /etc/rc.d/vmware stop
     rm /dev/vmnet0
     rm /dev/vmnet1
     rm /dev/vmnet2
     rm /dev/vmnet3
     rm /dev/vmnet4
     rm /dev/vmnet5
     rm /dev/vmnet6
     rm /dev/vmnet7
     rm /dev/vmnet8
     rm /dev/vmnet9
     rm /dev/parport0
     rm /dev/parport1
     rm /dev/parport2
     rm /dev/parport3
     ;;

     restart)
     $0 stop
     $0 start
     ;;

     *)
     echo "usage: $0 {start||stop||restart}"

esac
exit 0

2 - Modify /etc/rc.conf

Add mkvmdev to daemons in your rc.conf, and remember to remove vmware from rc.conf. If you prefere delete the lines that launch vmware from mkvmdev and leave in rc.conf, you choose.


(Comments)

hi guys, a couple of quick questions: - why is /dev/vmmon chmod 0660, as opposed to the rest (0600)? - i suppose /dev/vmmon should be "rm"-ed as well in the "stop" section for the script above? (that line is missing)