Mercurial > hg > Members > anatofuz > ie-virsh
changeset 51:9590804117b7
add template.xml
author | AnaTofuZ <k198584@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Nov 2020 09:16:34 +0900 |
parents | 0376dbfaa7ed |
children | 883ae1fc1644 |
files | src/xml.rs template.xml |
diffstat | 2 files changed, 84 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xml.rs Sun Nov 22 18:44:45 2020 +0900 +++ b/src/xml.rs Mon Nov 23 09:16:34 2020 +0900 @@ -142,8 +142,6 @@ impl GenerateVM { pub fn generate(self) -> Result<String, Error> { let mut reader = Reader::from_reader(BufReader::new(File::open(TEMPLATE_XML_FILE)?)); - - println!("generate xml :{}", self.xml_path); let mut writer = Writer::new(BufWriter::new(File::create(self.xml_path.clone()).unwrap())); let mut buf = Vec::new(); loop {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/template.xml Mon Nov 23 09:16:34 2020 +0900 @@ -0,0 +1,84 @@ +<!-- +WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +OVERWRITTEN AND LOST. Changes to this xml configuration should be made using: + virsh edit ie-virsh-template +or other application using the libvirt API. +--> + +<domain type='kvm'> + <name>ie-virsh-template</name> + <uuid>7c69605c-a405-4c41-b6f4-6fc7360e85d5</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc-i440fx-focal'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + </features> + <cpu mode='custom' match='exact'> + <model fallback='allow'>SandyBridge</model> + </cpu> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/bin/kvm</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/media/iscsi/ie-virsh-template.qcow2'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='block' device='cdrom'> + <driver name='qemu' type='raw'/> + <target dev='hdb' bus='ide'/> + <readonly/> + <address type='drive' controller='0' bus='0' target='0' unit='1'/> + </disk> + <controller type='usb' index='0' model='ich9-ehci1'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci1'> + <master startport='0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci2'> + <master startport='2'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci3'> + <master startport='4'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <controller type='ide' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <interface type='bridge'> + <source bridge='br62'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <serial type='pty'> + <target port='0'/> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <input type='tablet' bus='usb'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </memballoon> + <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/> + </devices> +</domain>