Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Nested Virtualization with Oracle Linux Virtualization Manager

Simon Coter-OracleJul 4 2020 — edited Jul 8 2020

This document is for test and educational purposes only.

This document is still under review; sections of this document could change and further enhancements and/or options can be introduced on the same.

Introduction

Nested virtualization is useful in a variety of scenarios, such as debugging hypervisors in a constrained environment and testing larger virtual deployments on a limited amount of physical resources. However, note that nested virtualization is not supported or recommended in production user environments, and is primarily intended for development and testing.

How to Achieve this :

In order to do nested virtualization on Oracle Linux Virtualization Manager, we need to configure the following :

Enable Nested Virtualization on the KVM host

It is always recommended to put the Host into maintenance mode before making any changes.

  • Navigate to the host on which you want to enable the nested virtualization.
  • Click on Edit --> Kernel Tab.
  • Check the "nested virtualization" checkbox.
    pastedImage_0.png
  • Reboot the host for the changes in the kernel boot parameters to take the effect.

**Enable MAC Spoofing
**

By default, MAC spoofing is disabled in OLVM. This is required for allowing the nested KVM host to pass traffic from its guests up through the machine in which it's hosted.

  • In OLVM GUI, Go to Network and Click vNIC Profiles.
  • Select vNIC profile and press Edit.
  • By default, Network filter will have vdsm-no-mac-spoofing. Select No Network Filter in drop-down.
    pastedImage_1.png
  • Press OK

Enable Pass-Through Host CPU

In order to enable nested virtualization in OLVM, You will need to pin the VM that you want to use it on to a particular host and disallow migration of that VM using live migration features.

  • Edit the VM where nested virtualization has to be enabled. Click on the Host Tab as shown below:
    pastedImage_2.png
  • Once the host Tab is opened. To pin the VM to a particular host click on start running on a particular host. Set the migration mode to Allow manual migration only. Once this is completed the Pass-Through Host CPU button will be enabled for use as shown below:
    pastedImage_1.png
  • Start the guest VM.

Now, We can use this guest VM and run nested hypervisor solutions like KVM and/or Oracle VM.

Comments

tsangsir

In pfile, set

*.db_name=prod1

*.db_unique_name=prod2

And you must be VERY careful when doing this kind of experience because you may easily mix up the files in your 2 databases.

Mahir M. Quluzade

Hi,

You  can restore database other directory with  same name .

After restoreation you can change with nid TARGET=sys/password@(New database Network Sevice Name) DBNAME=prod2_DG

Or you  can use RMAN DUPLICATE command for duplication new database.

Note : If you  want crerate standby  database, then you not need change database name. Need different db_unique_name for standby database

Regards

Mahir

864988

Hello,

I am not creating a standby database, I just want to test my backups on same host and at the same time create a new database with different name (prod2)

How can I achieve that?

SANCHITGUPTA

you are cloning your database with different name so you need to set the parameters in pfile. start your database with pfile in nomount state... and then run the below command.

rman > duplicate target database  to “prod2”  nofilenamecheck


pfile :

*.db_name=prod1

*.db_unique_name=prod2

Mahir M. Quluzade

Then you can use DUPLICATE Command written as SANCHITGUPTA.

or you can use NID tool for change database name

You  can use : http://gavinsoorma.com/2009/07/rman-duplicate-database-on-same-host/

tsangsir

As described above and below,

In pfile, set

*.db_name=prod1

*.db_unique_name=prod2

This should allow you to mount the restored controlfile.

Use 'set newname' to make RMAN restore datafiles to different location. Please check rman documentation.

Emphasis again, be careful not to overwrite files in prod1. Make sure to rename files in prod2 (datafiles, online redo logs, tempfiles)

EdStevens

Just to get very explicit about the danger of what you are doing.

The control file contains the fully qualified names of all of the data files to be opened.

So the control file for db1 will list file names like '/u01/oradata/db1/system01.dbf'

Now, you simply copy that control file to a different location and try to use it for db2.  Even if you use the hack to get around the database_name issue, that control file will still list '/u01/oradata/db1/system.dbf', which clearly does not belong to db2.  But when you open database db2, guess what?

Selvakumar.Nagulan

The scenario you are trying to undergo is cloning or duplicating a database. Please use the below link to achieve this.

Oracle tips and techs: Database cloning using RMAN DUPLICATE

Thank you!!

Hemant K Chitale

SET DBID or DB_NAME in the parameter file don't change the database name  that is in the control file.  At the point of restore, the control file still has the "prod1" database name.

With RMAN backups, you should consider using DUPLICATE DATABASE

http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#i1008564

Running a DUPLICATE Database on the same host as the source database is a risky operation.  Done incorrectly, you run the risk of overwriting the datafiles of the source database.  Since your source is a Production database, you run the risk of taking the production database down.  I suggest that you practice the steps on a non-production environment first.

Hemant K Chitale

mBk77

You need to recreate the controlfile..

Backup controlfile to trace and edit it and recreate the control file with the new database name .

or create a new control file

follow the link below

Creating Control Files

1 - 10

Post Details