Author: samuel

KVM With usb/pci passthrough

Creating a Virtual Machine for Windows 10

virt-install \
    --name=Windows10-VM1 \
    --ram=4096 \
    --cpu=host \
    --vcpus=2 \
    --os-type=windows \
    --os-variant=win7 \
    --disk /srv/dev-disk-by-label-SSD/kvm/Windows10-VM1,size=200,sparse=true,bus=virtio \
    --disk /zfs-pool-1/kvm/iso/Windows10.iso,device=cdrom,bus=ide \
    --disk /zfs-pool-1/kvm/iso/virtio-win.iso,device=cdrom,bus=ide \
    --network bridge=br0 \
    --graphics vnc,listen= 

Continue reading

Testing multiple ports

Redirecting a range of ports

Usefull if you need to test a range of ports but dont have a server that listen to all the ports. this forward to the webserver. run

firewall-cmd --zone=public --add-forward-port=port=6000-6500:proto=tcp:toport=80

reload the firewall then you have finished testing to remove the rule.

firewall-cmd --reload

Test if port range is open

nmap -d2 -p 6000-6500 > 6000-6500.txt

ZFS the beginning

How i created my first pool

Raidz2 has two redundant drives (aka raid6). on spare drive and autoreplace on so the spare drive is used automatic in case of drive failure.

zpool create zfs-pool-1 raidz2 /dev/disk/by-id/ata-TOSHIBA_HDWN180_67PQK0NNFP9E /dev/disk/by-id/ata-TOSHIBA_HDWN180_67PQK0NGFP9E /dev/disk/by-id/ata-TOSHIBA_HDWN180_67PSK0YAFP9E /dev/disk/by-id/ata-TOSHIBA_HDWN180_67PUK0KWFP9E /dev/disk/by-id/ata-TOSHIBA_HDWN180_67PUK0KUFP9E /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA16NRDD /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA16NR57 /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA16KL2F /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA16PGEQ /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA16PH49
zpool add zfs-pool-1 spare /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA15N257
zpool set autoreplace=on zfs-pool-1

Continue reading