pfSense Qemu Guest Agent

https://codingpackets.com/blog/pfsense-qemu-guest-agent/

Intro

I use Proxmox for my hypervsior and recently installed pfSense as a firewall. I use the QEMU Guest Agent to get more detailed info about the VM’s that are running in the Proxmox console.

This post shows the process to get the QEMU Guest Agent running on a pfSense firewall.

Software Versions

The following software versions were used in this post.

  • pfSense Community Edition – 2.6.0
  • QEMU Guest Agent – 5.0.1

Install

Install the qemu-guest-agent package.

cmd

pkg install -y qemu-guest-agent

If you get an error “insufficient privileges to install packages”, you need to make sure the default admin account is enabled and you need to log in as admin. You may need to install the sudo package too.

# pkg install sudo

The default sudoers file is located here: /usr/local/etc/sudoers. To edit it and add rules you need to use the visudo command.

$ su -
$ visudo

Then to give a user access to everything as root:

userX ALL=(ALL) ALL

To become root (as userX):

$ sudo -s
-or-
$ sudo -i

Once installed, there is a note on how to setup the agent.

=======================================================
Modify your `/etc/rc.conf` by adding these settings

qemu_guest_agent_enable="YES"
qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"

and run
# service qemu-guest-agent start

For detailed help use `qemu-ga -h`
=======================================================

Configure

I am following the steps in the script here (with slight modifications).

Append to the /etc/rc.conf.local file.

cmd

cat >> /etc/rc.conf.local << EOF
qemu_guest_agent_enable="YES"
qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
#virtio_console_load="YES"
EOF

Create the /usr/local/etc/rc.d/qemu-agent.sh file.

cmd

cat > /usr/local/etc/rc.d/qemu-agent.sh << EOF
#!/bin/sh
sleep 3
service qemu-guest-agent start
EOF

Make the /usr/local/etc/rc.d/qemu-agent.sh file executable.

cmd

chmod +x /usr/local/etc/rc.d/qemu-agent.sh

Start the QEMU Guest Agent service.

cmd

service qemu-guest-agent start

Confirm the QEMU Guest Agent service is running.

cmd

service qemu-guest-agent status

# Output
qemu_guest_agent is running as pid 85066.

Remove Proxmox Subscription Notice (Tested to 7.1-10)

Originally posted here:

To remove the “You do not have a valid subscription for this server” popup message while logging in, run the command bellow. You’ll need to SSH to your Proxmox server or use the node console through the PVE web interface.

  • If you have issues and need to revert changes please check the instructions at the bottom of this page.
  • When you update your Proxmox server and the update includes the proxmox-widget-toolkit package, you’ll need to complete this modification again.
  • This modification works with versions 5.1 and newer, tested up to the version shown in the title.

Run the following one line command and then clear your browser cache (depending on the browser you may need to open a new tab or restart the browser):

sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

 

Manual Steps

Here are alternative step by step instructions so you can understand what the above command is doing:

1. Change to working directory

cd /usr/share/javascript/proxmox-widget-toolkit

2. Make a backup

cp proxmoxlib.js proxmoxlib.js.bak

3. Edit the file

nano proxmoxlib.js

4. Locate the following code
(Use ctrl+w in nano and search for “No valid subscription”)

Ext.Msg.show({
  title: gettext('No valid subscription'),

5. Replace “Ext.Msg.show” with “void”

void({ //Ext.Msg.show({
  title: gettext('No valid subscription'),

6. Restart the Proxmox web service (also be sure to clear your browser cache, depending on the browser you may need to open a new tab or restart the browser)

systemctl restart pveproxy.service

How to uninstall Microsoft Office Product Key

  • Open elevated Command Prompt window
  • Execute command to access Office path
CD "C:\Program Files\Microsoft Office\Office16"
  • Run command to view the last 5 characters of Office product key
cscript ospp.vbs /dstatus
  • Execute command to uninstall Office product key.
cscript ospp.vbs /unpkey:ABCDEX

    Guacamole cannot connect via SSH – FIX

    If you get “SSH handshake failed” when trying to use Guacamole to connect to Ubuntu via SSH, you need to use a workaround:

    In the meantime a workaround is adding “HostKeyAlgorithms +ssh-rsa” to the end of /etc/ssh/sshd_config on the Ubuntu machine and restart sshd. Note: I don’t have an understanding of the security implications of this, so use at your own risk

    The solution was posted here:
    https://www.reddit.com/r/linuxquestions/comments/ued2vq/comment/i736why/?utm_source=share&utm_medium=web2x&context=3

    TPG’s guide to understanding EU261 flight compensation

    https://thepointsguy.com/guide/guide-eu261-flight-compensation/

    How to go from Terminal 2 to Terminal 1 at Munich Airport

    https://www.tripadvisor.com/ShowTopic-g187309-i118-k6252577-How_to_go_from_Terminal_2_to_Terminal_1_at_Munich_Airport-Munich_Upper_Bavaria_Bavaria.html

    It is possible to stay within the transit area and travel between Terminal 1 and 2 if you use the Airport Shuttle Bus. The bus is divided into 2 sections: Schengen and Non Schengen.

    So if you are coming from Terminal 2 Non Schengen, you would take the bus at the H gate (follow the signs for the Shuttle Bus to Terminal 1) and get out at the C08 gate (Non Schengen) in Terminal 1. There you could go to the Atlantic Lounge which is a Priority Pass Lounge.

    The bus runs every 10 minutes.

    Then coming back you go the same way, getting on the bus at gate C08 in Terminal 1, and getting off at Terminal 2 Non Schengen bus stop, from where you go back to the transit area/H gates.

    http://www.munich-airport.de/en/general/faq/umsteigen/index.jsp

    In Terminal 2 you will see signs indicating Airport Shuttle Bus to Terminal 1. Follow the signs and you will reach an area of the Airport where you can see the outside area. Wait there as you cannot go out as the door is locked. The buses come every 10 or 20 minutes. You can see them. The driver will stop when they see you or else wave to them. He has the key for opening the door and then you can board the bus which will take you to Terminal 1. There also the Driver will open the door for you to enter the terminal. Same procedure to be followed for returning to Terminal 2.

    The Munich Airport Centre connects Terminal 1 with Terminal 2, which is a 10 minute walk away. There is also a shuttle service between the terminals which runs every 15 minutes.

    Airport Lounge World

    Original Pixel Phone – The Unlimited Google Photos Uploader