VMware

Aus MeinWiki
Wechseln zu: Navigation, Suche

ESXi / vSphere

Troubleshooting

Virtuelle Maschine von der Console des ESXi Host stoppen

  • Registrierte VM anzeigen.
vim-cmd vmsvc/getallvms
  • Status der VM anzeigen.
vim-cmd vmsvc/power.getstate VMID
  • VM herunterfahren.
vim-cmd vmsvc/power.shutdown VMID
  • VM ausschalten.
vim-cmd vmsvc/power.off VMID
  • Alternativ
esxcli vm process list
esxcli vm process kill --type= [soft,hard,force] --world-id= WorldNumber
ps | grep vmx
kill ProcessID

Fehler beim Anmelden am WEB-Client

  • Account vom User root zurücksetzen.
 pam_tally2 --user root --reset

LUN Zuordnung ESXI Host

Konsole

esxcli storage core path list | grep -C 5 L206

Client

esxcli --server "host" storage core path list | grep -C 5 L83

Copy VM from ESXi 4.1 to ESX 6.5

  • Fehler beim Aufbau der SSH Verbindung (no matching algo kex lost connection )
KexAlgorithms diffie-hellman-group1-sha1

Configuring a persistent scratch location using the vSphere Client

You can configure persistent scratch space for ESXi using the vSphere Client:

  1. Connect to vCenter Server or the ESXi host using the vSphere Client.
  2. Select the ESXi host in the inventory.
  3. Click the Configuration tab.
  4. Click Storage.
  5. Right-click a datastore and select Browse.
  6. Create a uniquely-named directory for this ESX host (for example, .locker-ESXHostname)
  7. Close the Datastore Browser.
  8. Click Advanced Settings under Software.
  9. Select the ScratchConfig section.
  10. Change the ScratchConfig.ConfiguredScratchLocation configuration option, specifying the full path to the directory.
  11. Click OK.

Put the ESXi host in maintenance mode and reboot for the configuration change to take effect.

   For example:
   /vmfs/volumes/DatastoreName(uid)/.locker-ESXHostname

Mount CDROM (ESXi)

  1. esxcfg-mpath –l
  2. Load the iso9660 module with this command: vmkload_mod iso9660
  3. Mount the CDROM using the device determined earlier with
   esxcfg-mpath -l:/sbin/vsish -e set /vmkModules/iso9660/mount mpx.vmhba32:C0:T0:L0

The CDROM will be mounted under /vmfs/volumes/ [CDROM Label] /

Disk klonen

Path auflisten

  • Identifier ermitteln
esxcfg-mpath --server Servername -L | grep L49
  • VMDK Datenspeicher
esxcli --server Servername storage vmfs extent list
esxcli --server Servername storage filesystem list

VMDK zu RDM

  • Zielverknüpfung wird beim klonen erstellt!
vmkfstools --server Servername -i /vmfs/volumes/55b0d02a-18461213-e661-b8ac6f83a070/.../...vmdk -d rdm:/vmfs/devices/disks/naa.600a098038303552683f476939355035 /vmfs/volumes/n02_vmfs5_vmwareconfig_n2/.../....vmdk

Treiberpaket installieren ESXi4.1

  • SSH aktiviern.
  • Treiberpaket mit WinScp Lokal zur Verfügung stellen.
   esxupdate -b ....vib update

Dumpfile vom Datastore verschieben

  • Aktuelle Konfiguration ansehen.
    esxcli --server="Servername" system coredump file list
    Path                                                                                                     Active  Configured       Size
    -------------------------------------------------------------------------------------------------------  ------  ----------  ---------
    /vmfs/volumes/4f02cf6a-5f688578-9659-001aa0c05815/vmkdump/4C4C4544-0031-4310-804D-B9C04F543032.dumpfile   false       false  556793856
    /vmfs/volumes/4f02cf6a-5f688578-9659-001aa0c05815/vmkdump/4C4C4544-005A-4210-804D-CAC04F543032.dumpfile   false       false  556793856
    /vmfs/volumes/4f02d0d4-cf5fa1e5-8740-001aa0c05815/vmkdump/4C4C4544-0054-3310-8054-CAC04F42354A.dumpfile   false       false  552599552
    /vmfs/volumes/4f0d3c58-d333831b-2300-b8ac6f83a070/vmkdump/4C4C4544-004C-5310-804A-B9C04F39354A.dumpfile    true        true  552599552
    /vmfs/volumes/4f0d3c58-d333831b-2300-b8ac6f83a070/vmkdump/4C4C4544-005A-4210-804D-CAC04F543032.dumpfile   false       false  556793856
    /vmfs/volumes/52e12e61-ee80218c-830e-00237dde6e74/vmkdump/4C4C4544-0031-4310-804D-CAC04F543032.dumpfile   false       false  556793856
    /vmfs/volumes/52e12eb7-28781c0c-928a-00237dde6e74/vmkdump/4C4C4544-004C-5310-804A-B8C04F39354A.dumpfile   false       false  552599552
    /vmfs/volumes/53a00284-78ae425f-79be-0026b986caf4/vmkdump/4C4C4544-0030-4310-804D-C8C04F543032.dumpfile   false       false  556793856
    esxcli --server="Servername" system coredump file get
    Active: /vmfs/volumes/4f0d3c58-d333831b-2300-b8ac6f83a070/vmkdump/4C4C4544-004C-5310-804A-B9C04F39354A.dumpfile
    Configured: /vmfs/volumes/4f0d3c58-d333831b-2300-b8ac6f83a070/vmkdump/4C4C4544-004C-5310-804A-B9C04F39354A.dumpfile
  • Neues Dumpfile erstellen. (Datastorename)
    esxcli --server="Servername" system coredump file add -d "Datastorename"
  • Dumpfilekonfiguraton löschen.
    esxcli --server="Servernsme" system coredump file set -u
  • Dumpfilekonfiguration erstellen.
    esxcli --server="Servername" system coredump file set -p /vmfs/volumes/4f02cf6a-5f688578-9659-001aa0c05815/vmkdump/4C4C4544-004C-5310-804A-B9C04F39354A.dumpfile

Virtual Center

Zertifikat

  • Zertifikat werden mit folgenden Programm ausgetauscht.
  /usr/lib/vmware-vmca/bin/certificate-manager
  • Punkt 1 auswählen und request erstelle.
Then specify the following options:
   Output directory path: path where will be generated the private key and the request
   Country: your country in two letters
   Name: The FQDN of your vCSA
   Organization: an organization name
   OrgUnit: type the name of your unit
   State: country name
   Locality: your city
   IPAddess: provide the vCSA IP address
   Email: provide your E-mail address
   Hostname: the FQDN of your vCSA
   VMCA Name: the FQDN where is located your VMCA. Usually the vCSA FQDN
  • Für den Import Punkt 1 / Anmelden / Punkt 2 auswählen.
1. signiertes Zertifikat(.cer) angeben.
2. Key File angeben
3. Root/Sub Zertifikat. Bei einer Sub-Ca dass Root- und Sub-Zertifikat einzel exportieren (.cer) und mit cat zusammenfügen

Reset Root-Password

  • Grub-Loader mit der Leertaste unterbrechen
  • Editieren mit e
  • Eintrag hinzufügen
rw init=/bin/bash
  • Booten und Password zurücksetzen.

VMwareplayer

Ubuntu Vmware Player recompilieren

Nach dem Einspielen von Sicherheitsupdates (Kernel) auf dem Hostbetriebsystem stehen keine Netzwerkverbindungen beim VMwareplayer zur Verfügung. Dazu mus das Kernelmodul neu eingebunden werden.

    vmware-modconfig --console --install-all

VMwaretools

Version

vmware-toolbox-cmd -v