Skip to content

Instantly share code, notes, and snippets.

Install packages:
# yum install -y libguestfs-tools qemu-img
Create the target image
# qemu-img create -f qcow2 target.qcow2 256G
Expand the new image and resize the partitions
# virt-resize --expand /dev/sda1 ubuntu.qcow2 target.qcow2
If CentOS, do xfs_growfs inside the VM after boot
@nuthanc
nuthanc / g20_history.md
Last active August 5, 2020 18:19
Juju import debug history. #Anastasia #Andrey #Ignatious

Command server history

sudo docker ps --all
sudo netstat -lpn | grep 8079
ip addr
ls /tmp
less /tmp/instances.yml
less /tmp/juju_environment
sudo less /tmp/juju_environment
sudo less /tmp/prov_dict.json
@nuthanc
nuthanc / job_command_servers.yaml
Last active July 28, 2020 08:10
Contrail command error, instances and command_servers files
---
command_servers:
server1:
ip: 10.204.216.31
connection: ssh
ssh_user: root
ssh_pass: c0ntrail123
sudo_pass: c0ntrail123
ntpserver: 10.84.5.100
@nuthanc
nuthanc / README.md
Last active December 31, 2020 07:35
Joint deployment of k8s and o7k, with Andrey's comments and history
@nuthanc
nuthanc / history.txt
Created July 22, 2020 05:52
nodel2 hypervisor history
ls -lhrt
file *bac*
ls
rm -rf testbed-1-vm4.img testbed-1-vm5.img
ls
virsh console
virsh list
virsh console testbed-1-vm1
cd /mnt/disk1/images/
ls
@nuthanc
nuthanc / sort_index.py
Created July 9, 2020 12:39
Sort index.md with a python program
with open('index_gist/index.md') as f:
lines = f.readlines()
sorted_lines = sorted(lines, key=str.casefold)
with open('sorted.md', 'w') as f2:
f2.writelines(sorted_lines)
@nuthanc
nuthanc / change_vlan.txt
Last active September 2, 2020 08:02
Juniper switch and router commands
run show configuration | display set | grep ge-0/0/19
set interfaces ge-0/0/19 unit 0 family ethernet-switching vlan members nodei34_venky
delete interfaces ge-0/0/19 unit 0 family ethernet-switching vlan members nodei34_venky
set interfaces ge-0/0/19 unit 0 family ethernet-switching vlan members nodeg12
@nuthanc
nuthanc / cli.sh
Last active November 11, 2021 03:41
Console change boot sequence for MAAS commissioning #no_ip #timeout #commission_with_cli
# nodec9
maas admin machines create \
hostname=nodec9 \
fqdn=nodec9.maas \
mac_addresses=00:25:90:c4:81:f9 \
architecture=amd64 \
power_type=ipmi \
power_parameters_power_driver=LAN_2_0 \
power_parameters_power_user=labuser \
power_parameters_power_pass=c0ntrail123 \
@nuthanc
nuthanc / resolve.md
Last active January 27, 2021 07:36
Juju api issue resolution

Juju api charms resolution

Root cause

  • resolv.conf of n18 and juju-controller(Check ip in maas UI)

  • ping google and amazon and check if it's working

  • Next, check the iptables

iptables -S
# Delete anything that conflicts using