How to Copy VirtualBox Virtual Machines to New Server

1) Download the latest VirtualBox software, and then install onto new server.

2) Download Oracle VM VirtualBox Extension Pack, and install it onto new server.

3) Copy all the storage files on to the same folder of the new server.

4) Copy “C:\Users\jamesh\VirtualBox VMs” folder from old server to new server.

5)Add the VM Machines to the VirtualBox on the new server.
Click Machine menu, click Add, from the Virtual Machine folder, select the .vbox file of the VM machine that you want to add (import).

6) Repeat step 5 for every virtual machine.

You can also do it by using export/import as per Oracle VirtualBox documentation. But what I have done according to the previous steps is working and fast.

Create Named Credentials by Using emcli

In order to create a named credential, you need to know:

  • Target name (unless you create a global credential)
  • Target type
  •  Credential type associated with the target type

Now we start to create a named credential for cluster database ( RACTEST ) user ( JAMES).

1) To get TARGET_TYPE from TARGET_NAME. Normally we know a couple of target_type from daily emcli practice.

$ emcli get_targets -targets="RACTEST:%"

Status ID Status Target Type  Target Name
1         Up     rac_database  RACTETS

2) To get the credential types (and their attributes) associated with “rac_database”.

$ emcli show_credential_type_info -target_type=rac_database
Target Type  Cred Type Name      Cred Type Column Name Key Column
rac_database DBCreds             DBPassword            No
                                 DBRole                No
                                 DBUserName            Yes
             DBHostCreds         HostPassword          No
                                 HostUserName          Yes
             DBKerberosCreds     DBKerberosPassword    No
                                 DBKerberosUserName    Yes
             DBPkiCreds          DBPkiUserWallet       Yes
                                 DBPkiUserWalletPassword No
                                 DBPkiUserWalletType   No
             HostSSHCreds        SSH_PUB_KEY           No
                                 SSH_PVT_KEY           No
                                 USERNAME              Yes

We can see target type rac_database has four credential types. we will use credential type  DBCreds in the following steps.

3) Create named credential for JAMES user of the RAC database.

$emcli create_named_credential -auth_target_type=rac_database \
 -cred_scope=Instance -target_type=rac_database \
-target_name=RACTEST -cred_type=DBCreds -cred_name=NC_RACTEST_JAMES \
-attributes="DBUserName:JAMES;DBPassword:yourpasswd" -test

Credential NC_RACTEST_JAMES created.

Here “-test” to test the credential before saving.

If you want to create a global named credential, just remove “cred_scope, target_type, target_name” parameters.

Clear Problems in OEM by Using EMCLI

There are many old problems and their incidents in OEM repository for many years.  Here is an example of  how to clear those problems by using emcli. Otherwise you might need log on to OEM console by clearing them from one target to another. Imagine your OEM repository might manage thousands of different kinds of targets.

Subscribe to get access

Read more of this content when you subscribe today.

Clears Stateless Alerts in OEM by Using EMCLI

The Enterprise Manager Agent does not automatically clear those stateless alerts.

This post explains how to clean up stateless alerts, also provides shell scripts to generate commands to automatically clean all stateless alerts if possible.

Subscribe to get access

Read more of this content when you subscribe today.