Could large ram slow Windows guest VM boot time?

Thank you!!! @hexxotest
Following your suggestion with a little tweak, I finally got my 10 cores/64G Ram Windows10 VM boots up, from pressing RUN button in virt manager till I saw windows login session, within one minute.
The only downside is my machine took 5 hours to compile kernel, so I probably won’t do any kernel update unless it’s absolutely necessary, although not updating frequently on Archlinux makes me feel a bit weird.
My host environment is probably not very clean, compilation failed all the time saying something related to openssl or libcrypto. So I compiled it in chroot following this link .
Following are what I did, this works on my intel E5-2683v3 machine running archlinux as host. If you are using two nvidia card, you will need to use nvidia-drm for your custom kernel in order to use your primary nvidia card. check out this link for nvidia-drm

#grab ready to build source code from archlinux AUR
mkdir ~/linux-build
cd ~/linux-build
yay -G linux-vfio
#this will clone source code to linux-vifo sub folder, so PKGBUILD is in $HOME/linux-build/linux-vifo 

#Change config and PKGBUILD
#PKGBUILD
# line 33 -> replace 2nd sha256sums with 'SKIP'
# or create and replace with a new checksum

#config
# add  CONFIG_PREEMPT_VOLUNTARY=y
# comment out  #CONFIG_PREEMPT=y

#create a clean and up-to-date env for build
mkdir ~/chroot
CHROOT=$HOME/chroot
mkarchroot $CHROOT/root base-devel
arch-nspawn $CHROOT/root pacman -Syu

#edit either ~/.makepkg.conf or $CHROOT/root/etc/makepkg.conf
# find and uncomment MAKEFLAGS in ARCHITECTURE, COMPILE FLAGS Section, 
# and find COMPRESSZST in COMPRESSION DEFAULTS Section, change following to use as many thread as possible to compile 
#
# MAKEFLAGS="-j$(nproc)"
# COMPRESSZST=(zstd -c -z -q - --threads=0)


#make sure you are in $HOME/linux-build/linux-vifo
#start compiling
makechrootpkg -c -r $CHROOT

#after successful compilation
makepkg -i

# now you should have a custom kernel in boot
# use this kernel, apply everything you did before for GPU passthrough, now windows vm should boots in reasonable time.
ls /boot | grep vmlinuz-linux-vfio

From my experience compiling the Kernel only takes 5 hours if you do it without multithreading. I have 12 cores but also I can compile a kernel in 15 minutes. So with 4 Cores you should be done in an hour, not in 5!
Look if you can add a parameter for a certain amount of threads to your compile command!

1 Like

thanks for the tip,
I add -j$(nproc) to MAKEFLAGS, now it only took 30 mins to compile.

1 Like

Glad I could help ! :slight_smile:

Thank you for the MAKEFLAGS tip, now I’ll also be able to update my kernel too !

1 Like

Just post this to remind anyone still recompiling after every kernel update. There is no need to recompile kernel with CONFIG_PREEMPT_VOLUNTARY=y .
I have no idea when this problem was resolved. But I can assign large amount of ram to vm, the lts kernel, 5.15.74-1-lts, comes with archlinux works perfectly. My Windows VM boots up just fine with 80G ram.