How to enable VT in VM(Ubuntu22.04): Nested Virtualization.
I am running an ubuntu VM (instance 22.04) on Esxi 7.0 virtualized platform. I am trying to create Linux cloud images on this ubuntu VM by installing virt-manager .. Reference: https://kifarunix.com/create-and-upload-custom-linux-image-into-openstack/?e... But on my VM when I execute grep -iE 'vmx|svm' /proc/cpuinfo Returns 0 //means not CPU virtualization enabled ? modprobe: FATAL: Module l not found in directory /lib/modules/5.15.0-25-generic root@ubuntu-VM:/home/ubuntu# lscpu |grep Virtualization Virtualization type: full root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# grep -c '(vmx|svm)' /proc/cpuinfo 0 root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu# How can I enable the virtualization support on this VM ?? What to do for Nested Virtualization support in this Virtual Machine ? Any hints welcome. Thank you Krish
Hi, the docs [1] contain a couple of steps, have you tried those? # check current state cat /sys/module/kvm_intel/parameters/nested
Temporarily remove the KVM intel Kernel module, enable nested virtualization to be persistent across reboots and add the Kernel module back:
sudo rmmod kvm-intel sudo sh -c "echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf" sudo modprobe kvm-intel # verify cat /sys/module/kvm_intel/parameters/nested Y [1] https://docs.openstack.org/devstack/latest/guides/devstack-with-nested-kvm.h... Zitat von KK CHN <kkchn.in@gmail.com>:
I am running an ubuntu VM (instance 22.04) on Esxi 7.0 virtualized platform.
I am trying to create Linux cloud images on this ubuntu VM by installing virt-manager ..
Reference: https://kifarunix.com/create-and-upload-custom-linux-image-into-openstack/?e...
But on my VM when I execute
grep -iE 'vmx|svm' /proc/cpuinfo Returns 0 //means not CPU virtualization enabled ?
modprobe: FATAL: Module l not found in directory /lib/modules/5.15.0-25-generic root@ubuntu-VM:/home/ubuntu# lscpu |grep Virtualization Virtualization type: full
root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# grep -c '(vmx|svm)' /proc/cpuinfo
root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu#
How can I enable the virtualization support on this VM ?? What to do for Nested Virtualization support in this Virtual Machine ?
Any hints welcome.
Thank you Krish
On Tue, 2024-02-20 at 12:22 +0000, Eugen Block wrote:
Hi,
the docs [1] contain a couple of steps, have you tried those?
# check current state cat /sys/module/kvm_intel/parameters/nested
Temporarily remove the KVM intel Kernel module, enable nested virtualization to be persistent across reboots and add the Kernel module back:
sudo rmmod kvm-intel sudo sh -c "echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf" sudo modprobe kvm-intel
# verify cat /sys/module/kvm_intel/parameters/nested Y
nested vert is also enabeld by default in the kernel now
[1] https://docs.openstack.org/devstack/latest/guides/devstack-with-nested-kvm.h...
Zitat von KK CHN <kkchn.in@gmail.com>:
I am running an ubuntu VM (instance 22.04) on Esxi 7.0 virtualized platform.
in general in the past it was not possible run kvm on esxi you coudl only do kvm on kvm i know there was some work to make it work with hyperv at one point but i dont know if kvm on vmware is actully supproted by the kernel.
I am trying to create Linux cloud images on this ubuntu VM by installing virt-manager ..
Reference: https://kifarunix.com/create-and-upload-custom-linux-image-into-openstack/?e...
But on my VM when I execute
grep -iE 'vmx|svm' /proc/cpuinfo Returns 0 //means not CPU virtualization enabled ?
modprobe: FATAL: Module l not found in directory /lib/modules/5.15.0-25-generic root@ubuntu-VM:/home/ubuntu# lscpu |grep Virtualization Virtualization type: full
root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# grep -c '(vmx|svm)' /proc/cpuinfo
root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu#
How can I enable the virtualization support on this VM ?? What to do for Nested Virtualization support in this Virtual Machine ?
Any hints welcome.
Thank you Krish
Hi Sean,
in general in the past it was not possible run kvm on esxi you coudl only do kvm on kvm i know there was some work to make it work with hyperv at one point but i dont know if kvm on vmware is actully supproted by the kernel.
I wasn't aware of that, but I also haven't worked with esxi yet. Thanks for bringing that up. Thanks! Eugen Zitat von smooney@redhat.com:
On Tue, 2024-02-20 at 12:22 +0000, Eugen Block wrote:
Hi,
the docs [1] contain a couple of steps, have you tried those?
# check current state cat /sys/module/kvm_intel/parameters/nested
Temporarily remove the KVM intel Kernel module, enable nested virtualization to be persistent across reboots and add the Kernel module back:
sudo rmmod kvm-intel sudo sh -c "echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf" sudo modprobe kvm-intel
# verify cat /sys/module/kvm_intel/parameters/nested Y
nested vert is also enabeld by default in the kernel now
[1] https://docs.openstack.org/devstack/latest/guides/devstack-with-nested-kvm.h...
Zitat von KK CHN <kkchn.in@gmail.com>:
I am running an ubuntu VM (instance 22.04) on Esxi 7.0 virtualized platform.
in general in the past it was not possible run kvm on esxi you coudl only do kvm on kvm i know there was some work to make it work with hyperv at one point but i dont know if kvm on vmware is actully supproted by the kernel.
I am trying to create Linux cloud images on this ubuntu VM by installing virt-manager ..
Reference:
https://kifarunix.com/create-and-upload-custom-linux-image-into-openstack/?e...
But on my VM when I execute
grep -iE 'vmx|svm' /proc/cpuinfo Returns 0 //means not CPU virtualization enabled ?
modprobe: FATAL: Module l not found in directory /lib/modules/5.15.0-25-generic root@ubuntu-VM:/home/ubuntu# lscpu |grep Virtualization Virtualization type: full
root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# grep -c '(vmx|svm)' /proc/cpuinfo
root@ubuntu-VM:/home/ubuntu# grep -iE 'vmx|svm' /proc/cpuinfo root@ubuntu-VM:/home/ubuntu# root@ubuntu-VM:/home/ubuntu#
How can I enable the virtualization support on this VM ?? What to do for Nested Virtualization support in this Virtual Machine ?
Any hints welcome.
Thank you Krish
Hi Krish, shut down your vSphere VM first, go to Edit Settings, expand CPU and select "Hardware virtualization / Expose hardware assisted virtualization to the guest OS”. Regards. — Andrej Moravčík ________________________________ Táto správa a jej prílohy sú dôverné. Prosím, narábajte s týmito informáciami ako s dôvernými a nezverejňujte, nekopírujte ani neposielajte tieto informácie bez predchádzajúceho súhlasu spoločnosti Aliter Technologies, a.s. Ak nie ste adresátom indikovaným v záhlaví tejto správy alebo želaný príjemca, upovedomte prosím spoločnosť Aliter Technologies, a.s. odpoveďou na tento e-mail a pôvodnú správu vymažte zo svojho systému. Aliter Technologies - registrovaná ochranná známka pre EU, USA This message and any attachments are confidential. Please treat the information as confidential, and do not disclose, copy or deliver this message to anyone without Aliter Technologies' approval. If you are not the addressee indicated in this message or an intended recipient please notify Aliter Technologies a.s. by return e-mail and delete the message from your system. Aliter Technologies - Registered in WIPO & U.S. Patent and Trademark Office
Thank you all for the guidance. [ As you all mentioned rightly, I forgot to enable the Hardware Virtualization/ Expose hardware assisted virtualization to the guest OS in the ESXi VM creation utility dialog window. I have enabled it ( by shutting down the VM and then edited the parameter in the CPU expanded page as rightly mentioned by all of you here ) then restarted the VM . Then checked $egrep -c '(vmx|shv)' /proc/cpuinfo it return a value higher than 0 which indicated the VMX enabled for this Virtual machine. All the above steps I needed to create cloud images through virt-manager So done the following in the same VM ( Where my kolla-anisble all-in-one openstack installation up and running successfully ) 1. To create cloud OS images from the ISO files , I have done the following in my Ubuntu22.04 VM which was on ESXi node. Then I installed Viirt-manager and other utilities as below. *$ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils* $ sudo systemctl enable --now libvirtd $ sudo systemctl start libvirtd Everything went well. I am able to get virt-manager up and running and able to create the Cloud Image from an Ubuntu22.04 Server ISO. Then I uploaded this cloud image to the All-IN-ONE kolla-ansible openstack horizon dashboard, the image creation was successful. 2. But when I tried to create an instance by using this image through the horizon dashboard the instance dialog doesn't show any availability zone (nova). I am sure before doing the step 1 I have created Linux instances using the default Cirros image multiple times and all the time I am able to create the instances up and running successfully with the default availability zone "nova" ( I mean kolla-ansible all-in-one openstack installation was working fine before doing the step 1). But now there is no availability zones showing in horizon for creating new instances. Availability Zone There are no Availability Zones. I checked in CLI also $ openstack hypervisor list //it also shows ( down) 3. So I decided to reconfigure the $ kolla-ansible -i all-in-one reconfigure step, but the step fails with the following. RUNNING HANDLER [nova-cell : Restart nova-ssh container] *********************** changed: [localhost] RUNNING HANDLER [nova-cell : Restart nova-libvirt container] ******************* changed: [localhost] RUNNING HANDLER [nova-cell : Checking libvirt container is ready] ************** FAILED - RETRYING: [localhost]: Checking libvirt container is ready (10 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (9 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (8 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (7 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (6 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (5 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (4 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (3 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (2 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (2 retries left). FAILED - RETRYING: [localhost]: Checking libvirt container is ready (1 retries left). fatal: [localhost]: FAILED! => {"attempts": 10, "changed": true, "cmd": "set -o pipefail && docker exec -i nova_libvirt ls /run/libvirtd.pid\n", "delta": "0:00:00.016249", "end": "2024-02-21 16:21:22.750454", "msg": "non-zero return code", "rc": 1, "start": "2024-02-21 16:21:22.734205", "stderr": "Error response from daemon: container 46d139a236f57e41cfcf3121b3879ea01eae774d771415c5418b003c839f3257 is not running", "stderr_lines": ["Error response from daemon: container 46d139a236f57e41cfcf3121b3879ea01eae774d771415c5418b003c839f3257 is not running"], "stdout": "", "stdout_lines": []} Each time I do reconfigure, the reconfiguration fails by reaching the step RUNNING HANDLER [nova-cell : Restart nova-libvirt container] ******************* changed: [localhost] 4. Why it fails, what the root cause of it, I suspect due to step 1 all the errors happened .. 4. How can I recover the all-in-one openstack installation back and be able to create instances and images as earlier?? Only option is to redeploy the kolla-ansible -i all-in-one ?? Then all the current VM and images will all be lost ? ( Is it in production what the method is to recover ?? OR will loss all data in production by running deployment again ? ) Thanks again for all your guidance. Krish On Wed, Feb 21, 2024 at 3:16 AM Andrej Moravčík <andrej.moravcik@aliter.com> wrote:
Hi Krish,
shut down your vSphere VM first, go to Edit Settings, expand CPU and select "Hardware virtualization / Expose hardware assisted virtualization to the guest OS”.
Regards.
— Andrej Moravčík
------------------------------ Táto správa a jej prílohy sú dôverné. Prosím, narábajte s týmito informáciami ako s dôvernými a nezverejňujte, nekopírujte ani neposielajte tieto informácie bez predchádzajúceho súhlasu spoločnosti Aliter Technologies, a.s. Ak nie ste adresátom indikovaným v záhlaví tejto správy alebo želaný príjemca, upovedomte prosím spoločnosť Aliter Technologies, a.s. odpoveďou na tento e-mail a pôvodnú správu vymažte zo svojho systému. Aliter Technologies - registrovaná ochranná známka pre EU, USA This message and any attachments are confidential. Please treat the information as confidential, and do not disclose, copy or deliver this message to anyone without Aliter Technologies' approval. If you are not the addressee indicated in this message or an intended recipient please notify Aliter Technologies a.s. by return e-mail and delete the message from your system. Aliter Technologies - Registered in WIPO & U.S. Patent and Trademark Office
participants (4)
-
Andrej Moravčík
-
Eugen Block
-
KK CHN
-
smooney@redhat.com