OCI DVH: Move VMs from OCI DVH to OCI Shared VM

Santhosh Kumar BVSRK
3 min readOct 6, 2023

--

Problem Statement

Often customers come up with a request to move their VMs from a DVH (Dedicated Virtual Host) to a Shared VM on OCI as they will be paying a lot for DVH.

Explanation

OCI DVH is a Dedicated Server allocated to a tenant where they can run multiple VMs. Dedicated Servers come with specific shape e.g. Standard.E2.64, Standard.E3.128, etc. which means customer will be charged for 64/128 OCPUs based on the DVH shape they have chosen irrespective of whether they use only 1–2 OCPUs or all the 64/128 OCPUs. Because this server cannot be allocated to any other tenant.

Solution

Now let us see how to move your VMs from DVH to a Shared VM on OCI.

To demonstrate this use-case, I have provisioned an OCI DVH Standard.E2.64 i.e., a dedicated server with 64 OCPUs of which I have used only 1 OCPU by creating a VM. On this VM I have installed Java and placed a simple HelloWorld.java code.

OCI DVH
OCI DVH VM
Java HelloWorld Program

Now, I want to move this VM to a Shared VM on OCI rather than using the entire DVH. For this, I will just terminate the VM by retaining the Boot Volume and recreating a Shared OCI VM from the Boot Volume directly.

Keep the checkbox “Permanently delete the attached boot volume” unchecked and terminate the Instance first and then the DVH.

Deleted both the VM & DVH

Now let us create an OCI Shared VM from the Boot Volume retained

Now that a Shared OCI VM is created from the retained Boot Volume, let us connect and see if my “HelloWorld.java” code is there intact or not.

This completes demonstration of moving VM from OCI DVH to OCI Shared VM.

Note: If you have a Block Volume attached to your VM on OCI DVH, then you first have to detach the Block volume before terminating VM in the OCI DVH and then post creating Shared OCI VM, you have to attach it.

!!Happy Reading!!

--

--

Santhosh Kumar BVSRK
Santhosh Kumar BVSRK

Written by Santhosh Kumar BVSRK

17+ Years in IT/ITES| ML & AI Enthusiast| Oracle Cloud Architect, Integration Specialist — BPEL, OSB, OIC, IICS| Database Scripting-SQL, PL/SQL, MySQL

No responses yet