Skip to content

Instantly share code, notes, and snippets.

@b
Created February 12, 2009 05:40
Show Gist options
  • Save b/62505 to your computer and use it in GitHub Desktop.
Save b/62505 to your computer and use it in GitHub Desktop.
{
"domain": {
"_content": {
"devices": {
"_content": [
{
"emulator": {
"_content": "\/usr\/bin\/kvm"
}
},
{
"disk": {
"_content": {
"source": {
"_attributes": {
"file": "\/srv\/kvm\/dev-ots02\/disk0.qcow2"
}
},
"target": {
"_attributes": {
"bus": "ide",
"dev": "hda"
}
}
},
"_attributes": {
"device": "disk",
"type": "file"
}
}
},
{
"interface": {
"_content": {
"mac": {
"_attributes": {
"address": "52:54:00:15:e9:80"
}
},
"model": {
"_attributes": {
"type": "virtio"
}
},
"source": {
"_attributes": {
"bridge": "br0.2"
}
},
"target": {
"_attributes": {
"dev": "vnet5"
}
}
},
"_attributes": {
"type": "bridge"
}
}
},
{
"interface": {
"_content": {
"mac": {
"_attributes": {
"address": "52:54:00:d0:56:73"
}
},
"model": {
"_attributes": {
"type": "virtio"
}
},
"source": {
"_attributes": {
"bridge": "br0.14"
}
},
"target": {
"_attributes": {
"dev": "vnet6"
}
}
},
"_attributes": {
"type": "bridge"
}
}
},
{
"serial": {
"_content": {
"source": {
"_attributes": {
"path": "\/dev\/pts\/5"
}
},
"target": {
"_attributes": {
"port": "0"
}
}
},
"_attributes": {
"type": "pty"
}
}
},
{
"console": {
"_content": {
"source": {
"_attributes": {
"path": "\/dev\/pts\/5"
}
},
"target": {
"_attributes": {
"port": "0"
}
}
},
"_attributes": {
"tty": "\/dev\/pts\/5",
"type": "pty"
}
}
},
{
"input": {
"_attributes": {
"bus": "ps2",
"type": "mouse"
}
}
},
{
"graphics": {
"_attributes": {
"type": "vnc",
"port": "5902",
"listen": "127.0.0.1"
}
}
}
]
},
"vcpu": {
"_content": "1"
},
"name": {
"_content": "dev-ots02"
},
"memory": {
"_content": "2048000"
},
"clock": {
"_attributes": {
"offset": "utc"
}
},
"os": {
"_content": {
"type": {
"_content": "hvm"
},
"boot": {
"_attributes": {
"dev": "hd"
}
}
}
},
"uuid": {
"_content": "46a3694d-605e-84f4-1411-d3a49d67cbdf"
},
"on_crash": {
"_content": "destroy"
},
"features": {
"_content": [
{
"acpi": {
}
}
]
},
"currentMemory": {
"_content": "2048000"
},
"on_reboot": {
"_content": "restart"
},
"on_poweroff": {
"_content": "destroy"
}
},
"_attributes": {
"type": "kvm",
"id": "4"
}
}
}
<domain type="kvm" id="4">
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk device="disk" type="file">
<source file="/srv/kvm/dev-ots02/disk0.qcow2"/>
<target bus="ide" dev="hda"/>
</disk>
<interface type="bridge">
<mac address="52:54:00:15:e9:80"/>
<model type="virtio"/>
<source bridge="br0.2"/>
<target dev="vnet5"/>
</interface>
<interface type="bridge">
<mac address="52:54:00:d0:56:73"/>
<model type="virtio"/>
<source bridge="br0.14"/>
<target dev="vnet6"/>
</interface>
<serial type="pty">
<source path="/dev/pts/5"/>
<target port="0"/>
</serial>
<console tty="/dev/pts/5" type="pty">
<source path="/dev/pts/5"/>
<target port="0"/>
</console>
<input bus="ps2" type="mouse"/>
<graphics type="vnc" port="5902" listen="127.0.0.1"/>
</devices>
<vcpu>1</vcpu>
<name>dev-ots02</name>
<memory>2048000</memory>
<clock offset="utc"/>
<os>
<type>hvm</type>
<boot dev="hd"/>
</os>
<uuid>46a3694d-605e-84f4-1411-d3a49d67cbdf</uuid>
<on_crash>destroy</on_crash>
<features>
<acpi/>
</features>
<currentMemory>2048000</currentMemory>
<on_reboot>restart</on_reboot>
<on_poweroff>destroy</on_poweroff>
</domain>
{
"capabilities": {
"_content": [
{
"host": {
"_content": {
"cpu": {
"_content": {
"arch": {
"_content": "x86_64"
},
"features": {
"_content": [
{
"vmx": {
}
}
]
}
}
}
}
}
},
{
"guest": {
"_content": {
"arch": {
"_content": [
{
"wordsize": {
"_content": "64"
}
},
{
"domain": {
"_attributes": {
"type": "xen"
}
}
},
{
"emulator": {
"_content": "\/usr\/lib64\/xen\/bin\/qemu-dm"
}
}
],
"_attributes": {
"name": "x86_64"
}
},
"features": {
},
"os_type": {
"_content": "xen"
}
}
}
},
{
"guest": {
"_content": {
"arch": {
"_content": [
{
"wordsize": {
"_content": "32"
}
},
{
"domain": {
"_attributes": {
"type": "xen"
}
}
},
{
"emulator": {
"_content": "\/usr\/lib\/xen\/bin\/qemu-dm"
}
},
{
"machine": {
"_content": "pc"
}
},
{
"machine": {
"_content": "isapc"
}
},
{
"loader": {
"_content": "\/usr\/lib\/xen\/boot\/hvmloader"
}
}
],
"_attributes": {
"name": "i686"
}
},
"features": {
},
"os_type": {
"_content": "hvm"
}
}
}
}
]
}
}
<capabilities>
<host>
<cpu>
<arch>x86_64</arch>
<features>
<vmx/>
</features>
</cpu>
</host>
<guest>
<arch name="x86_64">
<wordsize>64</wordsize>
<domain type="xen"/>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
</arch>
<features/>
<os_type>xen</os_type>
</guest>
<guest>
<arch name="i686">
<wordsize>32</wordsize>
<domain type="xen"/>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<loader>/usr/lib/xen/boot/hvmloader</loader>
</arch>
<features/>
<os_type>hvm</os_type>
</guest>
</capabilities>
{
"network": {
"_content": {
"name": {
"_content": "local"
},
"forward": {
"_attributes": {
"mode": "route",
"dev": "eth1"
}
},
"ip": {
"_content": {
"dhcp": {
"_content": {
"range": {
"_attributes": {
"end": "192.168.122.254",
"start": "192.168.122.2"
}
}
}
}
},
"_attributes": {
"netmask": "255.255.255.0",
"address": "192.168.122.1"
}
},
"bridge": {
"_attributes": {
"name": "virbr1"
}
}
}
}
}
<network>
<name>local</name>
<forward mode="route" dev="eth1"/>
<ip netmask="255.255.255.0" address="192.168.122.1">
<dhcp>
<range end="192.168.122.254" start="192.168.122.2"/>
</dhcp>
</ip>
<bridge name="virbr1"/>
</network>
{
"pool": {
"_content": {
"name": {
"_content": "HostVG"
},
"source": {
"_content": [
{
"device": {
"_attributes": {
"path": "\/dev\/sda1"
}
}
},
{
"device": {
"_attributes": {
"path": "\/dev\/sdb1"
}
}
},
{
"device": {
"_attributes": {
"path": "\/dev\/sdc1"
}
}
}
]
},
"target": {
"_content": {
"path": {
"_content": "\/dev\/HostVG"
}
}
}
},
"_attributes": {
"type": "logical"
}
}
}
<pool type="logical">
<name>HostVG</name>
<source>
<device path="/dev/sda1"/>
<device path="/dev/sdb1"/>
<device path="/dev/sdc1"/>
</source>
<target>
<path>/dev/HostVG</path>
</target>
</pool>
{
"volume": {
"_content": {
"name": {
"_content": "sparse.img"
},
"allocation": {
"_content": "0"
},
"capacity": {
"_content": "1",
"_attributes": {
"unit": "T"
}
},
"target": {
"_content": {
"permissions": {
"_content": {
"mode": {
"_content": "0744"
},
"owner": {
"_content": "0744"
},
"label": {
"_content": "virt_image_t"
},
"group": {
"_content": "0744"
}
}
},
"path": {
"_content": "\/var\/lib\/virt\/images\/sparse.img"
}
}
}
},
"_attributes": {
"type": "file"
}
}
}
<volume type="file">
<name>sparse.img</name>
<allocation>0</allocation>
<capacity unit="T">1</capacity>
<target>
<permissions>
<mode>0744</mode>
<owner>0744</owner>
<label>virt_image_t</label>
<group>0744</group>
</permissions>
<path>/var/lib/virt/images/sparse.img</path>
</target>
</volume>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment