VMWare Linux parameter: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "</source" to "</syntaxhighlight") |
m (Text replacement - "[[Kategorie:" to "[[Category:") |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[ | [[Category:VMWare]][[Category:Ubuntu]] | ||
==/etc/sysctl.conf== | ==/etc/sysctl.conf== | ||
< | <syntaxhighlight lang=bash> | ||
# vm.swappiness = 0 The kernel will swap only to avoid an out of memory condition. | # vm.swappiness = 0 The kernel will swap only to avoid an out of memory condition. | ||
vm.swappiness = 0 | vm.swappiness = 0 | ||
Line 15: | Line 15: | ||
==Pinning kernel to 2.6 for ESX 4.1== | ==Pinning kernel to 2.6 for ESX 4.1== | ||
Create /etc/apt/preferences.d/linux-image with this content: | Create /etc/apt/preferences.d/linux-image with this content: | ||
< | <syntaxhighlight lang=bash> | ||
Package: linux-image-server linux-server linux-headers-server | Package: linux-image-server linux-server linux-headers-server | ||
Pin: version 2.6.* | Pin: version 2.6.* | ||
Line 23: | Line 23: | ||
==Autobuild of kernel drivers== | ==Autobuild of kernel drivers== | ||
Create /etc/kernel/header_postinst.d/vmware : | Create /etc/kernel/header_postinst.d/vmware : | ||
< | <syntaxhighlight lang=bash> | ||
#!/bin/bash | #!/bin/bash | ||
Line 32: | Line 32: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <syntaxhighlight lang=bash> | ||
# chmod 755 /etc/kernel/header_postinst.d/vmware | # chmod 755 /etc/kernel/header_postinst.d/vmware | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 38: | Line 38: | ||
==Prebuild packages from VMWare== | ==Prebuild packages from VMWare== | ||
< | <syntaxhighlight lang=bash> | ||
echo "deb http://packages.vmware.com/tools/esx/latest/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/vmware-repository | echo "deb http://packages.vmware.com/tools/esx/latest/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/vmware-repository | ||
apt-key adv --keyserver subkeys.pgp.net --recv-keys C0B5E0AB66FD4949 | apt-key adv --keyserver subkeys.pgp.net --recv-keys C0B5E0AB66FD4949 | ||
Line 55: | Line 55: | ||
1. Add this to your /etc/apt/sources.list: | 1. Add this to your /etc/apt/sources.list: | ||
< | <syntaxhighlight lang=bash> | ||
deb http://packages.vmware.com/tools/esx/latest/ubuntu precise main | deb http://packages.vmware.com/tools/esx/latest/ubuntu precise main | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Then do: | Then do: | ||
< | <syntaxhighlight lang=bash> | ||
gpg --search C0B5E0AB66FD4949 # hinzufügen (1) | gpg --search C0B5E0AB66FD4949 # hinzufügen (1) | ||
gpg -a --export C0B5E0AB66FD4949 | apt-key add -- | gpg -a --export C0B5E0AB66FD4949 | apt-key add -- | ||
Line 65: | Line 65: | ||
2. Update your package database: | 2. Update your package database: | ||
< | <syntaxhighlight lang=bash> | ||
# aptitude update | # aptitude update | ||
</syntaxhighlight> | </syntaxhighlight> | ||
3. Get Module-Assistant: | 3. Get Module-Assistant: | ||
< | <syntaxhighlight lang=bash> | ||
# aptitude install module-assistant | # aptitude install module-assistant | ||
</syntaxhighlight> | </syntaxhighlight> | ||
4. Get the base packages: | 4. Get the base packages: | ||
< | <syntaxhighlight lang=bash> | ||
# aptitude install vmware-tools-foundation vmware-tools-libraries-nox vmware-tools-guestlib vmware-tools-core | # aptitude install vmware-tools-foundation vmware-tools-libraries-nox vmware-tools-guestlib vmware-tools-core | ||
</syntaxhighlight> | </syntaxhighlight> | ||
5. Get the modules: | 5. Get the modules: | ||
< | <syntaxhighlight lang=bash> | ||
# aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-common | # aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-common | ||
# aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules-source | # aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules-source | ||
Line 86: | Line 86: | ||
6. Get kernel and headers: | 6. Get kernel and headers: | ||
< | <syntaxhighlight lang=bash> | ||
# aptitude install linux-{image,headers}-3.2.0-52-generic | # aptitude install linux-{image,headers}-3.2.0-52-generic | ||
</syntaxhighlight> | </syntaxhighlight> | ||
7. Compile and install the modules with module assistant | 7. Compile and install the modules with module assistant | ||
< | <syntaxhighlight lang=bash> | ||
# m-a prepare --kvers-list 3.2.0-52-generic | # m-a prepare --kvers-list 3.2.0-52-generic | ||
# m-a --text-mode --kvers-list 3.2.0-52-generic build vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules | # m-a --text-mode --kvers-list 3.2.0-52-generic build vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules | ||
Line 98: | Line 98: | ||
== Minimal /etc/vmware-tools/config == | == Minimal /etc/vmware-tools/config == | ||
< | <syntaxhighlight lang=bash> | ||
libdir = "/usr/lib/vmware-tools" | libdir = "/usr/lib/vmware-tools" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Switch to Ubuntu open-vm-tools == | == Switch to Ubuntu open-vm-tools == | ||
< | <syntaxhighlight lang=bash> | ||
# /usr/bin/vmware-uninstall-tools.pl ; aptitude purge open-vm-tools ; apt update ; apt install open-vm-tools | # /usr/bin/vmware-uninstall-tools.pl ; aptitude purge open-vm-tools ; apt update ; apt install open-vm-tools | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 03:21, 26 November 2021
/etc/sysctl.conf
# vm.swappiness = 0 The kernel will swap only to avoid an out of memory condition.
vm.swappiness = 0
# TCP SYN Flood Protection
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 3
Pinning kernel to 2.6 for ESX 4.1
Create /etc/apt/preferences.d/linux-image with this content:
Package: linux-image-server linux-server linux-headers-server
Pin: version 2.6.*
Pin-Priority: 1000
Autobuild of kernel drivers
Create /etc/kernel/header_postinst.d/vmware :
#!/bin/bash
# We're passed the version of the kernel being installed
inst_kern=$1
/usr/bin/vmware-config-tools.pl --modules-only --default --kernel-version ${inst_kern}
# chmod 755 /etc/kernel/header_postinst.d/vmware
Prebuild packages from VMWare
echo "deb http://packages.vmware.com/tools/esx/latest/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/vmware-repository
apt-key adv --keyserver subkeys.pgp.net --recv-keys C0B5E0AB66FD4949
apt-get update
apt-get install vmware-tools-core vmware-tools-esx-nox vmware-tools-foundation \
vmware-tools-guestlib vmware-tools-libraries-nox vmware-tools-libraries-x \
vmware-tools-plugins-autoupgrade vmware-tools-plugins-deploypkg \
vmware-tools-plugins-grabbitmqproxy vmware-tools-plugins-guestinfo \
vmware-tools-plugins-hgfsserver vmware-tools-plugins-powerops \
vmware-tools-plugins-timesync vmware-tools-plugins-vix \
vmware-tools-plugins-vmbackup vmware-tools-services vmware-tools-user
Source from VMWare
After you removed previously installed vmware-tools, just follow these steps:
1. Add this to your /etc/apt/sources.list:
deb http://packages.vmware.com/tools/esx/latest/ubuntu precise main
Then do:
gpg --search C0B5E0AB66FD4949 # hinzufügen (1)
gpg -a --export C0B5E0AB66FD4949 | apt-key add --
2. Update your package database:
# aptitude update
3. Get Module-Assistant:
# aptitude install module-assistant
4. Get the base packages:
# aptitude install vmware-tools-foundation vmware-tools-libraries-nox vmware-tools-guestlib vmware-tools-core
5. Get the modules:
# aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-common
# aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules-source
6. Get kernel and headers:
# aptitude install linux-{image,headers}-3.2.0-52-generic
7. Compile and install the modules with module assistant
# m-a prepare --kvers-list 3.2.0-52-generic
# m-a --text-mode --kvers-list 3.2.0-52-generic build vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules
# m-a --text-mode --kvers-list 3.2.0-52-generic install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules
Minimal /etc/vmware-tools/config
libdir = "/usr/lib/vmware-tools"
Switch to Ubuntu open-vm-tools
# /usr/bin/vmware-uninstall-tools.pl ; aptitude purge open-vm-tools ; apt update ; apt install open-vm-tools