Skip to content

Instantly share code, notes, and snippets.

---
- set_fact:
args:
c_name: "{{ outer_item.name }}"
tmp_proxy: "{{ outer_item.proxy | default([]) }}"
tmp_devices: "{{ outer_item.devices | default([]) }}"
- name: Populate proxy_devices
set_fact:
<?php
$permissions = array(
"owner_read" => 256,
"owner_write" => 128,
"owner_delete" => 64,
"group_read" => 32,
"group_write" => 16,
"group_delete" => 8,
"other_read" => 4,
<?php
$permissions = array(
"owner_read" => 256,
"owner_write" => 128,
"owner_delete" => 64,
"group_read" => 32,
"group_write" => 16,
"group_delete" => 8,
"other_read" => 4,
<?php
$permissions = array(
"owner_read" => 256,
"owner_write" => 128,
"owner_delete" => 64,
"group_read" => 32,
"group_write" => 16,
"group_delete" => 8,
"other_read" => 4,
<?php
$permissions = array(
"owner_read" => 256,
"owner_write" => 128,
"owner_delete" => 64,
"group_read" => 32,
"group_write" => 16,
"group_delete" => 8,
"other_read" => 4,

vkládáme jedním commitem do event tabulky a do stor tabulky (event a header obrazek eventu).

Event tabulka

create table t_events (
   c_uid             int             not null auto_increment primary key,
   c_owner           int             not null default 1,
   c_group           int             not null default 1,
   c_unixperms       int             not null default 500,
- https://gist.github.com/ringe/334ee88ba5451c8f5732
- https://gist.github.com/withakay/4dfbc18d16dc699cee4be4b55539c400/revisions
- https://gist.github.com/jppw/6ddc746d3fdf9551e9db/revisions
- https://serverfault.com/questions/714921/backup-of-running-kvm-qcow2-vps?rq=1
- https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Using_the_QEMU_guest_virtual_machine_agent_protocol_CLI-libvirt_commands.html
- https://mangolassi.it/topic/12537/kvm-snapshot-backup-script
- http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
- https://github.com/absinthetized/libvirt_vm_backup
- https://serverfault.com/questions/521615/signaling-kvm-qemu-vm-to-quiesce-preparing-for-live-backup?rq=1
- https://serverfault.com/questions/22862/snapshot-rollback-for-libvirtkvm

This is a missing / hard-to-find documentation gist on LXD's rest API authentication security. This is relevant to me because I run lxd on several hosts, each sporting a number of containers. Up till now, each host was an isolated system, which became a growing pain, esp. together with Ansible. A quick google search (https://groups.google.com/forum/#!topic/ansible-project/Wo7UMkH9FWQ) led me to the need to use the built-in REST API, follow the experiences gathered along the path:

Enabling

By default the API is only accessisble over the the unix socket. If lxc config get core.https_address returns nothing, you're on default. So I set it up to test things on the internal network as this lxc config set core.https_address 192.168.1.233. Right after that, I read someone dealing with port forwarding to move the default port, this proved not to be needed, because resetting things to lxc config set core.https_address 0.0.0.0:38443 worked like charm.

Setting the trust password

@killua-eu
killua-eu / ansible_kvm_win.md
Last active May 18, 2017 22:42
Ansible + KVM + MS Windows

Create a windows WM

virt-install --name="TestWin10" --os-type=windows --network network=default --disk path=/home/user/testwin10.qcow2,size=15 --cdrom=/home/user/Win10_1703_Czech_x64.iso  --graphics spice --ram=2048

This will launch the VM and give you a spice screen. VM boots from the installer iso and continues to set up. Basic management with virsh:

#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.10.8-gentoo Kernel Configuration
#
#
# Gentoo Linux
#
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_UDEV=y