VMWare Linux parameter: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
m (Text replacement - "</source" to "</syntaxhighlight")
Line 11: Line 11:
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 3
net.ipv4.tcp_synack_retries = 3
</source>
</syntaxhighlight>


==Pinning kernel to 2.6 for ESX 4.1==
==Pinning kernel to 2.6 for ESX 4.1==
Line 19: Line 19:
Pin: version 2.6.*
Pin: version 2.6.*
Pin-Priority: 1000
Pin-Priority: 1000
</source>
</syntaxhighlight>


==Autobuild of kernel drivers==
==Autobuild of kernel drivers==
Line 30: Line 30:


/usr/bin/vmware-config-tools.pl  --modules-only --default --kernel-version ${inst_kern}
/usr/bin/vmware-config-tools.pl  --modules-only --default --kernel-version ${inst_kern}
</source>
</syntaxhighlight>


<source lang=bash>
<source lang=bash>
# chmod 755 /etc/kernel/header_postinst.d/vmware
# chmod 755 /etc/kernel/header_postinst.d/vmware
</source>
</syntaxhighlight>




Line 49: Line 49:
                 vmware-tools-plugins-timesync vmware-tools-plugins-vix \
                 vmware-tools-plugins-timesync vmware-tools-plugins-vix \
                 vmware-tools-plugins-vmbackup vmware-tools-services vmware-tools-user
                 vmware-tools-plugins-vmbackup vmware-tools-services vmware-tools-user
</source>
</syntaxhighlight>


==Source from VMWare==
==Source from VMWare==
Line 57: Line 57:
<source lang=bash>
<source lang=bash>
deb http://packages.vmware.com/tools/esx/latest/ubuntu precise main
deb http://packages.vmware.com/tools/esx/latest/ubuntu precise main
</source>
</syntaxhighlight>
Then do:
Then do:
<source lang=bash>
<source 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 --
</source>
</syntaxhighlight>


2. Update your package database:
2. Update your package database:
<source lang=bash>
<source lang=bash>
# aptitude update
# aptitude update
</source>
</syntaxhighlight>


3. Get Module-Assistant:
3. Get Module-Assistant:
<source lang=bash>
<source lang=bash>
# aptitude install module-assistant
# aptitude install module-assistant
</source>
</syntaxhighlight>


4. Get the base packages:
4. Get the base packages:
<source lang=bash>
<source 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
</source>
</syntaxhighlight>


5. Get the modules:
5. Get the modules:
Line 83: Line 83:
# 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
</source>
</syntaxhighlight>


6. Get kernel and headers:
6. Get kernel and headers:
<source lang=bash>
<source lang=bash>
# aptitude install linux-{image,headers}-3.2.0-52-generic
# aptitude install linux-{image,headers}-3.2.0-52-generic
</source>
</syntaxhighlight>


7. Compile and install the modules with module assistant
7. Compile and install the modules with module assistant
Line 95: Line 95:
# 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
# m-a --text-mode --kvers-list 3.2.0-52-generic install 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
</source>
</syntaxhighlight>


== Minimal /etc/vmware-tools/config ==
== Minimal /etc/vmware-tools/config ==
<source lang=bash>
<source lang=bash>
libdir = "/usr/lib/vmware-tools"
libdir = "/usr/lib/vmware-tools"
</source>
</syntaxhighlight>


== Switch to Ubuntu open-vm-tools ==
== Switch to Ubuntu open-vm-tools ==
Line 106: Line 106:
# /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


</source>
</syntaxhighlight>

Revision as of 21:05, 25 November 2021

Kategorie:VMWareKategorie:Ubuntu

/etc/sysctl.conf

<source lang=bash>

  1. vm.swappiness = 0 The kernel will swap only to avoid an out of memory condition.

vm.swappiness = 0

  1. TCP SYN Flood Protection

net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.tcp_synack_retries = 3 </syntaxhighlight>

Pinning kernel to 2.6 for ESX 4.1

Create /etc/apt/preferences.d/linux-image with this content: <source lang=bash> Package: linux-image-server linux-server linux-headers-server Pin: version 2.6.* Pin-Priority: 1000 </syntaxhighlight>

Autobuild of kernel drivers

Create /etc/kernel/header_postinst.d/vmware : <source lang=bash>

  1. !/bin/bash
  1. 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} </syntaxhighlight>

<source lang=bash>

  1. chmod 755 /etc/kernel/header_postinst.d/vmware

</syntaxhighlight>


Prebuild packages from VMWare

<source lang=bash> 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

</syntaxhighlight>

Source from VMWare

After you removed previously installed vmware-tools, just follow these steps:

1. Add this to your /etc/apt/sources.list: <source lang=bash> deb http://packages.vmware.com/tools/esx/latest/ubuntu precise main </syntaxhighlight> Then do: <source lang=bash> gpg --search C0B5E0AB66FD4949 # hinzufügen (1) gpg -a --export C0B5E0AB66FD4949 | apt-key add -- </syntaxhighlight>

2. Update your package database: <source lang=bash>

  1. aptitude update

</syntaxhighlight>

3. Get Module-Assistant: <source lang=bash>

  1. aptitude install module-assistant

</syntaxhighlight>

4. Get the base packages: <source lang=bash>

  1. aptitude install vmware-tools-foundation vmware-tools-libraries-nox vmware-tools-guestlib vmware-tools-core

</syntaxhighlight>

5. Get the modules: <source lang=bash>

  1. aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-common
  2. aptitude install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules-source

</syntaxhighlight>

6. Get kernel and headers: <source lang=bash>

  1. aptitude install linux-{image,headers}-3.2.0-52-generic

</syntaxhighlight>

7. Compile and install the modules with module assistant <source lang=bash>

  1. m-a prepare --kvers-list 3.2.0-52-generic
  2. m-a --text-mode --kvers-list 3.2.0-52-generic build vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules
  3. m-a --text-mode --kvers-list 3.2.0-52-generic install vmware-tools-{vmci,vmxnet,vsock,vmblock,vmhgfs,vmsync}-modules

</syntaxhighlight>

Minimal /etc/vmware-tools/config

<source lang=bash> libdir = "/usr/lib/vmware-tools" </syntaxhighlight>

Switch to Ubuntu open-vm-tools

<source lang=bash>

  1. /usr/bin/vmware-uninstall-tools.pl ; aptitude purge open-vm-tools ; apt update ; apt install open-vm-tools

</syntaxhighlight>