{"id":242,"date":"2011-01-11T09:41:31","date_gmt":"2011-01-11T08:41:31","guid":{"rendered":"https:\/\/thebc.ch\/blog\/?p=242"},"modified":"2013-07-17T07:24:34","modified_gmt":"2013-07-17T05:24:34","slug":"konfiguration-eines-esx-servers","status":"publish","type":"post","link":"https:\/\/thebc.ch\/blog\/?p=242","title":{"rendered":"Konfiguration eines ESX Servers"},"content":{"rendered":"<div class='toc toc'>\n<h2>Contents<\/h2>\n<ul class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Installation\">Installation<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Partitions\">Partitions<\/a>\n\t\t\t<\/li>\n\t\t<\/ul>\n\t<li>\n\t\t<a href=\"#Konfiguration\">Konfiguration<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#MUI\">MUI<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Console\">Console<\/a>\n\t\t\t<\/li>\n\t\t<\/ul>\n\t<li>\n\t\t<a href=\"#Zeitsynchronisation\">Zeitsynchronisation<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Zeitzone_einstellen\">Zeitzone einstellen<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Zeit_via_NTP_synchronisieren\">Zeit via NTP synchronisieren<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Zeitsynchronisation_in_VM\">Zeitsynchronisation in VM<\/a>\n\t\t\t<\/li>\n\t\t<\/ul>\n\t<li>\n\t\t<a href=\"#VMware_Usage_Counters\">VMware Usage Counters<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Backup_der_Konfiguration\">Backup der Konfiguration<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Hardwarenderungen\">Hardware\u00c3\u00a4nderungen<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#VM_kopieren\">VM kopieren<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#VM_aufsetzen\">VM aufsetzen<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Templates\">Templates<\/a>\n\t\t\t<\/li>\n<\/ul>\n<\/ul>\n<\/ul>\n<\/div>\n<div class='toc-end'>&nbsp;<\/div>\n<span id=\"Installation\"><h2>Installation<\/h2><\/span>\n<p><a id=\"Partitions\" name=\"Partitions\"><\/a><\/p>\n<span id=\"Partitions\"><h3>Partitions<\/h3><\/span>\n<p>Partitions und Gr\u00c3\u00b6ssen dokumentieren!\/ genug gross (zB 40 GB)<\/p>\n<p>\/swap genug gross (zB 2 GB, mindestens 2x Console Memory)<\/p>\n<p>\/boot genug gross (zB 200 MB, mindestens 150 MBytes f\u00c3\u00bcr ESX 3)Rest f\u00c3\u00bcr VM (vmfs)<\/p>\n<p><a id=\"Konfiguration\" name=\"Konfiguration\"><\/a><\/p>\n<span id=\"Konfiguration\"><h2>Konfiguration<\/h2><\/span>\n<p><a id=\"MUI\" name=\"MUI\"><\/a><\/p>\n<span id=\"MUI\"><h3>MUI<\/h3><\/span>\n<p>Aufruf mit Browser: <a title=\"http:\/\/server\" href=\"http:\/\/server\/\" rel=\"nofollow\">http:\/\/server<\/a>. Anmeldung als Root f\u00c3\u00bcr ESX Systemadministration, als vmadmin f\u00c3\u00bcr Erstellen und Modifizieren von VMs, als vmuser f\u00c3\u00bcr Betrieb.In MUI Swapfile gleich gross wie physikalisches Memory erstellen.Virtuelle Switches definieren.Alias &#8220;vmlocal&#8221; f\u00c3\u00bcr vmfs Partition erstellenvmadmin Benutzer erstellen, Homedirectory auf \/home\/vmware setzen, (Erstellen und \u00c3\u201endern von VMs)<\/p>\n<p>vmuser Benutzer erstellen, Homedirectory auf \/home\/vmware setzen (Remote Console, Power on\/off) vmuser in vmadmin Gruppe aufnehmen<\/p>\n<p>&nbsp;<\/p>\n<p><a id=\"Console\" name=\"Console\"><\/a><\/p>\n<span id=\"Console\"><h3>Console<\/h3><\/span>\n<p>Auf WS puTTY und WinSCP installieren.<\/p>\n<p>In Console<\/p>\n<pre>chown -R vmadmin:vmadmin \/home\/vmware\"<\/pre>\n<p>VMs als Benutzer vmadmin erstellen, .vmdk muss vmadmin als Owner habenVMs als Benutzer vmuser verwenden\/vmimages erstellen,<\/p>\n<pre>chown -R vmadmin:vmadmin \/vmimages<\/pre>\n<p>Hier werden ISO Images etc. gespeichert (als Benutzer vmadmin anmelden)<\/p>\n<pre>alias l='ls -lahG'<\/pre>\n<p>in \/root\/.bashrc einf\u00c3\u00bcgen<\/p>\n<pre>alias l='ls -lahG'<\/pre>\n<p>in \/home\/vmware\/.bashrc einf\u00c3\u00bcgen<\/p>\n<p><a id=\"Zeitsynchronisation\" name=\"Zeitsynchronisation\"><\/a><\/p>\n<span id=\"Zeitsynchronisation\"><h2>Zeitsynchronisation<\/h2><\/span>\n<p><a id=\"Zeitzone_einstellen\" name=\"Zeitzone_einstellen\"><\/a><\/p>\n<span id=\"Zeitzone_einstellen\"><h3>Zeitzone einstellen<\/h3><\/span>\n<pre>ln -sf \/usr\/share\/zoneinfo\/Europe\/Zurich \/etc\/localtime<\/pre>\n<p><a id=\"Zeit_via_NTP_synchronisieren\" name=\"Zeit_via_NTP_synchronisieren\"><\/a><\/p>\n<span id=\"Zeit_via_NTP_synchronisieren\"><h3>Zeit via NTP synchronisieren<\/h3><\/span>\n<p><strong>1.)<\/strong> Log on to the console as the root user.<\/p>\n<p><strong>2.)<\/strong> Edit the file \/etc\/ntp.conf<\/p>\n<p>The comments in ntp.conf explain the purpose of each section. Find the section titled<\/p>\n<pre># --- OUR TIMESERVERS -----<\/pre>\n<ul>\n<li>Copy the existing restrict and server example lines:<\/li>\n<\/ul>\n<pre># restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery\r\n# server mytrustedtimeserverip<\/pre>\n<ul>\n<li>Remove the # character from the two newly copied lines so they are no longer treated as comments.<\/li>\n<\/ul>\n<ul>\n<li>Update both the new lines with the host name of the NTP server. Repeat this section to add more time servers, if needed.<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> There must be both a restrict and a server line in this section for each NTP server.<\/p>\n<p><strong>1.)<\/strong> Save the file.<\/p>\n<p><strong>2.)<\/strong> Edit the file \/etc\/ntp\/step-tickers. In this file, list the host name of the NTP servers entered above.<\/p>\n<p><strong>3.)<\/strong> To see the offset (in seconds) between the local clock and the source clock, run:<\/p>\n<pre>ntpdate -q time_server_name_or_ip_address<\/pre>\n<p><strong>Note:<\/strong> If the correction resulting from synchronizing the local clock with the time server is large enough, it could affect the operating systems or applications running in virtual machines when they synchronize their clocks with the ESX Server they are running on.<\/p>\n<p><strong>4.)<\/strong> To enable the ntp daemon to autostart when the server is rebooted, run:<\/p>\n<pre>chkconfig --level 345 ntpd on<\/pre>\n<p><strong>5.)<\/strong> To (re)start it now without rebooting, run:<\/p>\n<pre>service ntpd restart<\/pre>\n<p><strong>6.)<\/strong> To set the local hardware clock to the NTP synchronized local system time, run:<\/p>\n<pre>hwclock --systohc<\/pre>\n<p><strong>7.)<\/strong> To watch the status of the ntpd process, run:<\/p>\n<pre>watch ntpq -p<\/pre>\n<p>Press Ctrl-c to stop watching the process. Note the information in the following columns:<\/p>\n<ul>\n<li>The character in the first column indicates the quality of the source. * indicates the source is the current reference.<\/li>\n<li>remote lists the IP address or host name of the source.<\/li>\n<li>when indicates how many seconds have passed since the source was polled.<\/li>\n<li>poll indicates the polling interval. This value increases depending on the accuracy of the local clock.<\/li>\n<li>reach is an octal number that indicates reachability of the source. A value of 377 indicates the source has answered the last eight consecutive polls.<\/li>\n<li>offset is the time difference between the source and the local clock in milliseconds. polls.<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> As ntpd successfully polls NTP servers, the kernel automatically sets the hardware clock to the system clock time periodically. Run man hwclock. See the section &#8220;Automatic Hardware Clock Synchronization By the Kernel&#8221; for more information.<\/p>\n<p><a id=\"Zeitsynchronisation_in_VM\" name=\"Zeitsynchronisation_in_VM\"><\/a><\/p>\n<span id=\"Zeitsynchronisation_in_VM\"><h3>Zeitsynchronisation in VM<\/h3><\/span>\n<p>VMware Tools (ESX Version) komplett installieren.Windows Time Service (w32time) deaktivieren und stoppen. Zeitsynchronisation in VMware Tools ankreuzen. Zeitsynchronisation soll ausschliesslich \u00c3\u00bcber VMware Tools erfolgen.<\/p>\n<p><a id=\"VMware_Usage_Counters\" name=\"VMware_Usage_Counters\"><\/a><\/p>\n<span id=\"VMware_Usage_Counters\"><h2>VMware Usage Counters<\/h2><\/span>\n<p>Installieren: &#8220;vmkusagectl install&#8221;Anschauen: &#8220;<a title=\"http:\/\/\" href=\"http:\/\/\/\" rel=\"nofollow\">http:\/\/<\/a>&lt;server&gt;\/vmkusage&#8221;<\/p>\n<p><a id=\"Backup_der_Konfiguration\" name=\"Backup_der_Konfiguration\"><\/a><\/p>\n<span id=\"Backup_der_Konfiguration\"><h2>Backup der Konfiguration<\/h2><\/span>\n<p>vm-support laufen lassen, Resultatfile sichern (zB mit WinSCP)<\/p>\n<p><a id=\"Hardware.C3.A4nderungen\" name=\"Hardware.C3.A4nderungen\"><\/a><\/p>\n<span id=\"Hardwarenderungen\"><h2>Hardware\u00c3\u00a4nderungen<\/h2><\/span>\n<p>PCI Karten ge\u00c3\u00a4ndert: &#8220;vmkpcicheck&#8221;, danach Reboot. PCI Slot wechseln gilt als HW-\u00c3\u201enderung!<\/p>\n<p>VM Konfiguration (Ethernet, SCSI, Memory etc.): &#8220;vmkpcidiy -i&#8221;, danach Reboot<\/p>\n<p><a id=\"VM_kopieren\" name=\"VM_kopieren\"><\/a><\/p>\n<span id=\"VM_kopieren\"><h2>VM kopieren<\/h2><\/span>\n<p>Imports und Exports von .vmdk Files (mit Konversion) von\/zu vmfs2 Partitions sind nur als root User m\u00c3\u00b6glich. Daher Owner und Group nach dem Transfer anpassen (auf vmadmin setzen).<\/p>\n<ul>\n<li>In MUI mit &#8220;Manage Files&#8221; k\u00c3\u00b6nnen .vmdk von vmfs2 Partitions nach ext3 Partitions und umgekehrt kopiert werden. Dabei werden sie automatisch nach\/von Exportformat (2 GByte Files ohne leere Bl\u00c3\u00b6cke) konvertiert.<\/li>\n<\/ul>\n<ul>\n<li>Mit dem Commandline Tool &#8220;vmkfstools&#8221; k\u00c3\u00b6nnen .vmdk ebenfalls konvertiert werden (import und export Funktionen).<\/li>\n<\/ul>\n<ul>\n<li>vmkfstools -e destfile sourcefile, z.B.<\/li>\n<\/ul>\n<pre>vmkfstools -e \/mnt\/smb\/server-c.vmdk \/vmfs\/vmlocal\/server-c.vmdk<\/pre>\n<ul>\n<li>vmkfstools -i sourcefile destfile z.B.<\/li>\n<\/ul>\n<pre>vmkfstools -i \/mnt\/smb\/server-c.vmdk \/vmfs\/vmlocal\/server-c.vmdk<\/pre>\n<ul>\n<li>Transfer zwischen Windows Systemen und ext3 Partitions z.B. mit SFTP (WinSCP, keine 2 GByte Limite aber relativ langsam).<\/li>\n<\/ul>\n<ul>\n<li>Mount von Windows Shares in ESX Console mit &#8220;smbmount&#8221; (Samba). Limite f\u00c3\u00bcr Filegr\u00c3\u00b6sse bei 2 GBytes!<\/li>\n<\/ul>\n<ul>\n<li>Leeres Directory erstellen z.B.<\/li>\n<\/ul>\n<pre>mkdir \/mnt\/smb<\/pre>\n<ul>\n<li>Mounten des remote Laufwerks z.B.<\/li>\n<\/ul>\n<pre>smbmount \/\/server\/share \/mnt\/smb -o username=user,workgroup=domain,password=pw<\/pre>\n<ul>\n<li>Unmount mit<\/li>\n<\/ul>\n<pre>umount \/mnt\/smb<\/pre>\n<ul>\n<li>Kopieren von Files zwischen ESX Servern mit SFTP aus Console oder via gemeinsames SAN LUN.<\/li>\n<\/ul>\n<p><a id=\"VM_aufsetzen\" name=\"VM_aufsetzen\"><\/a><\/p>\n<span id=\"VM_aufsetzen\"><h2>VM aufsetzen<\/h2><\/span>\n<ul>\n<li>Typischerweise ein .vmdk pro Windows Drive (d.h. server-c.vmdk, server-d.vmdk).<\/li>\n<li>VM ab CD ISO Image aufsetzen und vorbereiten (Support Tools, Resource Kit, Windows Commander, Windows Time Service abstellen, VM Tools installieren und Zeitsynchronisation ankreuzen, Windows Einstellungen, Virenscanner, PC-Duo etc.). VM noch nicht in Domain aufnehmen sondern in Workgroup.<\/li>\n<li>Falls nicht schon geschehen: vmxnet Ethernet Adapter statt vlance w\u00c3\u00a4hlen (effizienter). IP Adresse via DHCP.<\/li>\n<li>Falls gew\u00c3\u00bcnscht, VM beim Start von ESX automatisch starten lassen (Einstellen in MUI).<\/li>\n<\/ul>\n<p><a id=\"8.1_____Templates\" name=\"8.1_____Templates\"><\/a><\/p>\n<span id=\"Templates\"><h3>Templates<\/h3><\/span>\n<ul>\n<li>Sysprep in VM laufen lassen (zu finden zB auf Win2003 CD in \\SUPPORT\\TOOLS\\DEPLOY.CAB)\u00c2\u00b7 VM abstellen<\/li>\n<li>.vmdk File nach \/vmimages oder gemeinsames SAN LUN exportieren und &#8220;TMPL&#8221; vor den Namen stellen.<\/li>\n<li>.vmdk File von \/vmimages oder gemeinsamem SAN LUN importieren und umbenennen.<\/li>\n<li>VM erstellen und bestehendes .vmdk anh\u00c3\u00a4ngen.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Installation Partitions Partitions und Gr\u00c3\u00b6ssen dokumentieren!\/ genug gross (zB 40 GB) \/swap genug gross (zB 2 GB, mindestens 2x Console Memory) \/boot genug gross (zB 200 MB, mindestens 150 MBytes f\u00c3\u00bcr ESX 3)Rest f\u00c3\u00bcr VM (vmfs) Konfiguration MUI Aufruf mit &hellip; <a href=\"https:\/\/thebc.ch\/blog\/?p=242\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,17],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-software","category-vmware"],"_links":{"self":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=242"}],"version-history":[{"count":10,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/242\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/242\/revisions\/246"}],"wp:attachment":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}