User Tools

Site Tools


trac.x0blr.com:notes:mysticpeg

Current state of Mystic Peg

Server

Hosting

This is hosted on easyspace,

  • NO - can be scaled, custom built server
  • NO - can deploy our own OS, requires a support ticket
  • YES - can request a KVMoIP session via web interface request

IP Address

$ host mysticpeg (No URL Defined)
mysticpeg has address 78.129.208.78

Other Static IP addresses linked to the server include

78.129.208.24, 78.129.208.29, 78.129.208.77, and 78.129.208.124

The IP Configuration of the Host and VMs is as follows

<blockquote>

IP: (Choose From Above) Netmask: 255.255.255.0 Gateway: 78.129.208.1 DNS: 8.8.8.8, 8.8.4.4 (Change this to use your own, as currently using Google DNS)

</blockquote>

Specification

IS-56088 (RS Dedicated Server)- Intel Xeon E3-1230 v2

  • 8GB Memory
  • Adaptec 5405 RAID Controller
  • 2x 2TB SATA HDD 7200rpm 3.5"
  • RAID 1
  • CentOS 7 x64
  • Unmanaged SLA
  • Unmetered Bandwidth

Operating System

MYSTIC:/root $ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

MYSTIC:/root $

File System

Filesystem   Size  Used Avail Use% Mounted on
/dev/mapper/cl-root   11G  8.0G  3.1G  73% /
devtmpfs             3.8G     0  3.8G   0% /dev
tmpfs                3.9G     0  3.9G   0% /dev/shm
tmpfs                3.9G  397M  3.5G  11% /run
tmpfs                3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda1           1014M  379M  636M  38% /boot
/dev/mapper/cl-home  1.4T  1.2T  246G  83% /home
tmpfs                780M   52K  780M   1% /run/user/0
tmpfs                780M     0  780M   0% /run/user/1000

LVM Config

MYSTIC:/root $ mount | grep mapper
/dev/mapper/cl-root on / type xfs (rw,relatime,attr2,inode64,noquota)
/dev/mapper/cl-home on /home type xfs (rw,relatime,attr2,inode64,noquota)
MYSTIC:/root $
MYSTIC:/root $ pvdisplay
  --- Physical volume ---
  PV Name   /dev/sda2
  VG Name               cl
  PV Size               <1.82 TiB / not usable 0
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              475898
  Free PE               112509
  Allocated PE          363389
  PV UUID               KZ24Nv-RYPC-kfFk-q3hA-cAJm-I9yt-2BGr4f

MYSTIC:/root $
MYSTIC:/root $ vgdisplay
  --- Volume group ---
  VG Name   cl
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <1.82 TiB
  PE Size               4.00 MiB
  Total PE              475898
  Alloc PE / Size       363389 / <1.39 TiB
  Free  PE / Size       112509 / <439.49 GiB
  VG UUID               JUzGXT-a91Q-xnqI-Zgfr-NUTB-Rhua-8A2pou

MYSTIC:/root $
MYSTIC:/root $ lvdisplay
  --- Logical volume ---
  LV Path   /dev/cl/swap
  LV Name                swap
  VG Name                cl
  LV UUID                Lv09OG-1Mt0-khfK-QcLs-dDac-f39l-1tREMR
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2019-08-21 00:39:08 +0100
  LV Status              available
  # open                 2
  LV Size                8.00 GiB
  Current LE             2048
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/cl/home
  LV Name                home
  VG Name                cl
  LV UUID                J3Jqem-lrOi-l8jO-mc6o-ye9J-9a1K-eFGWXA
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2019-08-21 00:39:08 +0100
  LV Status              available
  # open                 1
  LV Size                <1.37 TiB
  Current LE             358525
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Path                /dev/cl/root
  LV Name                root
  VG Name                cl
  LV UUID                V3jgzI-T3nt-C5xv-o5S3-ADcx-aLA5-aAu6xL
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2019-08-21 00:39:12 +0100
  LV Status              available
  # open                 1
  LV Size                11.00 GiB
  Current LE             2816
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

MYSTIC:/root $

Network config

MYSTIC:/root $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:25:90:7e:11:a9 brd ff:ff:ff:ff:ff:ff
    inet 78.129.208.78/32 brd 78.129.208.78 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::225:90ff:fe7e:11a9/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:25:90:7e:11:a8 brd ff:ff:ff:ff:ff:ff
9: br1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 3e:a4:64:49:e9:34 brd ff:ff:ff:ff:ff:ff
    inet 78.129.208.78/24 brd 78.129.208.255 scope global noprefixroute br1
       valid_lft forever preferred_lft forever
49: macvtap3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
    link/ether 52:54:00:49:8b:a3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fe49:8ba3/64 scope link
       valid_lft forever preferred_lft forever
50: macvtap0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
    link/ether 52:54:00:94:c1:be brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fe94:c1be/64 scope link
       valid_lft forever preferred_lft forever
MYSTIC:/root $
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1941/master
tcp        0      0 0.0.0.0:22022           0.0.0.0:*               LISTEN      1466/sshd
tcp        0      0 127.0.0.1:5900          0.0.0.0:*               LISTEN      10964/qemu-kvm
tcp        0      0 127.0.0.1:5903          0.0.0.0:*               LISTEN      17654/qemu-kvm
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd
tcp        0      0 127.0.0.1:5910          0.0.0.0:*               LISTEN      14681/Xvnc
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1454/cupsd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1941/master
tcp6       0      0 :::6556                 :::*                    LISTEN      1470/xinetd
tcp6       0      0 :::22022                :::*                    LISTEN      1466/sshd
tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd
tcp6       0      0 ::1:5910                :::*                    LISTEN      14681/Xvnc
tcp6       0      0 ::1:631                 :::*                    LISTEN      1454/cupsd
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1/systemd
udp        0      0 127.0.0.1:323           0.0.0.0:*                           1060/chronyd
udp        0      0 0.0.0.0:781             0.0.0.0:*                           1030/rpcbind
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1057/avahi-daemon:
udp        0      0 0.0.0.0:47106           0.0.0.0:*                           1057/avahi-daemon:
udp6       0      0 :::111                  :::*                                1/systemd
udp6       0      0 ::1:323                 :::*                                1060/chronyd
udp6       0      0 :::781                  :::*                                1030/rpcbind

SELinux

[root@mysticpeg ~]# getenforce
Disabled
[root@mysticpeg ~]#

Firewall

firewalld.service   disabled

No iptables installed either

Looks like nothing has been configured

  • ~XVNC is open to the world atm ~

Misread the ipv6 address, it's local only

tcp6   0      0 ::1:5910                :::*                    LISTEN      14681/Xvnc

Virtual Machines

View information on KVM and the Virsh Process here

KVMs are all in /home/vms

drwx--x---+ 24 vms  libvirt 4096 Nov 25 01:55 vms

WebVirManager is installed

Centos iso is in /home/root_iles/

-rw-r--r--  1 qemu qemu 8572108800 Sep 29 14:20 CentOS-Stream-x86_64-dvd1.iso
MYSTIC:/home/vms $ du -hs *
0    backups
4.0K    bin
0    Desktop
0    Documents
0    Downloads
0    Music
0    Pictures
0    Public
0    Templates
0    thinclient_drives
0    Videos
474G    virtimg
4.0K    vm
6.0M    webvirtmgr
MYSTIC:/home/vms $

Configured VMs

VM Use qcow2 Owner Decomm
PoptartsUnknownPoptarts_rz.qcow2Darren
OrvilleDave testbed for migrationOrville_rz.qcow2Dave
CoffeeUnknownCoffee_rz.qcow2<br />Coffee.vmdkDarren
wwwUnknownwww_rz.qcow2Darren

Current VM processes

qemu     10964     1  2  2019 ?   2-22:58:44 /usr/libexec/qemu-kvm -name Poptarts -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,dump-guest-core=off -cpu IvyBridge-IBRS -m 512 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid a8d9e8d4-f66f-41b3-8b27-d1c32a6e9620 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-45-Poptarts/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/home/vms/virtimg/Poptarts_rz.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=27,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:94:c1:be,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-45-Poptarts/org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -global qxl-vga.vgamem_mb=16 -global qxl-vga.max_outputs=1 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -object rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x9 -msg timestamp=on
qemu     17654     1  6  2019 ?        8-15:47:42 /usr/libexec/qemu-kvm -name Orville -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,dump-guest-core=off -cpu IvyBridge-IBRS -m 4604 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid a99c556e-93a8-4e0e-8a9b-aa8f7c88201f -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-44-Orville/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/home/vms/virtimg/Orville_rz.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=31,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:49:8b:a3,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-44-Orville/org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5903,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -global qxl-vga.vgamem_mb=16 -global qxl-vga.max_outputs=1 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -object rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x9 -msg timestamp=on


</file>
==== Autostart(ed|ing) VMs ====
<code>


[root@mysticpeg ~]# systemctl cat qemu-guest-agent.service
# /usr/lib/systemd/system/qemu-guest-agent.service
[Unit]
Description=QEMU Guest Agent
BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
IgnoreOnIsolate=True

[Service]
UMask=0077
EnvironmentFile=/etc/sysconfig/qemu-ga
ExecStart=/usr/bin/qemu-ga \
  --method=virtio-serial \
  --path=/dev/virtio-ports/org.qemu.guest_agent.0 \
  --blacklist=${BLACKLIST_RPC} \
  -F${FSFREEZE_HOOK_PATHNAME}
StandardError=syslog
Restart=always
RestartSec=0

[Install]
WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device

[root@mysticpeg ~]#

VMs look to be built manually then configured for autostart through virsh

[root@mysticpeg ~]# virsh list --all
 Id    Name   State
----------------------------------------------------
 44    Orville                        running
 45    Poptarts                       running
 -     Coffee                         shut off
 -     www                            shut off

[root@mysticpeg ~]#
[root@mysticpeg ~]# virsh list --all --no-autostart
 Id    Name   State
----------------------------------------------------

[root@mysticpeg ~]# virsh list --all --autostart
 Id    Name                           State
----------------------------------------------------
 44    Orville                        running
 45    Poptarts                       running
 -     Coffee                         shut off
 -     www                            shut off

[root@mysticpeg ~]#

Autostart VMs are launched by the libvirt service

[root@mysticpeg ~]# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-08-28 14:16:11 BST; 7 months 1 days ago
     Docs: man:libvirtd(8)
   https://libvirt.org
 Main PID: 1569 (libvirtd)
    Tasks: 18 (limit: 32768)
   CGroup: /system.slice/libvirtd.service
           └─1569 /usr/sbin/libvirtd
[root@mysticpeg ~]# systemctl cat libvirtd.service
# /usr/lib/systemd/system/libvirtd.service
# NB we don't use socket activation. When libvirtd starts it will
# spawn any virtual machines registered for autostart. We want this
# to occur on every boot, regardless of whether any client connects
# to a socket. Thus socket activation doesn't have any benefit

[Unit]
Description=Virtualization daemon
Requires=virtlogd.socket
Requires=virtlockd.socket
Wants=systemd-machined.service
Before=libvirt-guests.service
After=network.target
After=dbus.service
After=iscsid.service
After=apparmor.service
After=local-fs.target
After=remote-fs.target
After=systemd-logind.service
After=systemd-machined.service
Documentation=man:libvirtd(8)
Documentation=https://libvirt.org

[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/libvirtd
ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
# At least 1 FD per guest, often 2 (eg qemu monitor + qemu agent).
# eg if we want to support 4096 guests, we'll typically need 8192 FDs
# If changing this, also consider virtlogd.service & virtlockd.service
# limits which are also related to number of guests
LimitNOFILE=8192
# The cgroups pids controller can limit the number of tasks started by
# the daemon, which can limit the number of domains for some hypervisors.
# A conservative default of 8 tasks per guest results in a TasksMax of
# 32k to support 4096 guests.
TasksMax=32768

[Install]
WantedBy=multi-user.target
Also=virtlockd.socket
Also=virtlogd.socket
[root@mysticpeg ~]#
/var/www/wiki.darrenwindle.co.uk/public_html/data/pages/trac.x0blr.com/notes/mysticpeg.txt · Last modified: 2024/12/01 08:40 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki