You can containerize any VMs.

Prerequisites

  • You must use Ubuntu based Kubernetes cluster worker nodes.
  • Ensure that you have a Kubernetes cluster and the cluster must be accessible via network from the appliance VM.
  • Enable Hardware virtualization on the worker nodes that you want to use.
  • Ensure that you have additional hard disk space to support new VMs. You can verify the VM hard disk space in the vCenter Server.
  • Configure the VM to use DHCP for their interfaces.
    Note: The interface name might change after containerization. So, if the VM uses netplan, use wild cards for interface name, instead of exact interface name. Example:
    network:
      version: 2
      renderer: networkd
      ethernets:
        id0:
          match:
            name: eno*
          dhcp4: yes
  • Power off the VM that you want to containerize.
    Note: You can containerize the VMs with maximum of four hard disks only.

Procedure

  1. Click Discovery from the main menu.
  2. On the left navigation page, go to Inventory > Virtual Machines.
  3. Select a VM and assign the REPLATFORM tag to the VM.
  4. Prepare for VM containerization to familiarize Application Transformer for VMware Tanzu with Kubernetes cluster and harbor registry.
    Note: Ensure that the registry is accessible to both Application Transformer for VMware Tanzu and target Kubernetes cluster.
    1. Click Transform from the main menu.
    2. Under Settings, go to Prepare for V2C.
    3. Select an image registry and enter the repository that you want to reuse to push an image.
      Note: If you plan to use embedded harbor as your image registry, go to Transform > Settings > Image Registry and add a registry in the following format: <appliance IP>:9443. Ensure to select the new entry to push the image.
      The image will be packaged within Application Transformer for VMware Tanzu. The target Kubernetes cluster deploys a container from this image and the VMs that we containerize runs as a process inside the container.
    4. Click Save and Continue.
      This pushes the image into the registry.
    5. Click Browse and select the Kubernetes cluster configuration file (~/.kube/config.yaml file) that you want to connect.
    6. Click Save and Continue.
    7. Select a worker node that you want to use for VM containerization.
    8. Enter the namespace for the container to run.
    9. Click Save and Continue.
      Application Transformer for VMware Tanzu verifies whether:
      • the worker node is suitable for containerization
      • the harbor virtualization is enabled
      • the Linux operating system
    10. Click Save and Continue.
    11. Select the mount location for the target VM disk.
    12. Click Finish.
    13. Click Deploy.
      Deploys the container in the target Kubernetes cluster. You can click Reset to delete the container that you created.
  5. Click Transform from the main menu.
  6. Click on the three dots next to the VM name and select VM Containerization.
    1. Enter a unique name.
      You can containerize the same VM with different names.
    2. Enter the target port for the container.
      Use any port that is greater than 5900. Example: 5910
    3. Enter the CPU count that you want the VM to run.
    4. Enter the RAM that you want to reserve on the target worker node.
    5. Enter the ports to expose to the container network. Example: 9022:22,8080:9090, where 8080 is the target port for the container and 9090 is the port exposed by the VMs.
    6. Click Containerize.

Results

Downloads the disk to the target worker node.