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
{ | |
graphitePort: 2003 | |
, graphiteHost: "localhost" | |
, port: 8125 | |
, backends: [ "./backends/graphite" ] | |
} |
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
import re | |
import sys | |
import os | |
def filerev(somefile, buffer=256): | |
somefile.seek(0, os.SEEK_END) | |
size = somefile.tell() | |
lines = [''] | |
rem = size % buffer | |
pos = max(0, (size // buffer - 1) * buffer) |
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
<domain type='kvm'> | |
<name>sluo_kvm_example</name> | |
<uuid>fd509219-5ace-4102-90bd-d4312a85a363</uuid> | |
<memory unit='KiB'>1048576</memory> | |
<currentMemory unit='KiB'>1048576</currentMemory> | |
<vcpu placement='static'>1</vcpu> | |
<resource> | |
<partition>/machine</partition> | |
</resource> | |
<os> |
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
# /bin/systemctl restart libvirtd.service | |
# /bin/systemctl enable libvirtd.service | |
Note: | |
How to turn on the debug logs for libvirtd. | |
1)open /etc/libvirt/libvirtd.conf in your favourite editor. | |
2)find & replace, or set these variables: | |
log_level = 1 | |
log_filters="3:remote 4:event 3:json 3:rpc" | log_filters="1:qemu_monitor_json" | |
log_outputs="1:file:/var/log/libvirt/libvirtd.log" |
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
# QEMU Monitor Protocol Python class | |
# | |
# Copyright (C) 2009 Red Hat Inc. | |
# | |
# This work is licensed under the terms of the GNU GPL, version 2. See | |
# the COPYING file in the top-level directory. | |
import socket, json, time, commands | |
from optparse import OptionParser |
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
import libvirt | |
conn = libvirt.open('qemu:///system') | |
for id in conn.listDomainsID(): | |
dom = conn.lookupByID(id) | |
print "Dom %s State %s" % ( dom.name(), dom.info()[0] ) | |
dom.suspend() | |
print "Dom %s State %s (after suspend)" % ( dom.name(), dom.info()[0] ) | |
dom.resume() | |
print "Dom %s State %s (after resume)" % ( dom.name(), dom.info()[0] ) | |
dom.destroy() |
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
###### Bridge network configuration. | |
# cat /etc/qemu-ifup | |
#!/bin/sh | |
switch=switch | |
/sbin/ifconfig $1 0.0.0.0 up | |
/usr/sbin/brctl addif ${switch} $1 | |
# cat /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" |
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
- AMD & Intel: | |
Opteron_G4: avx,xsave,aes,sse4.2,sse4.1,cx16,ssse3,sse4a | |
Opteron_G3: cx16,sse4a | |
Opteron_G2: cx16 | |
Opteron_G1: no cx16 |
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
## | |
# @BlockdevOptionsBase | |
# | |
# Options that are available for all block devices, independent of the block | |
# driver. | |
# | |
# @driver: block driver name | |
# @id: #optional id by which the new block device can be referred to. | |
# This is a required option on the top level of blockdev-add, and | |
# currently not allowed on any other level. |
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
Test Matrix: | |
Filesystem: ext4 and xfs and scsi_debug for host side, and ext4 or xfs for guest side. | |
Backend: localfile or iSCSI or libiscsi (Note: BZ#1037503 glusterfs not support discard). | |
Disk Format: RAW for passthrough, RAW/qcow2 for localfile. | |
Disk Interface: scsi-block/scsi-hd/ide/ahci for UNMAP mode, scsi-block/scsi-hd interface for WRITE SAME mode. | |
NOTE: Persistent reservations *cannot* be used with discard when QEMU run as non-root user, but can work well in root user.(BZ966883#c5) | |
Windows only supports automatic discard (like "-o discard" in Linux). | |
You can check that discard is enabled by running. |