Migrating Windows 2022 from proxmox to Oracle Cloud Infrastructure (OCI) Rumi, March 12, 2024 I was doing a requirement work where a customized windows 2022 needs to be ported to OCI. In order to achieve this, following steps were considered- Creating a KVM virtual guest on my Proxmox 7 Infra and install windows 2022 with virtio drivers. Stopping the VM and copying the qcow2 file to OCI object storage Importing custom image from object storage and create an OCI instance. Accessing the newly created OCI instances. Step-1: Creating a windows 2022 guest VM on Proxmox node In order to create the vm, I selected the following parameters for vm specification- Memory: 12GB Processor: 8 (host) BIOS: default (seabios) Display: default Machine: pci440fx-5.2 SCSI Controller: VirtIO SCSI CD/DVD Drive (ide0): virtio ISO (added virtio windows driver https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers) CD/DVD Drive (ide2): Windows_2022_ISO_Image HardDisk: Minimum 32GB in qcow2 format disk Network Device(net0): virtio interface To prepare a Windows VM for import: Used 2 IDE disk attached, Windows is unable to locate any Virtio SCSCI driver, hence during OS installation, you need to show the path of the other IDE CD/DVD Rom where the virtio scsi driver can be installed. Spin off the windows installation and for simplicity purpose- I’ve kept only C Drive during the windows installation. Once the windows installation is completed- navigate to your windows console and install virtio network device from the Virtio driver CD/DVD ROM. Follow your organization’s security guidelines to ensure that the Windows system is secured. This can include, but is not limited to the following tasks: Install the latest security updates for the operating system and installed applications. Enable the firewall, and configure it so that you only enable the rules which are needed. Disable unnecessary privileged accounts. Use strong passwords for all accounts. Configure Remote Desktop Protocol (RDP) access to the image: Enable Remote Desktop connections to the image. Modify the Windows Firewall inbound port rule to allow RDP access for both Private and Public network location types. When you import the image, the Windows Network Location Awareness service will identify the network connection as a Public network type. Determine whether the current Windows license type is a volume license by running the following command in PowerShell: Get-CimInstance -ClassName SoftwareLicensingProduct | where {$_.PartialProductKey} | select ProductKeyChannel If the license is not a volume license, after you import the image, you will update the license type. If you plan to launch the imported image on more than one VM instance, create a generalized image of the boot disk. A generalized image is cleaned of computer-specific information, such as unique identifiers. When you create instances from a generalized image, the unique identifiers are regenerated. This prevents two instances that are created from the same image from colliding on the same identifiers. Create a backup of the root volume. 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. Ensure that all network interfaces use DHCP, and that the MAC address and IP addresses are not hard-coded. See your system documentation for steps to perform network configuration for your system. Download the Oracle VirtIO Drivers for Microsoft Windows. Install the drivers and then restart the instance. Step-2: Migrating qemu VM image to OCI Object Storage: Stop the VM. Clone the stopped VM QCOW2 file, and then export the image from your virtualization environment to. In order to achieve this, you can simply copy the disk image qcow2 file (in my case it was appstor2 partition vm-113-disk-0.qcow2). For simplicity, the object storage bucket was a public bucket at OCI. Step-3: Import Custom Image Navigate Compute > Customer Images > Import image Provide a name of your image. Select Operating System: Windows Select Operating System Version: Server 2022 Standard Put Tick on “Certify that my use of this OS complies with Microsoft licensing requirement” Select “Import from an object storage bucket” Bucket in Store “Public” Object Name “Uploaded_qcow2_file” Image type “qcow2” Launch Mode: Firmwire BIOS Select “Paravirtualized Mode” And finally click on “Import Image” Step-4: Create Instance Once you have completed creating the custom image, now you can beging the process of creating the Windows Instance at OCI Navigate to Compute > Customer Images > “Three Dots” from the desired image name > Click on expanded menu “Create Instance” In a while your instanse will be provisioned as per your selected VCN and Compute Shape. From Compute > Instances > Click on the created instance. On the detailed page, you’ll see the- Username- opc Initial Password -! Note: The above Username and Passwords are tricky, don’t use them instead provide- Username- Administrator Password- <Password_at_your_Proxmox_Instance> You can connect the instance using the RDP client with your public faced IP and the credentials. Windows Source Image Requirements Custom images must meet the following requirements: The maximum image size is 400 GB. The image must be set up for BIOS boot. You can leave the boot type as BIOS or change it to UEFI after you import the image. Only one disk is supported, and it must be the boot drive with a valid master boot record (MBR) and boot loader. You can migrate additional data volumes after you import the image’s boot volume. The minimum boot volume size is 256 GB. For more information, see Custom Boot Volume Sizes. The boot process must not require additional data volumes to be present for a successful boot. The disk image cannot be encrypted. The disk image must be a VMDK or QCOW2 file. Create the image file by cloning the source volume, not by creating a snapshot. VMDK files must be either the “single growable” (monolithicSparse) type or the “stream optimized” (streamOptimized) type, both of which consist of a single VMDK file. All other VMDK formats, such as those that use multiple files, split volumes, or contain snapshots, are not supported. The network interface must use DHCP to discover the network settings. When you import a custom image, existing network interfaces are not recreated. Any existing network interfaces are replaced with a single NIC after the import process is complete. You can attach additional VNICs after you launch the imported instance. The network configuration must not hardcode the MAC address for the network interface. Download: Oracle-Virtio-V1037432-01 Ref: https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/importingcustomimagewindows.htm#Importing_Custom_Windows_Images https://docs.oracle.com/en/operating-systems/oracle-linux/kvm-virtio/kvm-virtio-DownloadingtheOracleVirtIODriversforMicrosoftWindows.html#kvm-virtio-download Administrations Cloud Configurations (Windows) OCI OCIProxmoxWindows 2022