
Convert a Legacy BIOS Linux Virtual Machine from VMware to SvHCI
This article is intended for administrators wishing to migrate an existing legacy BIOS Linux virtual machine from VMware into StorMagic SvHCI by converting the virtual disk to RAW format and attaching it to a newly created virtual machine.
Resolution/Information
Scenario
This example demonstrates migrating an Ubuntu 20.04 virtual machine named mc-plugin.ts.stormagic.com from VMware to StorMagic SvHCI.
Shut down the guest operating system before beginning the migration.
Copy the VMware Virtual Disk Files
Before beginning, create an Ubuntu Desktop conversion virtual machine as described in the following article:
Create a VMDK / VHD Converter Machine
Enable the ESXi sshClient firewall ruleset.
esxcli network firewall ruleset set --ruleset-id sshClient --enabled=true
Example:
[root@esxi1:/vmfs/volumes/662974cc-8dd200fe-83b8-5cb901d54598/mc-plugin.ts.stormagic.com] esxcli network firewall ruleset list --ruleset-id sshClient Name Enabled --------- ------- sshClient false [root@esxi1:/vmfs/volumes/662974cc-8dd200fe-83b8-5cb901d54598/mc-plugin.ts.stormagic.com] esxcli network firewall ruleset set --ruleset-id sshClient --enabled=true [root@esxi1:/vmfs/volumes/662974cc-8dd200fe-83b8-5cb901d54598/mc-plugin.ts.stormagic.com] esxcli network firewall ruleset list --ruleset-id sshClient Name Enabled --------- ------- sshClient true
When finished, disable the firewall rule again.
esxcli network firewall ruleset set --ruleset-id sshClient --enabled=false
Copy the Virtual Disk Files to the Converter VM
Copy both the .vmdk descriptor file and the corresponding -flat.vmdk file to the Ubuntu converter virtual machine using SCP. Ensure SSH is enabled on the converter VM.
scp file.txt remote_username@10.10.0.2:/remote/directory
If SSH is not already installed on Ubuntu Desktop, install and enable the OpenSSH server.
sudo apt install openssh-server sudo systemctl enable --now ssh
Example of copying both VMware virtual disk files to a converter VM located at 10.10.130.108.
[root@esxi1:/vmfs/volumes/662974cc-8dd200fe-83b8-5cb901d54598/mc-plugin.ts.stormagic.com] scp ./mc-plugin.ts.stormagic.com-flat.vmdk mchristie@10.10.130.108:/home/mchristie/ The authenticity of host '10.10.130.108 (10.10.130.108)' can't be established. ED25519 key fingerprint is SHA256:ist2c8VCjVPZL8I8xNc8U0yxqYS+FgE15WD/K+hX68s. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '10.10.130.108' (ED25519) to the list of known hosts. mchristie@10.10.130.108's password: hostfile_replace_entries: link /.ssh/known_hosts to /.ssh/known_hosts.old: Function not implemented update_known_hosts: hostfile_replace_entries failed for /.ssh/known_hosts: Function not implemented mc-plugin.ts.stormagic.com-flat.vmdk [root@esxi1:/vmfs/volumes/662974cc-8dd200fe-83b8-5cb901d54598/mc-plugin.ts.stormagic.com] scp ./mc-plugin.ts.stormagic.com.vmdk mchristie@10.10.130.108:/home/mchristie/ mchristie@10.10.130.108's password: hostfile_replace_entries: link /.ssh/known_hosts to /.ssh/known_hosts.old: Function not implemented update_known_hosts: hostfile_replace_entries failed for /.ssh/known_hosts: Function not implemented mc-plugin.ts.stormagic.com.vmdk
Convert the VMDK to RAW Format
Convert the VMDK into RAW format using the qemu-img utility.
OpenStack Image Conversion Guide
qemu-img convert -f vmdk -O raw image.vmdk image.img
Example:
root@vmdk-converter-vm:/home/mchristie# qemu-img convert -f vmdk -O raw ./mc-plugin.ts.stormagic.com.vmdk ./mc-plugin.ts.stormagic.com.img
Upload the RAW Disk to SvHCI
From the Virtual Machines menu, select the option to upload a disk image.
Browse to the converted RAW disk file and upload it into the appropriate storage pool.
Create the SvHCI Virtual Machine
Compare the VMware virtual machine configuration, including CPU, memory, and network MAC address.
In the Virtual Machines menu, select Create Virtual Machine.
Configure the virtual machine name, guest operating system, boot firmware, CPU and core count, and select the VirtIO storage controller.
Select Add Disk and choose to attach an existing disk instead of creating a new one. Select the RAW disk that was uploaded previously.
Add a network adapter connected to the appropriate port group and configure the MAC address to match the original VMware virtual machine.
Preserving the MAC address allows the guest to retain its existing IP address and avoids unnecessary ARP table updates on the network.
Create the virtual machine.
Power On the Guest Virtual Machine
Power on the newly created virtual machine.
The guest should start successfully, retaining the original IP address, MAC address, and existing data from the VMware virtual machine.
Comments
0 comments
Article is closed for comments.