Xen converts XML to Conf

Source: Internet
Author: User
Tags to domain

# Virsh dumpxml winvm01> winvm01.xml # currently running Virtual Machine winvm01
# Cat winvm01.xml # export an XML file
# Virsh dumpxml c5vm01> c5vm01. xml
# Cat c5vm01. xml
# Virsh-C xen: // domxml-to-native xen-XM winvm01.xml> winvm01.conf
# Cat winvm01.conf
# Virsh-C xen: // domxml-to-native xen-XM c5vm01. xml> c5vm01. conf

Generally, the name of the virtual machine is obtained by using the XM command, and then the XML file of the virtual machine is obtained by using virsh dumpxml <D-Name>; with this file, you can use the domxml-to-native command to obtain the local CONF file.

But what about KVM? Currently only qemu: http://libvirt.org/drvqemu.html is found

/Usr/bin/KVM-S-m PC-M 512-SMP 2-name i-56D709C5-UUID fb973678-04e0-f151-e8a6-07c8f2407833-monitor Pty-pidfile/var/run/libvirt/qemu // i-56D709C5.pid- boot C-kernel/opt/eucalyptus/instances/admin/i-56D709C5/kernel-initrd/opt/eucalyptus/instances/admin/i-56D709C5/ramdisk-append root =/dev/vda1 console = ttys0-drive file =/opt/eucalyptus/instances/admin/i-56D709C5/disk, if = virtio, Index = 0, boot = on-net Nic, macaddr = D0: 0d: 56: D7: 09: C5, VLAN = 0, model = virtio-net tap, FD = 16, script =, VLAN = 0, ifname = vnet0-serial file:/opt/eucalyptus/instances/admin/i-56D709C5/console. log-parallel none-USB-VNC: 24101, password

 

The problem is obvious. Because the RHEL kernel version is too low, the KVM and libvirt versions are too low. Therefore, libvirt does not support hard disks in SCSI mode, so it uses a hard disk in virtio format; virtio hard disks require more than 25 Kernel support in virtual machines. Therefore, when creating a template, you must replace the kernel of 18 with a kernel of more than 25. Remember that different versions of the system, the kernel needs to be seated by the check mark. Finally, I knew it took so much effort ......

When using the centos kernel of euca to start NS, the mouse and NIC are still abnormal. When using its own 18 kernel, it cannot start at all.

Use the virsh command:

Domxml-from-native convert native config to domain XML
Domxml-to-native convert domain XML to native config
Domain Information in dumpxml

These commands are very useful. For more information, see http://lib).org/drvqemu.html. Use domxml-from-native for conversion:

Virsh domxml-from-native qemu-argv demo. ARGs

Demo. argv content: KVM-M 512-drive if = virtio, file = neo_1126.img, Index = 0, boot = on-boot C-balloon virtio

The converted content is as follows.

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.