Difference between revisions of "MY XML VM DEFINITION.XML"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 41: Line 41:
  
 
== Activities ==
 
== Activities ==
* [[KVM Offline Migrate or move a virtual machine between two KVM servers without shared storage]]<ref>https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm</ref>: <code>[[virsh/virsh dumpxml|virsh dumpxml]]</code> and <code>[[virsh/MY XML VM DEFINITION.XML|virsh define]]</code>
+
* [[KVM Offline Migrate or move a virtual machine between two KVM servers without shared storage]]<ref>https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm</ref>: <code>[[virsh dumpxml]]</code> and <code>[[virsh define]]</code>
 +
 
 +
 
 +
== Related terms ==
 +
* <code>[[Virt-xml]]</code>
  
 
== See also ==
 
== See also ==
* {{virt}}
 
* {{virtinst}}
 
* {{virsh}}
 
 
* {{KVM}}
 
* {{KVM}}
* {{QEMU}}
 
 
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 15:41, 15 November 2020

  • virsh define MY_XML_VM_DEFINITION.XML (define machine but do not start it)
 <ref>https://en.wikiversity.org/wiki/Draft:Virsh/MY_XML_VM_DEFINITION.XML</ref>
Domain MY_XML_VM_DEFINITION defined from MY_XML_VM_DEFINITION.XML

Using --validate option

  • virsh define xmlfile.xml --validate
Domain MY_XML_VM_DEFINITION defined from MY_XML_VM_DEFINITION.XML
  • virsh create MY_XML_VM_DEFINITION.XML

Example:[1]

<domain type='kvm'>
  <name>MY_MACHINE</name>
  <uuid>2edb24b2-1d52-d7f3-2516-682e98a23fB2</uuid>
  <memory>131072</memory>
  <vcpu>3</vcpu>
  <os>
    <type arch="i686">hvm</type>
  </os>
  <clock sync="localtime"/>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/MY_MACHINE.img'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='22:22:53:24:12:65'/>
    </interface>
    <graphics type='vnc' port='-1' keymap='en'/>
  </devices>
</domain>


Activities[edit]


Related terms[edit]

See also[edit]

  • https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_administration_guide/section-libvirt-dom-xml-example
  • https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
  • Advertising: