Create Cloudstack (KVM) mirroring and problem resolution with VMware Workstation

Source: Internet
Author: User
Tags uuid cloudstack

Description 1:vmware Workstation image is a VMDK format

Description 2:cloudstack configuration file directory:/RUN/LIBVIRT/QEMU/KVM profile directory:/etc/libvirt/qemu

Description 3:windows Format Conversion method

C:\Program Files (x86) \VMware\VMware workstation>vmware-vdiskmanager.exe-r d:\centos7.4\CentOS.vmdk-t 0 TEMP.VMDK

First, installing the centos7.4 system in VMware Workstation

Second, find the VMDK file in the system installation directory, upload to the Linux system

Third, KVM file conversion

1, convert VMDK to Qcow2

Qemu-img convert-f vmdk-o qcow2 temp.vmdk centos72.qcow2

2, download wget https://launchpadlibrarian.net/40519715/virt-goodies_0.4.tar.gz

3, config file conversion, convert VMX to XML,

./vmware2libvirt-f/OPT/IMAGE/CENTOS.VMX >/opt/image/centos.xml

12345678910111213141516171819202122232425262728293031 <domain type=‘kvm‘>  <name>CentOS</name>  <uuid>c2fbe7d6-d8c5-44df-9001-1632ebde8e58</uuid>  <memory>1048576</memory>  <currentMemory>1048576</currentMemory>  <vcpu>1</vcpu>  <os>    <typearch=‘i686‘machine=‘pc‘>hvm</type#改为<type arch=‘x86_64‘ machine=‘pc‘>hvm</type>    <boot dev=‘hd‘/>  </os>  <features>    <acpi/>  </features>  <clock offset=‘utc‘/>  <on_poweroff>destroy</on_poweroff>  <on_reboot>restart</on_reboot>  <on_crash>destroy</on_crash>  <devices>    <emulator>/usr/bin/kvm</emulator>    <disk type=‘file‘device=‘disk‘>      <source file=‘/opt/image/CentOS.vmdk‘/#改为<source file=‘/opt/image/CentOS.qcow2‘/>      <target dev=‘hda‘/>    </disk>    <interface type=‘network‘>      <mac address=‘00:0c:29:2e:f9:2c‘/>      <source network=‘default‘/>    </interface>    <inputtype=‘mouse‘bus=‘ps2‘/>    <graphics type=‘vnc‘port=‘-1‘listen=‘127.0.0.1‘/>  </devices></domain>

  

4. Install the required package and connect to the/usr/bin directory

Yum Install libvirt-devel.x86_64 libvirt.x86_64
Ln-s/USR/LIBEXEC/QEMU-KVM/USR/BIN/KVM

5, Start KVM

Virsh Define Ubuntu.xml

6, start Virt-manager:applications->system tools->virtual Machine Manager

7. Change the configuration file

Storage Format:qcow2

Four, direct conversion using cloudstack4.11

You can upload a vmdk or vmdk converted Qcow2 image directly with the disk controller to select the IDE

2, launch the instance, select the template you just uploaded

3. View the instance

Create Cloudstack (KVM) mirroring and problem resolution with VMware Workstation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.