Linux Slackware Энциклопедия от А до Я
Сайт посвящен свободно распространяемому ПО и Linux Slackware в частности.
Разделы:
Раздел/Тема
Главная -> Программы -> VMware

Учебников, пособий, статей, описывающих эту кульную программу очень много. Поэтому здесь я просто привожу лог установки VMware Workstation 4.5.2 build-8848 for Linux на Slackware. Пожалуй единственная изюминка здесь в том, что предварительно необходимо сделать наш Slackware немного похожим на Red Hat. Для этого мы создадим 7 каталогов:

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

Теперь можно начинать установку. Этот лог поможет в случае если вы будите испытывать затруднения при ответах на вопросы.

# ./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] yes

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

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

What is the directory that contains the init scripts? 
[/etc/rc.d] 
In which directory do you want to install the library files? 
[./lib/vmware] /usr/lib/vmware

The path "/usr/lib/vmware" does not exist currently. This program is going to 
create it, including needed parent directories. Is this what you want? [yes] yes

In which directory do you want to install the manual files? 
[./man] /usr/man

In which directory do you want to install the documentation files? 
[./doc/vmware] /usr/doc/vmware

The path "/usr/doc/vmware" does not exist currently. This program is going to 
create it, including needed parent directories. Is this what you want? [yes] yes

The installation of VMware Workstation 4.5.2 build-8848 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "y/vmware-uninstall.pl".

Before running VMware Workstation for the first time, you need to configure it 
by invoking the following command: "y/vmware-config.pl". Do you want this 
program to invoke the command for you now? [yes] yes

Making sure VMware Workstation's services are stopped.

Stopping VMware services:
   Virtual machine monitor                                             done

You must read and accept the End User License Agreement to continue.
Press enter to display it. 
=== >> === >> === >> === >> === >> === >> === >> === >> === >> === >> ===
VMware (R) is a registered trademark of VMware, Inc.

Do you accept? (yes/no) yes

Thank you.

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

None of VMware Workstation's pre-built vmmon modules 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] 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.4.26/build/include] 

Extracting the sources of the vmmon module.

Building the vmmon module.

Using standalone build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only'
make[1]: Entering directory `/tmp/vmware-config1/vmmon-only'
make[2]: Entering directory `/tmp/vmware-config1/vmmon-only/driver-2.4.26'
make[2]: Leaving directory `/tmp/vmware-config1/vmmon-only/driver-2.4.26'
make[2]: Entering directory `/tmp/vmware-config1/vmmon-only/driver-2.4.26'
make[2]: Leaving directory `/tmp/vmware-config1/vmmon-only/driver-2.4.26'
make[1]: Leaving directory `/tmp/vmware-config1/vmmon-only'
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
The module loads perfectly in the running kernel.

Extracting the sources of the vmnet module.

Building the vmnet module.

Using standalone build system.
make: Entering directory `/tmp/vmware-config1/vmnet-only'
make: Leaving directory `/tmp/vmware-config1/vmnet-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.

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

Configuring a NAT network for vmnet8.

Do you want this program to probe for an unused private subnet? (yes/no/help) 
[yes] 

Probing for an unused private subnet (this can take some time)...

The subnet 192.168.52.0/255.255.255.0 appears to be unused.

This system appears to have a DHCP server configured for normal use.  Beware 
that you should teach it how not to interfere with VMware Workstation's DHCP 
server.  There are two ways to do this:

1) Modify the file /etc/dhcpd.conf to add something like:

subnet 192.168.52.0 netmask 255.255.255.0 {
# Note: No range is given, vmnet-dhcpd will deal with this subnet.
}

2) Start your DHCP server with an explicit list of network interfaces to deal 
with (leaving out vmnet8). e.g.:

dhcpd eth0

Consult the dhcpd(8) and dhcpd.conf(5) manual pages for details.

Hit enter to continue. 

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

Do you want this program to automatically configure your system to allow your 
virtual machines to access the host's filesystem? (yes/no/help) yes    

The version of Samba used in this version of VMware Workstation is licensed as 
described in the "/usr/share/doc/vmware/SAMBA-LICENSE" file.

Hit enter to continue. 

Creating a host-only network on vmnet1. (this is required to share the host's 
filesystem).

Configuring a host-only network for vmnet1.

Do you want this program to probe for an unused private subnet? (yes/no/help) 
[yes] 

Probing for an unused private subnet (this can take some time)...

The subnet 192.168.217.0/255.255.255.0 appears to be unused.

This system appears to have a DHCP server configured for normal use.  Beware 
that you should teach it how not to interfere with VMware Workstation's DHCP 
server.  There are two ways to do this:

1) Modify the file /etc/dhcpd.conf to add something like:

subnet 192.168.217.0 netmask 255.255.255.0 {
# Note: No range is given, vmnet-dhcpd will deal with this subnet.
}

2) Start your DHCP server with an explicit list of network interfaces to deal 
with (leaving out vmnet1). e.g.:

dhcpd eth0

Consult the dhcpd(8) and dhcpd.conf(5) manual pages for details.

Hit enter to continue. 

This system appears to have a CIFS/SMB server (Samba) configured for normal use.
If this server is intended to run, you need to make sure that it will not 
conflict with the Samba server setup on the private network (the one that we use
to share the host's filesystem).  Please check your /etc/samba/smb.conf file so 
that:

.  The "interfaces" line does not contain "192.168.217.1/255.255.255.0"
.  There is a "socket address" line that contains only your real host IP address


Hit enter to continue. 

Starting VMware services:
   Virtual machine monitor                                             done
   Virtual ethernet                                                    done
   Bridged networking on /dev/vmnet0                                   done
   Host-only networking on /dev/vmnet1 (background)                    done
   Host-only networking on /dev/vmnet8 (background)                    done
   NAT service on /dev/vmnet8                                          done

You have successfully configured VMware Workstation to allow your virtual 
machines to access the host's filesystem.  Would you like to add a username and 
password for accessing your host's filesystem via network interface vmnet1 at 
this time? (yes/no/help) [yes] no

You can add more usernames at any time by invoking the following command as 
root: "/usr/bin/vmware-smbpasswd vmnet1 -a "

The configuration of VMware Workstation 4.5.2 build-8848 for Linux for this 
running kernel completed successfully.

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

Enjoy,

--the VMware team

После успешной установки созданные каталоги можно удалить. При первом запуске виртуальной машины возможны проблемы с графической подсистемой. Дело в том, что VMware использует для видеовывода VidMode или DGA режимы. Эти проблемы свойственны драйверам NVidia, а также если не ошибаюсь ATI тоже. При попытке запуска виртуальная машина выдает предупреждение на счет "direct graphics (DGA extension) initialization failed". На моем ноутбуке видео SIS и таких проблем не возникло даже на почти стандартной конфигурации Xorg. К сожалению, сейчас у меня нет доступа к стационарной машине, поэтому нижеследующие советы даю по памяти. Для начала следует проверить наличие файлов модулей /usr/X11R6/lib/libXxf86vm.so.1.0 и /usr/X11R6/lib/libXxf86dga.so.1.0. Вообще-то они входят в пакет x11-6.7.0-i486-4 и их отсутствие может быть только результатом шаловливых ручек. Дальше проверяем загрузку модулей при старте Xorg.

$ cat /var/log/Xorg.0.log|grep XF  
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-Misc
(II) Loading extension XFree86-DGA
(II) SIS(0): Using XFree86 Acceleration Architecture (XAA)
(II) Initializing built-in extension XFree86-Bigfont

Как это ни странно, но решить данную проблему при использовании дров от NVidia мне помогло раскомментирование сточки в секции "Module" файла /etc/X11/xorg.conf

SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection

Т.е. я по сути отключаю этот модуль. Сейчас мне сложно сказать почему, но могу предположить, что DGA режим реализован прямо в драйверах видеокарты и чтобы они не конфликтовали нужно отключить стандартные. Повторяю - это предположение. Скорее же всего я просто отключил DGA и поэтому VMware перестала ругаться. Без него просто будет работать чуть медленнее, но зато на весь экран. Можно попробовать найти нужный ключ при конфигурации драйверов, но тут я вам не помощник.

Признанный облегчить жизнь пользователя пакет VMware Tools устанавливается на уже запущенную в виртуале ОСь. Этот процесс физически реализован так. Операционке вместо реального CD подсовывается виртуальный, в автозапуске которого находятся необходимые дрова. В Windows они тут же начинают устанавливаться. Предварительно, перед установкой, нужно на реальной ОС отмонтировать CDROM, прописанный в конфигах VMware, чтобы дать ему свободу действий. Если же вы ставите виртуальный Линукс, то драйвера придется самому там ставить. Последовательность такая: в VMware при запущенной в виртуале линуксе жмем Install VMware Tools; переходим в виртуальную линукс и монтируем mount /dev/cdrom; заходим в директорию нашего cdrom (например /mnt/cdrom) и видим файл пакета, который распаковываем у себя и запускаем скрипт установки vmware-install.pl; отвечаем на вопросы и все. Данные инструменты работают только в виртуальных Иксах. На все случаи жизни есть мануал - читайте.

Описывать работу с этой замечательной программой я не буду, потому что это уже сделано монго раз разными людьми. Я же ограничусь просто ссылками на понравившиеся мне статьи.

1. VMware - виртуальный полигон для администратора и разработчика на основе Linux и VMWare. Это пожалуй лучшая статья из всех, что я читал.
2. Система виртуальных машин фирмы VMWare. А это, наверное, самая свежая статья.

Gena 08.11.2004