Created
August 9, 2012 11:59
-
-
Save lbt/3303608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF > /etc/libvirt/qemu/$VM.xml | |
<domain type='kvm'> | |
<name>$VM</name> | |
<memory>524288</memory> | |
<currentMemory>524288</currentMemory> | |
<vcpu>1</vcpu> | |
<os> | |
<type arch='x86_64' machine='pc-0.14'>hvm</type> | |
<kernel>/kvmboot/vmlinuz-2.6.32-5-amd64</kernel> | |
<initrd>/kvmboot/initrd.img-2.6.32-5-amd64</initrd> | |
<cmdline>root=/dev/vda read-only</cmdline> | |
<boot dev='fd'/> | |
</os> | |
<features> | |
<acpi/> | |
<apic/> | |
<pae/> | |
</features> | |
<clock offset='utc'/> | |
<on_poweroff>destroy</on_poweroff> | |
<on_reboot>restart</on_reboot> | |
<on_crash>restart</on_crash> | |
<devices> | |
<emulator>/usr/bin/kvm</emulator> | |
<disk type='block' device='disk'> | |
<driver name='qemu' type='raw'/> | |
<source dev='${VG}/$VM-root'/> | |
<target dev='vda' bus='virtio'/> | |
</disk> | |
<interface type='bridge'> | |
<source bridge='br0'/> | |
<model type='virtio'/> | |
</interface> | |
<serial type='pty'> | |
<target port='0'/> | |
</serial> | |
<console type='pty'> | |
<target port='0'/> | |
</console> | |
<input type='mouse' bus='ps2'/> | |
<graphics type='vnc' port='-1' autoport='yes' keymap='en-gb'/> | |
<video> | |
<model type='vga' vram='9216' heads='1'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> | |
</video> | |
<memballoon model='virtio'> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> | |
</memballoon> | |
</devices> | |
</domain> | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment