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

    How to use the Oracle Cloud free offer and create an Ubuntu Cloud VPS PC on Oracle Cloud using xRDP

    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

    Кой е гръцкият остров на козите и хипитата, който се нуждае от „млади крака”

    https://trip.dir.bg/patevoditel/koy-e-gratskiyat-ostrov-na-kozite-i-hipitata-koyto-se-nuzhdae-ot-mladi-kraka

    Петте най-добри пътешествия с автомобил в Гърция

    https://trip.dir.bg/patevoditel/pette-nay-dobri-pateshestviya-s-avtomobil-v-gartsiya