clean bad data
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
ecf9298fc9
commit
d2e9c1fccb
1 changed files with 1 additions and 87 deletions
86
README.md
86
README.md
|
|
@ -12,89 +12,3 @@ package usage:
|
|||
- curl / use lib
|
||||
- tcpdump / debug network
|
||||
- bridge-utils / bridge add
|
||||
|
||||
## Command et info utile
|
||||
|
||||
```
|
||||
ebtables -L --Lc
|
||||
|
||||
socat -,raw,echo=0 unix-connect:/tmp/vm-monitor.sock
|
||||
```
|
||||
|
||||
```
|
||||
root@lab1:~/vm# cat /etc/systemd/system/dnsmasq@.service
|
||||
[Unit]
|
||||
Description=dnsmasq in netns %i
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/run-dnsmasq-in-netns.sh %i
|
||||
ExecStopPost=/bin/rm -f /run/dnsmasq-%i.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Expects one argument: netns_bridge (e.g. vpc-00003_br-00002 or vpc1_br0)
|
||||
arg="$1"
|
||||
NETNS="${arg%%_*}"
|
||||
BRIDGE="${arg#*_}"
|
||||
|
||||
echo "start ${NETNS} ${BRIDGE}"
|
||||
|
||||
exec ip netns exec "$NETNS" \
|
||||
dnsmasq \
|
||||
--no-daemon \
|
||||
--interface="$BRIDGE" \
|
||||
--bind-interfaces \
|
||||
--pid-file="/run/dnsmasq-$arg.pid" \
|
||||
--conf-file="/etc/dnsmasq.d/$arg.conf" \
|
||||
--no-hosts \
|
||||
--no-resolv \
|
||||
--log-facility="/var/log/dnsmasq-$arg.log" \
|
||||
--no-daemon -p0
|
||||
```
|
||||
|
||||
```
|
||||
vm-1-toto:~# cat /etc/cloud/cloud.cfg.d/20_user.cfg
|
||||
system_info:
|
||||
default_user:
|
||||
name: syonad
|
||||
vm-1-toto:~# cat /etc/cloud/cloud.cfg.d/99_metadata.cfg
|
||||
datasource_list: [ NoCloud ]
|
||||
datasource:
|
||||
NoCloud:
|
||||
seedfrom: 'http://169.254.169.254:80'
|
||||
timeout: 5
|
||||
max_wait: 10
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
qemu-system-x86_64 -enable-kvm -cpu host -m 512 \
|
||||
-smp 1 -serial unix:/tmp/i-0343234.sock,server,nowait \
|
||||
-monitor unix:/tmp/i-0343234.mon-sock,server,nowait \
|
||||
-qmp unix:/tmp/i-0343234.qmp-sock,server,nowait \
|
||||
-drive file=/disk/vm-1.qcow2,if=virtio \
|
||||
-netdev tap,id=net0,ifname=tap6327775173,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=00:22:33:00:00:0A \
|
||||
-display none -daemonize
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
qemu-system-x86_64 -enable-kvm -cpu host -m 512 \
|
||||
-smp 1 -serial unix:/tmp/i-0343234.sock,server,nowait \
|
||||
-monitor unix:/tmp/i-0343234.mon-sock,server,nowait \
|
||||
-qmp unix:/tmp/i-0343234.qmp-sock,server,nowait \
|
||||
-drive file=/disk/vm-2.qcow2,if=virtio \
|
||||
-drive file=/disk/tmp.qcow2,if=virtio \
|
||||
-drive file=/disk/root.qcow2,if=virtio \
|
||||
-netdev tap,id=net0,ifname=tap9102959250,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=00:22:33:00:00:0A \
|
||||
-display none -daemonize \
|
||||
-drive file=./seed/seed.iso,media=cdrom,if=ide
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue