Die Foren-SW läuft ohne erkennbare Probleme. Sollte doch etwas nicht funktionieren, bitte gerne hier jederzeit melden und wir kümmern uns zeitnah darum. Danke!

ESXi + ZFS/OmniOS/napp-it All-IN-ONE VM

Moderatoren: irix, Dayworker

Member
Beiträge: 48
Registriert: 19.12.2010, 18:26

Re: ESXi + ZFS/OmniOS/napp-it All-IN-ONE VM

Beitragvon gea » 25.11.2022, 20:45

All-in-One (ESXi, inkl. free + virtualisierte ZFS SAN storage appliance): Autostart der VMs von NFS

Als ich die AiO Idee vor über 10 Jahren erstmals vorstellte, ging das noch einfach. Die Storage VM starten und mit einer Verzögerung die VMs auf NFS. Mit aktuellem ESXi geht das nicht mehr. ESXi scheint die Verfügbarkeit einer VM vor der Autostart Verzögerung zu überprüfen. NFS der Storage VM steht da noch nicht bereit.

Workaround:
- Anlegen einer leeren Dummy VM auf dem lokalen Datastore
- Autostart der OmniOS Storage VM
- Autostart der Dummy VM mit ausreichender Startverzögerung bis OmniOS NFS bereitstellt und ESXi das automatisch verzögert mountet.
- Autostart der anderen VMs auf NFS

Member
Beiträge: 48
Registriert: 19.12.2010, 18:26

Re: ESXi + ZFS/OmniOS/napp-it All-IN-ONE VM

Beitragvon gea » 19.02.2023, 02:18

Manage ESXi via SOAP ex create/delete ESXi Snaps

I came up with the idea of AiO (ESXi server with virtualized ZFS/NFS storage and VMs on NFS and pass-through storage hardware) around 2010. This was the first stable ZFS storage solution based on (Open)Solaris or a lightweight minimalistic OmniOS. Others copied the idea based on Free-BSD or Linux.

From the beginning ZFS snaps offered a huge advantage over ESXi snaps as they could be created/destroyed without delay and initial space consumption. Even thousands of snaps are possible while ESXi snaps are limited to a few shorttime ones. Combined with ZFS replication a high speed backup or copy/move of VMs is ultra easy. That said, there is a problem with ZFS snaps and VMs as the state of a ZFS snap is like a sudden powerloss. There is no guarantee that a VM in a ZFS snap is not corrupted.

In napp-it I included an ESXi hotsnap function to create a save ESXi snap prior the ZFS snap followed by a ESXi snap destroy. This includes an ESXi snap in every ZFS snap with hot memory state. After a VM restore from an ZFS snap you can go back to the safe ESXi snap. Works perfectly but handling is a little complicated as you need ssh access to access esxcli. Maybe you have asked yourself if there is no easier way and there is one vie the ESXi SOAP api similar to the ESXi web-ui.

Thomas just published a small interactive Perl script for easy ESXi web management via SOAP. It even works with ESXi free, see ESX / ESXi - Hilfethread

1. install (missing) Perl modules
perl -MCPAN -e shell
notest install Switch
notest install Net::SSLeay
notest install LWP
notest install LWP::protocol::https
notest install Data::Dumper
notest install YAML
exit;

complete list of needed modules:
Switch
LWP::UserAgent
HTTP::Request
HTTP::Cookies
Data:: Dumper
Term::ANSIColor
YAML
LIBSSL
Net::SSLeay
IO::Socket::SSL
IO::Socket::SSL::Utils
LWP::protocol::https


Howto:
Update napp-it to newest 23.dev where the script is included

example: list all datastores
perl /var/web-gui/data/napp-it/zfsos/_lib/scripts/soap/VMWare_SOAP.pl list_all_datastores --host 192.168.2.48 --user root --password 1234

Attached Datastores "63757dea-d2c65df0-3249-0025905dea0a"
Attached Datastores "192.168.2.203:/nvme/nfs"

example: list VMs:
perl /var/web-gui/data/napp-it/zfsos/_lib/scripts/soap/VMWare_SOAP.pl list_attached_vms --host 192.168.2.48 --user root --password 1234--mountpoint /nvme/nfs --mounthost 192.168.2.203

Attached VM ID "10" = "solaris11.4cbe"
Attached VM ID "11" = "w2019.125"
Attached VM ID "12" = "oi10.2022"
Attached VM ID "14" = "w11"
Attached VM ID "15" = "ventura"
Attached VM ID "16" = "danube"
Attached VM ID "9" = "omnios.dev.117"

example: create snap
perl /var/web-gui/data/napp-it/zfsos/_lib/scripts/soap/VMWare_SOAP.pl create_snapshot --host 192.168.2.48 --user root --password 1234--mountpoint /nvme/nfs --mounthost 192.168.2.203 --vm_id 9 --snapname latest --mem --no-quiesce --snapdesc latest


example: list (latest) snap
perl /var/web-gui/data/napp-it/zfsos/_lib/scripts/soap/VMWare_SOAP.pl list_snapshot --host 192.168.2.48 --user root --password 1234 --vm_id 9

I will use the script to work together with a normal autosnap job in a future napp-it. Up to then you can create a jobid.pre (ex 123456.pre) in /var/web-gui/_log/jobs/ with a script to create the ESXi snap and a jobid.post to destroy the ESXi snap after it was included in the ZFS snap.

update
Ich habe ein SOAP Menü ins neueste napp-it 23.dev eingebaut

soap.png

Member
Beiträge: 48
Registriert: 19.12.2010, 18:26

Re: ESXi + ZFS/OmniOS/napp-it All-IN-ONE VM

Beitragvon gea » 05.04.2023, 17:23

Neues Feature in napp-it 23.dev (Apr 05):
ZFS autosnaps und ZFS replication bei ESXi/NFS Dateisystemen mit ESXi hot memory snaps.

siehe
https://www.hardwareluxx.de/community/t ... t-29844733
https://www.napp-it.org/doc/downloads/napp-in-one.pdf
https://forums.servethehome.com/index.p ... ost-372432

Member
Beiträge: 48
Registriert: 19.12.2010, 18:26

Re: ESXi + ZFS/OmniOS/napp-it All-IN-ONE VM

Beitragvon gea » 13.04.2023, 13:02

Update:
Ich habe den bisherigen SSH Mechanismus um ESXi snaps (mit memstate oder quiesce) in ZFS Snaps zu integrieren so umgestellt dass er gleich funktioniert wie der soap Mechanismus. Man muss für SSH halt Keys erzeugen und den Public Key auf ESXi eintragen. Man hat damit aber remote Zugriff auf alle esxcli und vim-cmd Konsole Befehle.

zfs_esxi_snaps.png


Update:
Ein ready to use ESXi ZFS Server .ova template mit OmniOS 151046lts und napp-it.dev mit Perl modulen für TLS und SOAP gibts hier:
https://www.napp-it.org/downloads/napp-in-one.html

Member
Beiträge: 48
Registriert: 19.12.2010, 18:26

Re: ESXi + ZFS/OmniOS/napp-it All-IN-ONE VM

Beitragvon gea » 12.11.2023, 14:03

Echtes Data Tiering unter ZFS

ZFS ist für jede Art von Datenverarbeitung extrem gut geeignet. Man steht jedoch vor dem Dilemma dass man für manche Anwendungen schnellen, teuren SSD Storage möchte wärend für anderes langsame und günstige mechanische Platten ausreichend sind.

Eine Option um beides unter einen Hut zu bekommen sind Hybrid Pools und Data Tiering, entweder wie bei ZFS üblich aufgrund der physikalischen Datenstruktur (small io, Metadaten) oder gezielt aufgrund des Anwendugsfalls. Letzteres könnte man auch unter ZFS realisieren, dies wäre für Office Dokumente oder VM Storage sogar der bessere Ansatz, siehe Diskussussion unter https://www.hardwareluxx.de/community/t ... t-30157948


Zurück zu „VMs & Appliances“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 8 Gäste