Установка VMware (Russian)
From ArchWiki
i18n |
---|
English |
简体中文 |
Italiano |
Russian |
VMware устанавливается на Arch Linux довольно легко, однако установка не всегда предельно ясна.
Установка VMware Workstation
Последующая информация взята из пользовательких комментариев в AUR по VMWare Workstation пользователем whompus. Она описывает как установить VMWare Workstation 6.5.x на одну из архитектур.
В качестве временной меры можно воспользоваться представленным способом установки 6.5. Заметьте, что pacman не будет использован в данном случае, так что установку нельзя будет отследить\удалить, используя pacman.
Для установки Workstation на Linux используйте следующую инструкцию:
1. Скачайте VMware-Workstation-6.5.xxxxxx.bundle. Где xxxxx минорная (с незначительными изменениями) версия программы и архитектура.
2. В терминале смените текущую дерикторию на ту, в которую загрузили файл.
3. С правами root выполните начальные шаги установки:
# mkdir -p /etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d # sh VMware-Workstation-6.5.xxxxxx.bundle --console --custom
4. Прочитайте и примите EULA для продолжения.
5. Принимайте стандартные настройки до тех пор, пока не появится запрос "System service runlevels", установите тогда следующее:
/etc/rc.d/vmware.d/
6. Для System service scripts выставьте:
/etc/rc.d
7. (Опционально) Введите путь к директории с Integrated Virtual Debugger для Eclipse, если Eclipse установлен.
8. Жмите "ввод" для установки. Заметка: если ничего не произошло и заново открылось приглашение в консоли, попробуйте запустить установку снова без параметра '--console'.
9. Откройте Workstation (наберите vmware
в консоли) для настройки и использования!
Установка VMware Server
Заметка Я настоятельно рекомендую использовать VMWare Server 2 на ядре 2.6.27 так как это актуальные сборки. Также они не требуют наложения патча.
Вы можете использовать AUR или ручную установку VMware Server скачанного с VMware.com. Это руководство покажет как в ручную установить скачанный тарбол с VMware server, предполагается, что вы используете Voodoo или более новую версию (Duke) с версией ядра 2.6.20+ 32-bit.
Требования:
- Root доступ. Одно из двух, 'sudo' или 'su'. В этом руководстве я буду использовать 'sudo'.
- Xinetd установлен и запущен.
- Библиотеки X - libxtst, libxt и libxrender установлены.
- VMware server tarball; последний 1.0.4 build 56528 во время написания этих строк.
-
VMware server any-to-any" patch: mirror 1 and mirror 2. Note: For server 1.0.4 build 56528 you need patch vmware-any-any-update113.tar.bz2, which is on mirror 1 only. - UPDATE: Для ядра 2.6.24 вам понадобится этот patch (vmware-any-any-update115a.tgz)
- UPDATE: Для ядра 2.6.25 вам также понадобится также этот patch (vmware-any-any-update-117-very-ALPHA)
- Совместимость с VMware Workstation >= 6.0.2 Build 59824 on Linux 2.6.25
- UPDATE: Для ядра 2.6.26 вам понадобится этот patch (vmware-any-any-update117d.tar.gz), VMware версии 6.0.5 этот патч не нуже, версия vmmon нужна не младше 169.
- UPDATE: Для ядра 2.6.26 и VMWare 6.5 патчи больше _не_ нужны (6.5.0 build-118166). Графический инсталлятор работает хорошо, а все модули работают из коробки. Следуйте дальнейшим инструкциям до определения директории, содержащей init-скрипты.
Instructions:
- Run sudo mkdir -p /etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d to create VMware runlevel directories.
- Run sudo ln -s /bin/lsmod /sbin/ to create symlink for lsmod.
- Extract VMware server tarball somewhere... i.e. /tmp/.
- Run cd /tmp/vmware-server-distrib;sudo ./vmware-install.pl. I used /home/vmware/bin for installation.
- When it asks where the directories for rc0.d thru rc6.d are, use /etc/rc.d/vmware.d.
- When it asks where the init directory is, use /etc/rc.d.
- *QUIT* when it asks you if you want to run VMware configuration for the first time.
- Extract VMware server any-to-any patch somewhere... i.e. /tmp/.
- Run cd /tmp/vmware-any-any-update*REV*;sudo ./runme.pl. This will patch VMware server modules to allow Linux kernel 2.6.20 compilation.
- For Linux 2.6.25 additionally to the previous patch115a or 116 you need to manually patch with 117_Alpha.
- For 2.6.25 extract 117 to the location tar xzf vmware-any-any-update-117-very-ALPHA.tgz -C /usr/lib/vmware/modules/source/
- For 2.6.25 patch cd /usr/lib/vmware/modules/source/ and run./vmware-2.6.25.sh and continue with next step.
- Run cd /home/vmware/bin;sudo ./vmware-config.pl to compile VMware modules.
Running
It's a possibility the first time you try to run Vmware server it'll throw an error stating something about "Unable to power virtual machine". Stop the VMware server and restart xinetd wtih /etc/rc.d/vmware stop;wait;/etc/rc.d/xinetd restart.
Rerun sudo /home/vmware/bin/vmware-config.pl again. If this still fails, restart your computer and do the above again. It should be fixed.
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's network when not actually using vmware, then you will need to do this. You will need to start it before you can run vmware though.
There is a problem with vmware unable to run correctly after a reboot. To fix this edit /etc/rc.d/vmware
, find the text below
case "$1" in start)
and put
rm /etc/vmware/not_configured
immediately after that line.
To start vmware, you just do vmware
from a console window, or create a shortcut or menu item however you like.
Some notes:
Leave the /etc/rc.d/vmware.d
directory 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.
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="tty[[0-9]]*", NAME="vc/%n", SYMLINK="%k" # floppy devices KERNEL="fd[[0-9]]*", NAME="floppy/%n" , SYMLINK="fd%n"
2. Start/stop script
It takes care of devices and starts vmware, also stops vmware and removes dev entries. Call it, for example, 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 and starting VMware" for i in `seq 0 9`; do mknod /dev/vmnet$i c 119 $i chmod 0600 /dev/vmnet$i done for i in `seq 0 3`; do mknod /dev/parport$i c 99 $i chmod 0600 /dev/parport$i done mknod /dev/vmmon c 10 165 chmod 0660 /dev/vmmon /etc/rc.d/vmware start ;; stop) stat_busy "Stopping VMware and removing /dev entries" /etc/rc.d/vmware stop rm /dev/vmmon for i in `seq 0 3`; do rm /dev/parport$i done for i in `seq 0 9`; do rm /dev/vmnet$i done ;; restart) $0 stop $0 start ;; *) echo "usage: $0 {start|stop|restart}" esac exit 0
3. Modify /etc/rc.conf
. (*Note - this step is optional! See also the notes under the "Running" section above)
Add mkvmdev
to daemons in your rc.conf
, and remember to remove vmware
from rc.conf
. Or if you prefer, you can delete the lines that launch vmware from mkvmdev
and leave your original vmware
in rc.conf
- your choice.
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) - FIXED
VMware and kernel 2.6.16 compile modules problem
PROBLEM: kernel 2.6.16-x - vmware or vmwareplayer complains that headers are incorect.
FIX: You need vmware-any-any-update patch mirror here or here.
Just untar the archive and run ./runme.pl as root - and you-re happy again!
VMware and kernel 2.6.20 compile modules problem
Below is a solution for compiling the vmware modules on kernel 2.6.20.
cd /usr/lib/vmware/modules/source/ sudo tar -xvf vmmon.tar cd vmmon-only sudo vi include/compat_kernel.h Find this: #define __NR_compat_exit __NR_exit static inline _syscall1(int, compat_exit, int, exit_code); and change the static inline ..... line to: int compat_exit(int exit_code); Then tar up the vmmon-only directory again. cd .. #go back to the source directory tar -cf vmmon.tar vmmon-only Finally, run vmware-config.pl
VMware and kernel 2.6.22 compile modules problem
May not work properly yet. Apply the patch from http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update112.tar.gz , replace vmnet.tar with http://npw.net/~phbaer/vmnet.tar and reinstall. Note: this is an ugly hack, please dont put it into production systems. Some guest OS'es may have crashes and networking problems with this. Dont tell us that you havent been warned
VMware and kernel 2.6.24 compile modules problem
May not work properly yet. Apply the patch from http://bio.artcradle.com/temp/vault/vmware-any-any-update-116.tgz (untar, run runme.pl script) Note: this is an ugly hack, please don't put it into production systems. Some guest OS'es may have crashes and networking problems with this. Don't tell us that you haven't been warned
VMware and kernel 2.6.25 compile modules problem
There are extra steps required for Vmware WKS 6.0.3 build 80004, should be the same for VMware Server
- Install and patch as described (use vmware-any-any-update-116.tgz)
- Download the patch117vmware-any-any-update-117-very-ALPHA.tgz
- Extract the archive in /usr/lib/vmware/modules/source
- Run vmware-2.6.25.sh and then vmware-config.pl
VMware and kernel 2.6.26 compile modules problem
If after compiling the modules following the method for 2.6.25 you receive the "Version mismatch with vmmon module:" error when powering on a virtual machine you will need to take one additional step.
cd /usr/lib/vmware/moduels/source/; sudo tar -xvf vmmon.tar; sudo vi vmmon-only/include/iocontrols.h; Find the line 48: #define VMMON_VERSION (161 << 16 | 0) and change to #define VMMON_VERSION (167 << 16 | 0) Save and exit. sudo tar -cf vmmon.tar vmmon-only; Finally, run vmware-config.pl.
slow networking between host and guest
"Those oversized improperly checksummed packets are TCP Segmentation Offload packets. Use 'ethtool -k eth0 tso off' to disable TSO on eth0 (or any other interface which you want to get bridged). At this moment vmnet does not understand TSO, and in addition to that it is silly to use TSO together with bridged networking as vmnet will have to split such packet anyway to pass it to the guest, so splitting will be done anyway, and in addition to it kernel will have to prepare metadata about TCP stream for hardware, so you'll probably get worse performance with TSO enabled than with disabled when you'll have some guest running."
NOTE: ethtool is on extra packages
Samba issues
The guest os under vmware cannot see a samba share running on the linux host. To fix this problem, edit /etc/samba/smb.conf and make some changes under [global]. The following are suggested:
workgroup = YOUR_WORKGROUP
netbios name = YOUR_SERVER_NAME
encrypt passwords = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = eth0 vmnet1 vmnet8
sysv shm key=/dev/vmnet1
bind interfaces only = true
Connecting Remotely
If you setup a server that you would like to connect to remotely, please add the following to /etc/hosts.allow:
vmware-authd: ALL
This will enable xinetd to allow connections from a remote vmware client.
If this condition is not met, you may see in your /var/log/everything.log:
Feb 4 03:34:12 jeffc xinetd[7232]: libwrap refused connection to vmware-authd (libwrap=vmware-authd) from 192.168.1.1