Inthis post, I will show you how to disable side channel mitigations for VMware virtual machines. You can turn off the side channel mitigations for a VM using VMware Fusion or VMware Workstation software.
As per VMware, the Virtual Machines that have side channel mitigations enabled while running on Fusion on macOS 11.0 or later or on Workstation on Windows hosts with virtualization based security enabled may run slowly.
Virtual Machines with side channel mitigations enabled may exhibit performance degradation. If you want to improve the performance of the VM, VMware advises you to disable the side-channel mitigations. When you power on the VM, you will see a message box with following details.
You are running this virtual machine with side channel mitigations enabled. Side channel mitigations provide enhanced security but also lower performance. To disable mitigations, change the side channel mitigations setting in the advanced panel of the virtual machine settings. Refer to VMware KB article 79832 for more details.
Although the above issue will not prevent you from using the virtual machine, you must look to disable the side channel mitigations to ensure the VM runs smoothly. The above message appears when you power on the VM and occurs with latest version of VMware Workstation.
I am quoting this from VMware, the root cause of the performance degradation is most likely due to mitigations for side channel attacks such as Spectre and Meltdown. Side channel attacks allow unauthorized read access by malicious processes or virtual machines to the contents of protected kernel or host memory.
CPU vendors have introduced several features to protect data against this class of attacks such as indirect branch prediction barriers, single thread indirect branch predictor mode, indirect branch restricted speculation mode and L1 data cache flushing. While these features are effective at preventing side channel attacks, they can cause noticeable performance degradation in some cases.
Br a WSL 2 teleptshez nincs szksg Hyper-V -re, mint a Docker Desktophoz, de a VirtualMachinePlatform engedlyezse is befolysolja a tbbi virtualizl szoftver műkdst, mint a VirtualBox vagy a VMWare Workstation. VirtualBox esetn pldul le kellhet tiltani a VT-x/AMD-V opcit, vagy a kvetkező zenet fogadhat:
You are running this virtual machine with side channel mitigations enabled. Side channel mitigations provide enhanced security but also lower performance.
To disable mitigations, change the side channel mitigations setting in the advanced panel of the virtual machine settings. Refer to VMWare KB article 79832 at for more details.
/featurename: Ezutn rgtn egy kettőspont jn s az engedlyezendő feature neve. Itt most el kell hinni a Microsoftnak, hogy ez a neve. Ha viszont szeretnd kilistzni PowerShellben, milyen feature-k vannak, azt a dism.exe /online /get-features utastssal teheted meg.
A msodik lps rgtn a WSL frisstse a 2-es verzira. Mg az alaprtelmezett 1-es verzi nem indt virtulis gpet s ezzel korltozottabban hasznlhat, addig a WSL 2-ben akr a Docker service is futtathat. Ehhez viszont engedlyezni kell mg egy feature-t, a virtulis gp platformot. Rszletek a dokumentciban.
Ha elfelejtetted jraindtani a gpet, akkor egy hibazenetet fogsz kapni, ami arra figyelmeztet, hogy a program csak olyan gpen futtathat, amin van teleptve WSL. A program indtsa utn pedig az albbi ablak jelenik meg a "Welcome to the Windows Subsystem for Linux Update Setup Wizard" cmmel.
Itt a "Finish" -re kattintasz s mr ksz is. Ahhoz, hogy alaprtelmezetten 2-es verzival induljanak a gpek, le kellene futtatni a wsl --set-default-version 2 parancsot, de hogy megmutassam, hogyan lehet utlag is upgrade-elni, ezt n most nem teszem meg.
Itt az "Open Microsoft Store"-ra kellene kattintani, de nekem csak egy hibazenetet jelent meg, mi szerint "hiba trtnt" s prbljam ksőbb. Az URL detektvet hasznlva lenyomozhat, hogy a megadott cm a kvetkező cmre dobna: ms-windows-store://collection/?CollectionId=LinuxDistros. m ilyen Collection mr gy tűnik, nem ltezik, de az ruhzat megnyitva a keresővel a "Linux" kifejezsre keresve meg lehet tallni a lehetősgeket. Az Ubuntu 20.04 LTS teleptshez kattints a kvetkező linkre: Ubuntu 20.04 WSL disztribci. Ezutn mr csak le kell tlteni s telepteni a vlasztott disztribcit. Ha mr korbban letlttted, akkor csak az "Install" vagy "Telepts" gomb fog megjelenni. A teleptsre kattintva pedig az "Installing, this may take a few minutes..." zenet fogad, majd a felhasznlnv s jelsz bekrsvel folytatja, ahol a jelszt ktszer is meg kell adni.
A helyzet az, hogy alaprtelmezetten nem WSL 2-vel teleplnek a disztribcik, vagyis ahhoz, hogy Dockert is lehessen benne futtatni, frissteni kell. A C:\Users\\AppData\Local\Packages mappban lehet megtallni a teleptett Linuxokat is tbbek kztt. Nlam az Ubuntu 20.04 mappja gy nz ki: CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc. A vgn levő hash klnbző lehet. Ezen bell a "LocalState" mappa tartalmazza a rendszerfjlokat az aktulis llapotrl, amiben a "rootfs" mappa a Linux fjljait. Ebből is ltszik, hogy ez mg a WSL1-es verzi, mivel a WSL 2-ben egy "vdx" kiterjesztsű lemezkpfjl fogja tartalmazni a teljes Linux fjlrendszert.
Itt a "--set-version" utn a disztribci nevt kell rni, majd a verziszmot, ami jelen esetben a "2"-es. Ha mg meg van nyitva az ruhzbl telepts utn megnyitott ablak, lthatod, hogy a frissts miatt lelltotta a rendszert, gy egy billentyűletssel vagy csak a bezrs ikonra kattintva nyugodtan be lehet zrni az ablakot.
Most mr kszenllunk a Docker teleptsre, amit a Docker dokumentcijbl lehet folytatni. Mivel nekem nyilvn most nincs fent semmilyen előző Docker verzi, az erre utal rszeket tugorva a Dockert tartalmaz Ubuntu csomagtrol konfigurlshoz szksges csomagokat kell feltennem:
Lnyeges, hogy mindig rdemes konkrt Docker verzit telepteni s megtiltani az automatikus frisstst jabb verzikra. A klnbző verzik kztt ugyanis olyan vltozsok lehetnek, amik ha nem figyelsz, az adataid elvesztshez vezethetnek. Br WSL-ben les krnyezetet nem fogsz zemeltetni valsznűleg, azrt a meglepetseket itt is j elkerlni. Az albbi paranccsal mindenkpp listzd ki az elrhető verzikat:
Kt helyen is meg kellett adni a verzit, ugyanis kln telepl a docker dmon s a kliens, amiknek nem ktelező egy gpen lennik. Most viszont mg le is kell tiltani a frisstst a docker-ce s docker-ce-cli csomagoknak:
Van viszont egy problma. WSL-ben fut Linuxon nincs a hagyomnyos Ubuntu rendszereken megszokott init process. Nem rhető el a systemd, vagyis a Docker dmon nem fog elindulni magtl automatikusan, amikor elindul a Linux. Amikor viszont szksged van r, manulisan elindthatod az albbi utastssal:
Ha nem akarod mindig a sudo-t a parancsok el rni, sudo su paranccsal lpj t a "root" felhasznlba, vagy add hozz a felhasznldat a "docker" csoporthoz az albbi utastssal, ahol a helyett a sajt felhasznlnevedet rd:
Ha kilpsz, a legkzelebbi belps utn mr nem kell sudo-t hasznlni, viszont les rendszeren fontos tudni, hogy ezzel az adott felhasznl teljes adminisztrtori jogosultsgot kap gyakorlatilag s mg jelszt sem kell megadnia hozz, ezrt ennek tudatban lj a lehetősggel.
Side channel methods are techniques that may allow an attacker to gain information through observing the system, such as measuring microarchitectural properties about the system. To prevent this, CPU vendors such as Intel and AMD have developed techniques to mitigate systems' vulnerability to Side Channel attacks.
But, according to VMware article 79832 Virtual Machines that have side channel mitigations enabled while running on Fusion on Mac OS 11.0 or later or on Workstation on Windows hosts with virtualization based security enabled may run slowly.
We're looking for part-time or full-time technical writers to join our team! It's about a remote position that qualified tech writers from anywhere in the world can apply. Click here for more details.
3a8082e126