This file contains hidden or 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
4: ens10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 | |
link/ether 52:54:00:00:12:53 brd ff:ff:ff:ff:ff:ff | |
inet 192.168.12.53/24 brd 192.168.12.255 scope global dynamic ens10 | |
valid_lft 42482sec preferred_lft 42482sec | |
inet6 fe80::97d8:db2:8c10:b6d6/64 scope link | |
valid_lft forever preferred_lft forever | |
5: ens10nsby: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master ens10 state DOWN group default qlen 1000 | |
link/ether 52:54:00:00:12:53 brd ff:ff:ff:ff:ff:ff | |
7: ens11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ens10 state UP group default qlen 1000 | |
link/ether 52:54:00:00:12:53 brd ff:ff:ff:ff:ff:ff |
This file contains hidden or 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
# cat vf.xml | |
<interface type='hostdev' managed='yes'> | |
<mac address='52:54:00:00:12:53'/> | |
<source> | |
<address type='pci' domain='0x0000' bus='0x42' slot='0x02' function='0x5'/> | |
</source> | |
<teaming type='transient' persistent='ua-backup0'/> | |
</interface> |
This file contains hidden or 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/bash | |
DOMAIN=vm-01 | |
PF=ens6np0 | |
VF=ens6v1 # VF attached to the bridge. | |
VF_NUM=1 | |
TAP_IF=vmtap01 # virtio-net interface in the VM. | |
VF_XML=vf.xml | |
MAC=52:54:00:00:12:53 |
This file contains hidden or 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/bash | |
bridge fdb del 52:54:00:00:12:53 dev ens36v0 | |
bridge fdb del 52:54:00:00:12:53 dev vmtap01 master | |
virsh attach-device --config --live vm01 vf.xml | |
virsh domif-setlink vm01 vmtap01 down |
This file contains hidden or 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/bash | |
# Number of units of each cryptocurrency. | |
u_bc=0.73674311 | |
u_eth=0.75795629 | |
u_rip=251.065810 | |
# Get prices of each from https://api.coingecko.com/api/v3/coins/list | |
bc=`curl "https://api.coingecko.com/api/v3/coins/markets?vs_currency=inr&ids=bitcoin" 2> /dev/null | jq . | grep current_price | awk '{print $NF}' | cut -d, -f1 &` | |
eth=`curl "https://api.coingecko.com/api/v3/coins/markets?vs_currency=inr&ids=ethereum" 2> /dev/null | jq . | grep current_price | awk '{print $NF}' | cut -d, -f1 &` |
OlderNewer