• Planing on converting physical disk to a VMware image, then convert to qemu(kvm) image for booting on M1 mac


    Updated on 8th March 2021

    Successfully I migrated a x86_64 Linux OS for work to a Virtual machine which can be ran on ARM64 M1 Macbook Pro.

    I will address the tutorial in another blog.

    ----------------------

    On going.

    Devices needed:

    1. the hard drive installed a x86 linux os

    2. an OS running VMware Converter from here called "vCenter converter": https://www.vmware.com/products/converter.html

    3. M1 Macbook Pro

    -----

    Useful tutorials: https://kevrocks67.github.io/blog/running-vmware-images-in-qemu.html

    -----

    Psuedo steps

    1. Install vCenter Converter on a x86 Linux machine. And derive a VMWare image from a physical hard drive installed a x86 Linux. Let's call the image linuxbox.vmdk

    2. On M1 macbook pro, use tool

    qemu-img convert -f vmdk -O qcow2 linuxbox.vmdk linuxbox.qcow2

    3. Start the linuxbox.qcow2 image from a qmeu command on a M1 macbook Pro.

    -----

    Quick test ( it works!!! )

    1. Download a VMDK x86 linux from a site: https://www.osboxes.org/ubuntu/#ubuntu-20-04-vmware

    2. convert it using qemu-image covert

    3. run it

    Edited in 3rd March 2021, 

    It works!!!

    -----

    info about tranforming virtual machine files to qemu files can be found here: https://docs.openstack.org/image-guide/convert-images.html

    qemu-img convert: raw, qcow2, qed, vdi, vmdk, vhd

    The qemu-img convert command can do conversion between multiple formats, including qcow2, qed, raw, vdi, vhd, and vmdk.

    qemu-img format strings

    Image format

    Argument to qemu-img

    QCOW2 (KVM, Xen)

    qcow2

    QED (KVM)

    qed

    raw

    raw

    VDI (VirtualBox)

    vdi

    VHD (Hyper-V)

    vpc

    VMDK (VMware)

    vmdk

    This example will convert a raw image file named image.img to a qcow2 image file.

    $ qemu-img convert -f raw -O qcow2 image.img image.qcow2
    

    Run the following command to convert a vmdk image file to a raw image file.

    $ qemu-img convert -f vmdk -O raw image.vmdk image.img
    

    Run the following command to convert a vmdk image file to a qcow2 image file.

    $ qemu-img convert -f vmdk -O qcow2 image.vmdk image.qcow2
    
     

    Note

    The -f format flag is optional. If omitted, qemu-img will try to infer the image format.

    When converting an image file with Windows, ensure the virtio driver is installed. Otherwise, you will get a blue screen when launching the image due to lack of the virtio driver. Another option is to set the image properties as below when you update the image in the Image service to avoid this issue, but it will reduce virtual machine performance significantly.

    $ openstack image set --property hw_disk_bus='ide' image_name_or_id
    

    -----

    It works.

    CPU Performance

    qemu virtual machine benchmark

    CPU 8 Cores
    RAM 4GB
    OS Ubuntu 20.04 x86_64

    Performance is about 25% of the desktop CPU intel i7 8700K (6 cores 12 threads CPU)

    I would say impressive!

    The only problem about qemu on M1 is that hardware accleration isn't suppored (yet). Such as M1 chip's graphics, neural network processing cores, and some unknown features. I find the window movement is so laggy when using Gnome 3 x86_64 Linux on M1.

    M1 mac ships with 8 graphic cores, 16 neural network processing cores. So delicious! Don't waste them, yummy yummy.

    Good luck!

  • 相关阅读:
    C# 之委托
    Java Maven安装及配置,利用Maven创建项目
    Java DecimalFormat四舍五入的坑及正确用法
    Java 解析XML的几种方式:DOM、SAX、JDOM和DOM4J。
    Java Properties配置文件和XML配置文件读取
    Java Map一些基本使用方法
    JAVA for循环的几种用法
    鼠标及键盘操作
    控制浏览器
    元素定位
  • 原文地址:https://www.cnblogs.com/spaceship9/p/14461560.html
Copyright © 2020-2023  润新知