From 5928212dc8917dae410d93cce23ffe0f159f613d Mon Sep 17 00:00:00 2001 From: Jan Siwiec <jan.siwiec@vsb.cz> Date: Mon, 23 Sep 2024 10:43:45 +0200 Subject: [PATCH] Update virtualization.md --- docs.it4i/software/tools/virtualization.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs.it4i/software/tools/virtualization.md b/docs.it4i/software/tools/virtualization.md index df372328e..54bea23f1 100644 --- a/docs.it4i/software/tools/virtualization.md +++ b/docs.it4i/software/tools/virtualization.md @@ -1,6 +1,3 @@ -!!!warning - This page has not been updated yet. The page does not reflect the transition from PBS to Slurm. - # Virtualization <!-- @@ -163,7 +160,7 @@ Example job for the Windows virtual machine: ```bat #/bin/sh - JOB_DIR=/scratch/$USER/win/${PBS_JOBID} + JOB_DIR=/scratch/$USER/win/${$SLURM_JOBID} #Virtual machine settings VM_IMAGE=~/work/img/win.img @@ -177,7 +174,7 @@ Example job for the Windows virtual machine: ln -s ~/work/win/script/run/run-appl.bat run.bat # Run virtual machine - export TMPDIR=/lscratch/${PBS_JOBID} + export TMPDIR=/lscratch/${$SLURM_JOBID} module add qemu qemu-system-x86_64 -enable-kvm @@ -330,10 +327,10 @@ Both the user and the VDE network back-end have low performance. For fast interc Clusters provide the TAP device tap0 for your job. TAP interconnect does not provide any services (like NAT, DHCP, DNS, SMB, etc.) just raw networking, so you should provide your services if you need them. -To enable the TAP interconect feature, you need to specify the `virt_network=True` PBS resource at job submit. +To enable the TAP interconect feature, you need to specify the `virt_network:1` Slurm resource at job submit. ```console -$ qsub ... -l virt_network=True +$ salloc ... --gres=virt_network:1 ``` Run QEMU with TAP network back-end: @@ -408,7 +405,7 @@ A virtual machine can have more than one network interface controller and can us In snapshot mode, the image is not written, changes are written to a temporary file (and discarded after the virtual machine exits). **It is a strongly recommended mode for running your jobs.** Set the `TMPDIR` environment variable to a local scratch directory for temporary files placement: ```console -$ export TMPDIR=/lscratch/${PBS_JOBID} +$ export TMPDIR=/lscratch/${$SLURM_JOBID} $ qemu-system-x86_64 ... -snapshot ``` -- GitLab