Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Virtualization

Copying a VM between VCenters

Submitted by on November 12, 2016 – 6:13 pm

I had a little task: clone an operational VM from one VCenter to another. Normally, for such a task I would use the Standalone Converter. Unfortunately, this time I ran into an annoying SSH key issue: the source VM was an old 32-bit RHEL using DSA and my Converter version only supported RSA. A different approach was needed.

In a nutshell, the solution was:

  1. Clone the operational VM; do not  power up the clone
  2. Click on the clone –> File –> Export –> Export OVF Template
  3. Pick a destination with sufficient space (I used an SMB mount on my laptop)
  4. Exporting as either OVF or OVA works. However, I would suggest OVF.
  5. Prior to importing template, edit the *.ovf file (if you exported as OVA, just unzip the OVA file)
  6. Remove the following section:
    <Item ovf:required="false">
    <rasd:AddressOnParent>0</rasd:AddressOnParent>
    <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
    <rasd:ElementName>CD/DVD drive 1</rasd:ElementName>
    <rasd:InstanceID>10</rasd:InstanceID>
    <rasd:Parent>3</rasd:Parent>
    <rasd:ResourceSubType>vmware.cdrom.remotepassthrough</rasd:ResourceSubType>
    <rasd:ResourceType>15</rasd:ResourceType>
    <vmw:Config ovf:required="false" vmw:key="backing.exclusive" vmw:value="false"” />
    </Item>

    This section defines the CDROM, which can throw the device 6 error on import.
  7. Delete the *.mf file to avoid integrity check failure.
  8. File –> Deploy OVF Template –> jump through the usual hoops.
  9. Before powering up the clone, check NIC settings to make sure correct VLAN is selected and connected.
  10. Boot the VM in single-user mode and make the necessary changes to the network config and any other settings to avoid a conflict with the production VM.
  11. Delete the powered-off clone in the original VCenter.

This is probably more work than it had to be, but, luckily, I don’t need to do this often.

Print Friendly, PDF & Email

Leave a Reply