Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Preparing Linux VMs for Import

Before you import a custom Linux image, you must prepare the image to ensure that
instances launched from the image can boot correctly and that network connections will
work. Do the following:

1. Optionally, configure your Linux image to support serial console connections. A


console connection can help you remotely troubleshoot malfunctioning instances,
such as an imported image that does not complete a successful boot.
2. Create a backup of the root volume.
3. If the VM has remotely attached storage, such as NFS or block volumes, configure
any services that rely on this storage to start manually. Remotely attached storage is
not available the first time that an imported instance boots on Oracle Cloud
Infrastructure.
4. Ensure that all network interfaces use DHCP, and that the MAC address and IP
addresses are not hardcoded. See your system documentation for steps to perform
network configuration for your system.
5. Stop the VM.
6. Clone the stopped VM as a VMDK or QCOW2 file, and then export the image from
your virtualization environment. See the tools documentation for your virtualization
environment for steps.

Importing a Linux-Based VM
After you prepare a Linux image for import, follow these steps to import the image:

1. Upload the image file to an Object Storage bucket. You can upload the file using
the Console or using the command line interface (CLI). If you use the CLI, use the
following command:

Command

CopyTry It

oci os object put -bn <destination_bucket_name> --file


<path_to_the_VMDK_or_QCOW2_file>

2. Open the navigation menu and click Compute. Under Compute, click Custom


Images.
3. Click Import image.
4. In the Create in compartment list, select the compartment that you want to import
the image to.
5. Enter a Name for the image. Avoid entering confidential information.
6. For the Operating system, select Linux.
7. Select the Import from an Object Storage bucket option.
8. Select the Bucket that you uploaded the image to.
9. In the Object name list, select the image file that you uploaded.
10. For the Image type, select the file type of the image, either VMDK or QCOW2.
11. Depending on your image's version of Linux, in the Launch mode area,
select Paravirtualized mode or Emulated mode. If your image supports
paravirtualized drivers, we recommend that you select paravirtualized mode.
12. Show tagging options: If you have permissions to create a resource, then you also
have permissions to apply free-form tags to that resource. To apply a defined tag,
you must have permissions to use the tag namespace. For more information about
tagging, see Resource Tags. If you are not sure whether to apply tags, skip this
option (you can apply tags later) or ask your administrator.
13. Click Import image.
The imported image appears in the Custom images list for the compartment, with a
state of Importing. When the import completes successfully, the state changes
to Available.
If the state doesn't change, or no entry appears in the Custom images list, the
import failed. Ensure that you have read access to the Object Storage object, and
that the object contains a supported image.
14. Complete the post-import tasks.

You might also like