Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vmware:vsan:vsanlab [2020/02/03 08:51] – [vSAN Lab HW & SW] mschubivmware:vsan:vsanlab [2020/12/17 20:22] (current) – [PowerShell zur Vorbereitung von ESXi Lab] mschubi
Line 1: Line 1:
 ====== vSAN Lab HW & SW ====== ====== vSAN Lab HW & SW ======
 +===== Neuzugang ESXi ARM Fling =====
 +Endlich ist mein Raspi 4 mit 8GB RAM und einem 4" Display fertig und bootet mit dem ESXi für ARM Fling.
 +Zwei schnelle Samsung USB Sticks (128GB & 256GB) dienen als SSD Ersatz. Dank Advanced Parameter kann man diese auch für vSAN verwenden.
 +
 +Somit habe ich jetzt eine Witness für den NUC Cluster :-)
 +
 +{{ :vmware:vsan:esxi-arm-witness.jpg?400 |}}
 +
 +
 +<code bash>
 +/etc/init.d/usbarbitrator stop
 +chkconfig usbarbitrator off
 +
 +esxcli system settings advanced set -o /VSAN/AllowUsbDisks -i 1
 +esxcli system settings advanced set -o /Disk/AllowUsbClaimedAsSSD -i 1
 +
 +[root@witness-arm:~] vdq -q
 +[
 +   {
 +      "Name"     : "mpx.vmhba33:C0:T0:L0",
 +      "VSANUUID" : "",
 +      "State"    : "Eligible for use by VSAN",
 +      "Reason"   : "USB disk",
 +      "IsSSD"    : "0",
 +"IsCapacityFlash": "0",
 +      "IsPDL"    : "0",
 +      "Size(MB)" : "122376",
 +   "FormatType" : "512n",
 +   },
 +
 +   {
 +      "Name"     : "mpx.vmhba32:C0:T0:L0",
 +      "VSANUUID" : "",
 +      "State"    : "Ineligible for use by VSAN",
 +      "Reason"   : "Has partitions",
 +      "IsSSD"    : "0",
 +"IsCapacityFlash": "0",
 +      "IsPDL"    : "0",
 +      "Size(MB)" : "15296",
 +   "FormatType" : "512n",
 +   },
 +
 +   {
 +      "Name"     : "mpx.vmhba34:C0:T0:L0",
 +      "VSANUUID" : "",
 +      "State"    : "Eligible for use by VSAN",
 +      "Reason"   : "USB disk",
 +      "IsSSD"    : "0",
 +"IsCapacityFlash": "0",
 +      "IsPDL"    : "0",
 +      "Size(MB)" : "244752",
 +   "FormatType" : "512n",
 +   },
 +
 +]
 +
 +[root@witness-arm:~] esxcli storage nmp satp rule list --satp=VMW_SATP_LOCAL
 +Name            Device                Vendor  Model  Driver  Transport  Options     Rule Group  Claim Options  Default PSP  PSP Options  Description
 +--------------  --------------------  ------  -----  ------  ---------  ----------  ----------  -------------  -----------  -----------  -----------
 +VMW_SATP_LOCAL                                               usb                    system                                               USB Devices
 +VMW_SATP_LOCAL                                               ide                    system                                               IDE Devices
 +VMW_SATP_LOCAL                                               block                  system                                               RAID Block Devices
 +VMW_SATP_LOCAL                                               parallel               system                                               Parallel SCSI Devices
 +VMW_SATP_LOCAL                                               sas                    system                                               Serial Attached SCSI
 +                                                                                                                                         Devices
 +VMW_SATP_LOCAL                                               sata                   system                                               Serial ATA Devices
 +VMW_SATP_LOCAL                                               pcie                   system                                               PCIe Devices
 +VMW_SATP_LOCAL                                               unknown                system                                               Unknown Devices
 +VMW_SATP_LOCAL  mpx.vmhba33:C0:T0:L0                                    enable_ssd  user
 +VMW_SATP_LOCAL  mpx.vmhba34:C0:T0:L0                                    enable_ssd  user
 +
 +
 +[root@witness-arm:~] vdq -q
 +[
 +   {
 +      "Name"     : "mpx.vmhba33:C0:T0:L0",
 +      "VSANUUID" : "",
 +      "State"    : "Eligible for use by VSAN",
 +      "Reason"   : "USB disk",
 +      "IsSSD"    : "1",
 +"IsCapacityFlash": "0",
 +      "IsPDL"    : "0",
 +      "Size(MB)" : "122376",
 +   "FormatType" : "512n",
 +   },
 +
 +   {
 +      "Name"     : "mpx.vmhba32:C0:T0:L0",
 +      "VSANUUID" : "",
 +      "State"    : "Ineligible for use by VSAN",
 +      "Reason"   : "Has partitions",
 +      "IsSSD"    : "0",
 +"IsCapacityFlash": "0",
 +      "IsPDL"    : "0",
 +      "Size(MB)" : "15296",
 +   "FormatType" : "512n",
 +   },
 +
 +   {
 +      "Name"     : "mpx.vmhba34:C0:T0:L0",
 +      "VSANUUID" : "",
 +      "State"    : "Eligible for use by VSAN",
 +      "Reason"   : "USB disk",
 +      "IsSSD"    : "1",
 +"IsCapacityFlash": "0",
 +      "IsPDL"    : "0",
 +      "Size(MB)" : "244752",
 +   "FormatType" : "512n",
 +   },
 +
 +]
 +
 +</code>
 +
 +==== PowerShell zur Vorbereitung von ESXi Lab ====
 +
 +Einige Einstellungen zur Vorbereitung des Labs
 +<code powershell>
 +Connect-VIServer esx-arm-2.schubi.local
 +
 +Set-VMHostAdvancedConfiguration -Name "VSAN.AllowUsbDisks" -Value "1"
 +Set-VMHostAdvancedConfiguration -Name "Disk.AllowUsbClaimedAsSSD" -Value "1"
 +
 +Set-VMHostAdvancedConfiguration -Name "VSAN.SwapThickProvisionDisabled" -Value "1"
 +
 +</code>
 +
 +
 +===== NUC Lab =====
  
 {{:vmware:vsan:img_0459.jpg?nolink&400 |}} {{:vmware:vsan:img_0459.jpg?nolink&400 |}}
Line 8: Line 137:
 Bei mir hat es nur für 1GB gereicht... Bei mir hat es nur für 1GB gereicht...
  
-Um in der gesamten Infrastruktur DNS, DHCP u.s.w. zu haben, wird ein RaspberryPi eingesetzt. Der ist gleichzeitig WLAN Accesspoint, damit man einfach auf die Hosts etc. kommt. Gleichzeitig ist der RasPi auch WLAN Client, damit man einfach Pakete +Um in der gesamten Infrastruktur DNS, DHCP u.s.w. zu haben, wird ein RaspberryPi mit Raspian https://www.raspberrypi.org/downloads/raspbian/ eingesetzt. Der ist gleichzeitig WLAN Accesspoint, damit man einfach auf die Hosts etc. kommt. Gleichzeitig ist der RasPi auch WLAN Client, damit man einfach Pakete 
 aus dem Internet laden kann. aus dem Internet laden kann.
  
Line 37: Line 166:
 Dieser sollte neben Ethernet auch gleichzeitig ein WLAN Access Point und ein WLAN Client sein. Dieser sollte neben Ethernet auch gleichzeitig ein WLAN Access Point und ein WLAN Client sein.
 Hier eine Config von mir. eth0 und wlan0 sind die DNS/DHCP Netze. wlan0 ist Accesspoint. wlan1 (Edimax mini) ist WLAN Client. Hier eine Config von mir. eth0 und wlan0 sind die DNS/DHCP Netze. wlan0 ist Accesspoint. wlan1 (Edimax mini) ist WLAN Client.
 +
 +Hostname und ssh Key ändern
 +<code bash>
 +raspi-config
 +reboot
 +#/etc/hosts
 +127.0.0.1       localhost
 +192.168.10.1    rasp-dns.schubi.local   rasp-dns
 +#
 +rm /etc/ssh/ssh_host_*
 +dpkg-reconfigure openssh-server
 +service ssh restart
 +#/etc/ssh/sshd_config
 +PermitRootLogin yes
 +PasswordAuthentication yes
 +#
 +touch /boot/ssh
 +</code>
  
 Wir brauchen einige Pakete.... Wir brauchen einige Pakete....
Line 111: Line 258:
 </code> </code>
  
 +Falls hostapd.service nicht startet (//hostapd.service is masked//)
 +
 +<code bash>
 +systemctl unmask hostapd
 +systemctl enable hostapd
 +systemctl start hostapd
 +</code>
  
 In der bash Shell wird die Bridge gebaut In der bash Shell wird die Bridge gebaut
Line 144: Line 298:
 wpa-ssid "iPhone von Schubi" wpa-ssid "iPhone von Schubi"
 wpa-psk "XXXXXXX" wpa-psk "XXXXXXX"
 +wireless-power off
 +###check mit iw wlan1 get power_save
 +</code>
 +
 +<code bash>
 +post-up iw dev wlan0 set power_save off
 +post-up iw dev wlan1 set power_save off
 </code> </code>
  
Line 149: Line 310:
 Durch das //iptables-persistent// Paket wird dies sofort persistent. Durch das //iptables-persistent// Paket wird dies sofort persistent.
 <code bash> <code bash>
 +sysctl -w net.ipv4.ip_forward=1
 +sysctl -w net.ipv4.conf.all.rp_filter=0
 +sysctl -p
 +
 iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
-iptables -t nat -L+iptables -t nat -L -v -n 
 +iptables-save > /etc/iptables/rules.v4
 </code> </code>
  
Line 353: Line 519:
 hwclock -w hwclock -w
 </code> </code>
 +
 +===== Lighttpd als Info Server =====
 +
 +Nur für die Lab Umgebung eine kurze Info Seite.
 +
 +<code bash>
 +
 +apt-get install lighttpd
 +vi /etc/lighttpd/lighttpd.conf
 +->
 +server.modules = (
 +        "mod_indexfile",
 +        "mod_access",
 +        "mod_alias",
 +        "mod_fastcgi",
 +        "mod_redirect",
 +)
 +
 +server.document-root        = "/var/www/html"
 +server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
 +server.errorlog             = "/var/log/lighttpd/error.log"
 +server.pid-file             = "/var/run/lighttpd.pid"
 +server.username             = "www-data"
 +server.groupname            = "www-data"
 +server.port                 = 11111
 +....
 +
 +fastcgi.server = ( ".php" => ((
 +                    "bin-path" => "/usr/bin/php-cgi",
 +                    "socket" => "/tmp/php.sock"
 +                )))
 +
 +<-
 +service lightttpd start
 +service lighttpd status
 +
 +apt-get install php php-cgi
 +</code>
 +
 +===== Samba einrichten =====
 +
 +<code bash>
 +apt-get install samba
 +mv /etc/samba/smb.conf /etc/samba/smb.orig
 +vi /etc/samba/smb.conf
 +
 +->
 +
 +[global]
 +workgroup = workgroup
 +security = user
 +map to guest = Bad Password
 +
 +[homes]
 +comment = Home Directories
 +browsable = no
 +read only = no
 +create mode = 0750
 +
 +[public]
 +path = /var/www/html 
 +public = yes
 +writable = yes
 +comment = www share
 +printable = no
 +guest ok = yes
 +
 +<-
 +
 +systemctl restart smbd.service
 +systemctl status smbd.service
 +</code>
 +
 +<code cmd>
 +net use W: \\rasp-dns\public
 +</code>
 +
 +===== XRDP =====
 +
 +<code bash>
 +apt-get install xrdp
 +</code>
 +
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International