Enable Nested KVM - Nested Visualization

SoldierZer0
First post
Posts: 1
Joined: Sun Jan 03, 2016 10:57 pm

Enable Nested KVM - Nested Visualization

Post by SoldierZer0 » Sun Jan 03, 2016 11:09 pm

Hiya,

I would like to run a Nested Hyper-visor in Visualization Station but unfortunately experiencing a errors.. after the normal googlings and some command line exploration into my Nas i found that;

/share/CACHEDEV1_DATA/.qpkg/.QKVM/config/config.conf
/KVM/kvm_qnap.conf

"cat /sys/module/kvm_intel/parameters/nested" N

With QNAP doing heavy customization to binaries I wanted to reach out and ask has anyone come across this in the past and overcome it?

lcasavola
New here
Posts: 2
Joined: Wed Jan 16, 2013 1:11 am

Re: Enable Nested KVM - Nested Visualization

Post by lcasavola » Tue Mar 08, 2016 6:42 pm

Hi ,
did you solve you issue and wer you able to set nested Kvm ?
Rgds
Luca

santiagax99
New here
Posts: 6
Joined: Fri Jun 03, 2016 2:54 am

Re: Enable Nested KVM - Nested Visualization

Post by santiagax99 » Sat Oct 08, 2016 3:32 pm

Hi,
you can enable nested virtualization in QNAP libvirt

There is a file that loads all needed modules
/KVM/modules/Insmod_ko.sh

So, you need to stop virtualization station from webui and ensure that kvm and kvm-intel modules are unloaded

Code: Select all

lsmod | grep kvm

must return nothing

then edit /KVM/modules/Insmod_ko.sh
and add needed options to insmod execution, as example

Code: Select all

/sbin/insmod ${KERNEL_MODULES}/kvm.ko ignore_msrs=1
/sbin/insmod ${KERNEL_MODULES}/kvm-intel.ko nested=y ept=y


After that start Virtualization Station and check that modules are loaded successfully with required options

Code: Select all

[~] # cat /sys/module/kvm/parameters/ignore_msrs
Y
[~] # cat /sys/module/kvm_intel/parameters/{nested,ept}
Y
Y


unlandm
New here
Posts: 3
Joined: Fri Oct 14, 2016 10:50 pm

Re: Enable Nested KVM - Nested Visualization

Post by unlandm » Sat Dec 31, 2016 7:38 pm

Need help to activate nested virtualisation for Virtualization Station 3 beta on QTS 4.3.2 beta.

The method described here is not functional anymore.

Regards
Michael

ddbyam
Starting out
Posts: 10
Joined: Sat Dec 31, 2016 2:22 am

Re: Enable Nested KVM - Nested Visualization

Post by ddbyam » Sat Jan 28, 2017 10:00 am

Did anyone get this working for VS 3?
I'm looking to do some nested VM's too

santiagax99
New here
Posts: 6
Joined: Fri Jun 03, 2016 2:54 am

Re: Enable Nested KVM - Nested Visualization

Post by santiagax99 » Mon Jul 24, 2017 4:30 am

For VS3:

Detect QKVM path:

Code: Select all

# /sbin/getcfg QKVM Install_Path -f /etc/config/qpkg.conf

/share/CACHEDEV4_DATA/.qpkg/QKVM


Edit load modules init script

Code: Select all

/share/CACHEDEV4_DATA/.qpkg/QKVM/usr/etc/qvsd.d/44-preload/01-module

Change:

Code: Select all

load_kvm()
{
    ___load_module kvm.ko ignore_msrs=1
    check_ret

    # load kvm module
    if [ $VMX_FEATURE -ne 0 ]; then
        ___load_module kvm-intel.ko
        check_ret
    elif [ $SVM_FEATURE -ne 0 ]; then
        ___load_module kvm-amd.ko nested=0
        check_ret
    elif [ $SVM_FEATURE -ne 0 ]; then
        elog "Platform not support KVM"
        exit 1
    fi
}

To:

Code: Select all

load_kvm()
{
    ___load_module kvm.ko ignore_msrs=1
    check_ret

    # load kvm module
    if [ $VMX_FEATURE -ne 0 ]; then
        ___load_module kvm-intel.ko nested=1
        check_ret
    elif [ $SVM_FEATURE -ne 0 ]; then
        ___load_module kvm-amd.ko nested=0
        check_ret
    elif [ $SVM_FEATURE -ne 0 ]; then
        elog "Platform not support KVM"
        exit 1
    fi
}



Save changes and reboot box. Check KVM modules parameters after reboot

Code: Select all

 # cat /sys/module/kvm/parameters/ignore_msrs
Y

Code: Select all

# cat /sys/module/kvm_intel/parameters/{nested,ept}
Y
Y

ccclapp
Starting out
Posts: 23
Joined: Thu Aug 03, 2017 1:51 am

Re: Enable Nested KVM - Nested Visualization

Post by ccclapp » Fri Aug 11, 2017 4:27 am

Does this enable nested hyper V? If not, is there a way to do that?

Thanks

ccclapp
Starting out
Posts: 23
Joined: Thu Aug 03, 2017 1:51 am

Re: Enable Nested KVM - Nested Visualization

Post by ccclapp » Wed Aug 16, 2017 2:32 am

Hi

What hypervisor are you using for this?

Thanks

tiscy
Starting out
Posts: 10
Joined: Thu Jun 11, 2009 6:49 pm

Re: Enable Nested KVM - Nested Visualization

Post by tiscy » Wed Dec 20, 2017 11:39 pm

Dear santiagax99,

many thanks for the guideline, at Sun Jul 23, 2017 9:30 pm "For VS3:"

I have followed your guideline and it works in my case.

I have a TVS-682 with QTS 4.3.3.0404 and VS 3.0.2836

I have installed VMware ESXI 6.5 in Virtualisation station, and have now running a 64bit Unix Image (which was not able to start before.

Many thanks
Tiscy

wmarsch
Getting the hang of things
Posts: 60
Joined: Fri Jul 12, 2013 4:50 am

Re: Enable Nested KVM - Nested Visualization

Post by wmarsch » Thu Jan 11, 2018 2:37 am

TVS-682 w QTS 4.3.4.0435 build 20171230
VS 3.0.2836

got an Error:

"Bitte VT-x-Funktion im BIOS aktivieren." - Actívate VT-x in BIOS

What is the difference between 4.3.3 and 4.3.4 in this case?

dolbyman
Guru
Posts: 14783
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Enable Nested KVM - Nested Visualization

Post by dolbyman » Thu Jan 11, 2018 2:59 am

did it work before ? (on 4.3.3 firmware)

if you can access the bios , direct keyboard and monitor needed, check if the option(VT-x) is disabled

wmarsch
Getting the hang of things
Posts: 60
Joined: Fri Jul 12, 2013 4:50 am

Re: Enable Nested KVM - Nested Visualization

Post by wmarsch » Thu Jan 11, 2018 3:11 am

No. I used the guideline, at Sun Jul 23, 2017 9:30 pm "For VS3:" and user "tiscy" got it on 4.3.3 working

Withoutthe parm "nested=1" in /share/CACHEDEV4_DATA/.qpkg/QKVM/usr/etc/qvsd.d/44-preload/01-module

VS starts normal

dolbyman
Guru
Posts: 14783
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Enable Nested KVM - Nested Visualization

Post by dolbyman » Thu Jan 11, 2018 3:14 am

check for VT-x option as stated

wmarsch
Getting the hang of things
Posts: 60
Joined: Fri Jul 12, 2013 4:50 am

Re: Enable Nested KVM - Nested Visualization

Post by wmarsch » Thu Jan 11, 2018 4:42 am

Re-Installed VS -- > VS work.
Edit 01-module again. reboot . bingo

Confirm works on 4.3.4 .

Thank u

unlandm
New here
Posts: 3
Joined: Fri Oct 14, 2016 10:50 pm

Re: Enable Nested KVM - Nested Visualization

Post by unlandm » Thu Jan 18, 2018 10:18 am

Hello wmarsch,

what did you change or insert in the 01-module file? Can't figure it out by myself...

Can you post the content of your working 01-module file here?

Thank You

Post Reply

Return to “Virtualization Station”