Talk:HOWTO Install Gentoo on VMware

From Gentoo Linux Wiki

Jump to: navigation, search

Contents

[edit] Wikification

The section Installing VMware Tools needs a lot of Wikification. I can't understand it.

Code: Example of the problems: Is this line meant to be a header?
 ===VMware-tools for version 5.0===>><br>
 

Could the orginal author do something? AnMaster 18:24, 29 November 2005 (GMT)


I've done what i can, but its still far from perfect. We need someone with VMware experince to now wikify further (if they can understand the dreadful markup someones used).

DjSmiley2k 18:04, 28 December 2005 (GMT)

[edit] Progress on the VMTools patch?

Sorry for having no progress on the patch for the new VMware Tools. Since the VMware version I am using is GX Server 3.1.0, my patch was created against that specific version of VMware Tools. Until I get hold of VMware Workstation 5.0 (trial version maybe), I won't be able to create a patch for the newer VMware Tools.


I'm just fortunate enough to have VMWare 5.0 build 13124, go figure that the patch to make VMTools up here doesn't work for me. I prefer Gentoo over any other distribution of Linux I've come across, and was just wondering if there's a chance I can get a progress report on an estimated time of arrival of the patch that will work for me. Thanks.


I've made it through running the ./vmware-install.pl script, but the last question tells me I must configure VMware Tools by invoking the following command: "/usr/bin/vmware-config-tools.pl" - and of course I do, so I hit enter (default).

Then, I receive an error that states "...the configuration program is to be executed out of an XFree86/Xorg session. Please shut down all instances of XFree86/Xorg. Execution aborted."

I have changed to runlevel 3 "telinit 3" - no worky I have tried to execute from X (why not) - no worky

I'm a newb - any opinions/advice greatly appreciated. My goal is to get a working X environment working with full screen resolution.

My environment is: Dell M60 VMware 4.5.2 build-8848

 Host: WinXP, SP2
 Guest: Gentoo Stage2 install of 2.6.9

It happens when you had run X Windows before you installed VMware Tools. For some reason unknown to me the X Windows on Gentoo doesn't remove the environment variable DISPLAY when it terminates. The VMware Tools configuration script uses that variable to determine whether it is run under X Widnows.

You can simply 'unset DISPLAY' and try the configuration script again.

[edit] Worked great on GSX 3.1

I have a Windows 2003 Host with Gentoo 2.6.10 as Guest. Your directions worked great for installed the vmware-tools. KDE launching full screen wonderfully. Thank you very much!

[edit] New SCSI Drivers on VM Workstation 5.0

Everything worked great except that Workstation 5 no longer provides the BusLogic SCSI controller as the SCSI hard drive. It is now a LSI Logic/Symbios Logic 53c1030 PCI-x Fusion MPT Dual Ultra 320 (as listed in lspci)

This can be configured in the kernel as:

Device Drivers  --->
  Fusion MPT Device Support  --->
     <*> Fusion MPT (base + ScsiHost) drivers

Without this you will get an error (Kernel Panic; Could not mount root filesystem) on boot

[edit] Question to KC regarding keyboard InputDevice section

(This question was posted on the content page, and moved here where I think it should belong.)

Question to KC - Mentioned "Keyboard" Error does appear. Can the modification be done through the patch so that the patch works seamlessly. - SW (Sorry I do not know how to contact you hence I post on this one.)

Answer from KC - Yes, it's possible to include it in the patch, but I didn't do it. The installation script uses complex regular expression to modify the configuration file. While I can read and understood the code, I was not ready to make changes to it in fear of breaking it. Maybe I will go back to it in the future and modify it.

[edit] What about IDE drivers?

VMWare also has support for IDE emulation, can it be added to the kernel config, listed as optional maybe?

[edit] HOWTO Topic

Is there a reason this should continue to be listed as on VMware in Windows NT/2K/XP? Being vmware it is by nature platform indepentdent (for the mostpart).

Yes. The install describes a Windows Host / Gentoo Guest installation. See especially Preparing Virtual Machine. -- Mmoo9154 02:35, 6 Jul 2005 (GMT) I think it auto does with default kernel ide drivers.

[edit] Snoops install experience (a bad workaround)


Environment:

 - Host: Win2k
 - VMWare v5.anything
 - Guest: Gentoo 2005. Stage 3. genkernel. Kernel 2.6.11-getoo-r3

 Here we go:

- After a fresh install:
- Installing KDE (and X)

 $ PKGDIR="/mnt/cdrom" emerge -K kde     

- Try starting X dosn't work. "Can not run in framebuffer mode"
   But log i saying "new driver is vmware"
   Well... i don't care.

- Try to install vmware-tools with help from 
   http://gentoo-wiki.com/HOWTO_Install_Gentoo_on_VMware_in_Windows_NT/2K/XP

- Ok, mounting the "VMware Tools"
        1) Click "Install VMware Tools" from the VM menu.
        2) mount /mnt/cdrom
        3) cp /mnt/cdrom/*.tar.* /usr/portage/distfiles

- Problem: I can't fetch the vmware-linux tools:

gentoo2 root # ACCEPT_KEYWORDS="~x86" emerge vmware-linux-tools
Calculating dependencies ...done!
>>> emerge (1 of 1) app-emulation/vmware-linux-tools-4.5.2 to /
!!! vmware-linux-tools.tar.gz not found in /usr/portage/distfiles

!!! app-emulation/vmware-linux-tools-4.5.2 has fetch restriction turned on.
!!! This probably means that this ebuild's files must be downloaded
!!! manually.  See the comments in the ebuild for more information.

!!! The following are listed in SRC_URI for vmware-linux-tools:
!!!   http://www.vmware/com/vmware-linux-tools.tar.gz

- However, in the last step (3) i copied VMwareTools-5.0.0-13124.tar.gz
  to the distfiles (maybe renaming the files would help? I dont did it)
  I guess you can extract the .tar from the CD to /root directly from CD.
  I did this:

  $ tar xfvz /usr/portage/distfiles/VMwareTools-5.0.0-13124.tar.gz -C /root/. 

- Change Directory

  cd /root/vmware-tools-distrib/

- Try to start 

        # ./vmware-install.pl

- Of course it doesn't work, but creates the /etc/vmware-tools/locations File
  you need to edit ;-)

  =============================================================
  gentoo2 vmware-tools-distrib # ./vmware-install.pl
  Creating a new installer database using the tar3 format.

  Installing the content of the package.

  In which directory do you want to install the binary files?
  [/usr/bin]

  What is the directory that contains the init directories (rc0.d/ to
  rc6.d/)?

  The path "" is not an existing directory.

  What is the directory that contains the init directories (rc0.d/ to
  rc6.d/)?

  Ignoring attempt to kill the installer with Control-C, because the
  uninstaller
  has not been installed yet. Please use the Control-Z / fg combination
  instead.


  [1]+  Stopped                 ./vmware-install.pl
  gentoo2 vmware-tools-distrib # kill -9 %1
  [1]+  Killed                  ./vmware-install.pl
  gentoo2 vmware-tools-distrib # vi /etc/vmware-tools/
  installer.sh         not_configured       poweron-vm-default
  suspend-vm-default
  locations            poweroff-vm-default  resume-vm-default
  gentoo2 vmware-tools-distrib # vi /etc/vmware-tools/locations
  ===============================================================

- Follow the next steps:

        5) touch /etc/init.d/vmware-tools
        6) chmod 700 /etc/init.d/vmware-tools
        7) mkdir /etc/rc0.d; mkdir /etc/rc1.d; mkdir /etc/rc2.d; mkdir /etc/rc3.d;
           mkdir /etc/rc4.d; mkdir /etc/rc5.d; mkdir /etc/rc6.d
                   --- OR ---
           (cd /etc; for i in `seq 0 6`; do ln -s init.d rc$i.d; done)
           # Beware of warning of overwriting during the install. You can safely overwrite. 
        8) nano -w /etc/vmware-tools/locations :
    
      set "INITDIR" to /etc
      set "INITSCRIPTSDIR" to /etc/init.d

- Running vmware-install.pl again

        # ./vmware-install.pl 

- I answered all questions just hitting ENTER.
  The Programm is running vmware-config.pl also and compiles some things.
  After all, the Programm try to start a X Session but quit with the know
  "keyboard" "Keyboard" error.
  Unfortunately i coul'd create a Logfile of all this. In my case the
  vmware-install.pl script runs without problems and ends with the "Enjoy"
  message.

- startx ist is aborting with:

        (EE)No Input driver matching 'Keyboard'

- So i edit the File /usr/X11/xorg.conf

Section "InputDevice"
    Identifier  "Keyboard"
#   Driver      "Keyboard"
    Driver      "keyboard"

- And i use a PS" mouse so i changed:

#   Option "Device"      "/dev/mouse"
    Option "Device"      "/dev/psaux"

- Try again: startx

- YES! X ist starting and the mouse is working.
  So i killed the Session with CTRL-ALT-Backspace

- Creating a .xinitrc File in my Home with an "startkde" entry

        # cat ~/.xinitrc

startkde

- # vmware-toolbox &

- Workaround for the Time-Sync Problem: "ntpdate <timeserver>" in a cronjob :)

Let me know your experiences if you try this Workaround! --Peter Nuding 19:06, 14 Jul 2005 (GMT)

[edit] Old stuff cut out

[edit] Introduction

The examples presented in this guide are for VMware GSX Server 3.1.0, but can probably be applied to other VMware versions with compatible virtual machine specifications, e.g. VMware Workstation 4.5. (It depends on how different their VMware Tools are.)

Note: The approach described here and the patch DO indeed work flawlessly with the VMware Tools 4.5.2 build-8848 for Linux (vmware-linux-tools.tar.gz, MD5 = 86b9a24aa1effe4da4f09a3393d44105) included with VMware 4.5.2 Workstation for Windows. I used Gentoo 2004.3 with a Vanilla Kernel 2.4.28 as Guest OS (Kernel sources and C compiler are needed, since the install script will (optionally) build the "vmhgfs module").

Warning: The referenced patch files do not work with VMWare Tools 5.0 build 13124. Several of the hunks patch fine, but several others do not. I'll try to update the patch but am not sure how much work will be involved at this point.

[edit] Installing vmware-tools

{Box Warning|Following the directions in this section will lead to errors. It needs cleaning up by someone that knows more regarding VMWare.}}

X.Org 7.0 and greater no longer needs VMware Tools for the mouse cursor to move seamlessly between the virtual machine and your host operating system. Video and keyboard are also fully supported. Dynamic screen resizing does not work. Running the vmware-toolls-config.pl script will create the vmhgfs kernel module which can be insmod'ed to give host OS folder access. Adding "tools.remindInstall = FALSE" to the VM's config file will remove the status bar warning.


VMware can run guest OS without VMware Tools installed. However, without VMware Tools, your virtual machine loses the benefits of enhanced performance and manageability.


Code: Mount the drives and copy the files from the cdrom
mount -t iso9660 -r /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/*.tar.* /usr/portage/distfiles

If you're using files from a different disk drive ( or a different directory) make sure you edit the command above to reflect this. Note The cdrom with the vmware tools will be visible in vmware when you select the "install VMware tools" from the VM menu of the VMware program.

Make sure that you have the right arch set in make.conf & see TIP Dealing with masked packages

File: /etc/make.conf
ACCEPT_KEYWORDS="~x86"

Note: If the ebuild will not build because it expects a older version of VMware-Tools then use an overlay to fix : HOWTO Installing 3rd Party Ebuilds


    • nano -w /usr/portage/app-emulation/vmware-linux-tools/vmware-linux-tools-5.0.0.ebuild
    • change the line MY_PN= to
      MY_PN="VMwareTools-5.5.0-16958"
    • rm /usr/portage/app-emulation/vmware-linux-tools/files/digest-vmware-linux-tools-5.0.0
    • ebuild /usr/portage/app-emulation/vmware-linux-tools/vmware-linux-tools-5.0.0.ebuild digest, now emerge as in 4)
  1. touch /etc/init.d/vmware-tools
  2. chmod 700 /etc/init.d/vmware-tools
  3. mkdir /etc/rc{0,1,2,3,4,5,6}.d
    • [EDIT for build 13124 and 5.5.0-16958] I found that i must create:
      mkdir /etc/init.d/rc{0,1,2,3,4,5,6}.d instead.
  4. nano -w /etc/vmware-tools/locations :
    set "INITDIR" to /etc
    set "INITSCRIPTSDIR" to /etc/init.d
    • [EDIT for build 13124 and 5.5.0-16958] If you follow [EDIT for build 13124 and 5.5.0-16958] under 7: change the corresponding answer lines to:
      answer INITDIR /etc/init.d
      answer INITSCRIPTSDIR /etc/init.d
  5. ln -sf /dev/input/mice /dev/mouse
  6. /usr/bin/vmware-config-tools.pl
    • [EDIT for build 13124 and 5.5.0-16958] /usr/bin/vmware-config-tools.pl -skipstopstart
      The -skipstopstart is important; the perl script is broken on Gentoo.
      If you are running on VMware Workstation 5.0 has following Error:
Code: Error run installation script X Window setting
(EE)No Input driver matching 'Keyboard'

please modify VMware Tools file /usr/lib/vmware-tools/configurator/XFree86-4/XF86Config-4 so that the keyboard InputDevice section show

File: /usr/lib/vmware-tools/configurator/XFree86-4/XF86Config-4 (InputDevice Section)
# Driver    "Keyboard"
Driver     "keyboard"

Note the error is just from the capitalization of the K in "Keyboard", the section exists just needs the K changing to a k.

11) rm -rf /etc/rc?.d
11b) [EDIT for build 13124 ] if you follow 7b):

    rm -rf /etc/init.d/rc?.d

12) rm -rf /etc/init.d/vmware-tools
13) rc-update add vmware-linux-tools default
14) /etc/init.d/vmware-linux-tools start
14b) [EDIT for and 5.5.0-16958] If the script won't start, you may have to run 14c and 14d
14c) rm /etc/not_configured /etc/vmware-tools/not_configured
14d) /etc/init.d/vmware-linux-tools start

That should have you covered. Ignore the rest of this section if you are using VMware-tools v5.0.

You may need to edit the generated vmware-linux-tools file to change 'exit 1' into 'return 1' in three places.

[edit] Booting live CD

smp to boot into a 2.6.x kernel.
Code: enter kernel choice
boot: smp

There's no particular reason to boot with the "smp" option (especially if your machine has only one processor). VMware doesn't currently support SMP in the guest OS. Just hitting return works equally well. -- Mmoo9154 02:22, 6 Jul 2005 (GMT)

VMWare Workstation 5.5 supports dual virtual processors, but it only works if the host PC has dual Processors or has Hyper-Threading enabled. "smp" is not an option with the latest version of Gentoo. -- Guillermo Gutierrez 21:00, 1 Dec 2005 (PST)

VMWare Server also supports multiple virtual processors, but it only works if the host PC has dual Processors or has Hyper-Threading enabled. -- SalusaSecondus 1825, 11 Dec 2006 (PST)

[edit] Comment on use of modules

You may also configure those options as modules. If you do that, you will have to enter those modules into /etc/modules.autoload.d/kernel-2.6 and run modules-update after you compiled and installed new kernel and modules into filesystem. (For more details, please see Installing Separate Kernel Modules.)

[edit] Adding Other Packages

Once you have your new kernel successfully running, you can proceed to add additional packages for VMware Tools to work more efficiently.

[edit] Linux PCI Utilities

VMware Tools makes use of a few utility programs, most of which are already part of a standard Gentoo Linux installation. One exception is the lspci tool for checking devices on the PCI bus, part of the Linux PCI Utilities (pciutils) package. Use the emerge --ask <package_name> syntax to make sure it gets installed:

# emerge -a pciutils

emerge will show an R for Reinstall and an N if it is to be Newly installed. Then it will prompt you to continue with the emerge... answer yes or no as appropriate. Then verify that it works as expected:

Code: lspci
0000:00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
0000:00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 08)
0000:00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
0000:00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 08)
0000:00:0f.0 VGA compatible controller: VMware Inc: Unknown device 0405
0000:00:10.0 SCSI storage controller: BusLogic BT-946C (BA80C30) [MultiMaster 10] (rev 01)
0000:00:11.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)

You should see a list of all devices connected via the PCI bus.

[edit] Um, huh?

"Afterwords, you can type etc-update to merge VMWare's xorg.conf. Make sure you do not merge, and disregard the updated file (it has things that will cause X to fail)."

Umm... so I *can* type etc-update to merge xorg.conf.. but I *shouldn't* do so because I have to make sure I don't merge it? I could use some clarification here. :)

[edit] If you get a screen with a cursor..

then X will work. Now type Ctrl-Alt-Backspace to exit back to the console.

[edit] User experiences

What about adding a section on "user experiences"?

I installed Gentoo 2006.1 in a VMWare virtual machine and then I put on the web the problems I went through and the solutions I found in the hope they can be useful to someone else.

This is the link:

http://max.duestrade.it/terzaPagina/max/VMGentoo.html

Bye, Max

[edit] ESX Server

Maybe I missed it, But I didn't see anything about running gentoo on ESX server. Everything seems to work the same, However I needed to add "doscsi" to the grub kernel line in order to mount the root partition.

[edit] VmWare Server 1.02 (freeware)

VMWare Server 1.02 freeware (2007/02) with latest gentoo 2006.1 (min-installer) requires "doscsi" to be added to the "kernel" bootloader config if you use LSIlogic SCSI emulation and genkernel as instructed by the Gentoo Handbook (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10).

[edit] Mouse Alignment Issues (VMWare Fusion)

I have Gentoo 2007.0 installed on VMWare Fusion (on my Macbook -- not Windows NT/2K/XP) and X11/KDE work great, except my cursor isn't where my mouse is. In other words, the cursor is in one spot, but clicking and dragging shows it's in another spot. I can move the mouse and the position away from the visible cursor changes from time to time. Any suggestions?

[edit] vmware-tools deprecated by open-vm-tools

These opensource tools are simply "emerge & play". Far from the crap of the previous vmware-tools.

The "Installing Vmware tools" section should be corrected and emerging open-vm-tools strongly recommanded.

El_Goretto.

Personal tools