Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering KVM Virtualization

You're reading from   Mastering KVM Virtualization Dive in to the cutting edge techniques of Linux KVM virtualization, and build the virtualization solutions your datacentre demands

Arrow left icon
Product type Paperback
Published in Aug 2016
Publisher Packt
ISBN-13 9781784399054
Length 468 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Preface 1. Understanding Linux Virtualization 2. KVM Internals FREE CHAPTER 3. Setting Up Standalone KVM Virtualization 4. Getting Started with libvirt and Creating Your First Virtual Machines 5. Network and Storage 6. Virtual Machine Lifecycle Management 7. Templates and Snapshots 8. Kimchi – An HTML5-Based Management Tool for KVM/libvirt 9. Software-Defined Networking for KVM Virtualization 10. Installing and Configuring the Virtual Datacenter Using oVirt 11. Starting Your First Virtual Machine in oVirt 12. Deploying OpenStack Private Cloud backed by KVM Virtualization 13. Performance Tuning and Best Practices in KVM 14. V2V and P2V Migration Tools A. Converting a Virtual Machine into a Hypervisor Index

How to enable nested KVM?

By default, nested KVM is disabled.

Open /etc/modprobe.d/kvm.conf as root user using a text editor like vim. If the file does not exist create /etc/modprobe.d/kvm.conf:

  • #Uncomment kvm_intel line if your CPU make is Intel
  • #options kvm_intel nested=1
  • #Uncomment kvm_intel line if your CPU make is AMD
  • #options kvm_amd nested=1

Save the file and reboot the system. Once the system reboots verify nested by checking.

# cat /sys/module/kvm_intel/parameters/nested
Y

For AMD, the file to check is /sys/module/kvm_intel/parameters/nested:

How to enable nested KVM?

Fig - 1

After verifying nested status, change the CPU model of the VM to match host's CPU; that is, enable Copy host CPU configuration (Fig-1). Start the VM and execute egrep '(vmx|svm)' /proc/cpuinfo in the VM. You should be able to see vmx or svm in the output based on the host CPU model.

Your VM can now create its own virtual machines for the purpose of testing.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime