Convert Xen XVA to KVM

Citrix Xen uses a custom virtual appliance format for import/export called “XVA”. it’s basically a strangely crafted tar-file. You don’t need this program to unpack this tar-file, just use your favourite tar unpacker (tar, gtar, bsdtar). Once unpacked you will end up with a lot of different files, ova.xml (which contains the settings for the virtual appliance, think VMware vmx) and a number of folders called Ref:/, this is your disks. Each of these folders contain hundreds of files named 00000000, 00000001 with a accompanying .CHECKSUM file (SHA1). Each file is a 1MB slice of the disk, but some of the files in the sequence will probably be missing this is because XVA do not use compression; instead it will exclude slices of the disk that only contains zeros (are empty). This tool can assemble the disk for you (you will end up with a RAW disk) that can easily be mounted and modified. It can then also split the file again and generate checksum. Once ready, you will probably want to use the “package” command to rebuild the XVA file.

I’m running this conversion into a Debian 11 Server. First thing, you need to install xvz-img package from git repo into Debian server. Let’s install some essential package first-

Read more

Share

Install Proxmox 7 on Debian 12

Install a standard Debian Bookworm, for details consider the Debian installation guide, and configure a static IP.

Note: The Debian installer performs network configuration by IPv6 autoconfiguration and DHCP by default, if available. To force manual network configuration in the UEFI installer, press E and add netcfg/disable_autoconfig=true to the linux command line. For the BIOS installer, select the Help entry and start the installation by typing installgui netcfg/disable_autoconfig=true. For further details, see the Debian installer documentation.

It is recommended to only install the “standard system utilities” and “SSH server” package selection, as Proxmox VE brings its own packages for QEMU and LXC. A desktop environment is not necessary.

Add an /etc/hosts entry for your IP address

The hostname of your machine must be resolvable via /etc/hosts. This means that in /etc/hosts you need one of the following entries for your hostname:

Read more

Share

Fixing Proxmox Delete user failed: cannot update tfa config, following nodes are not up to date:

Please check if all the nodes are on the same package versions: run

pveversion -v

and compare the outputs.

If they’re not matching, you can run

apt update && apt dist-upgrade

To upgrade the nodes. if there’s a kernel upgrade you will also need to reboot the machines. If after the upgrades you still don’t see the same versions of the packages, then maybe you have wrong repositories set up [0]

Share

VNC Client Access on Proxmox KVM guests

Configure VNC Access in the Configuration File

Add a line to the VM’s configuration file /etc/pve/local/qemu-server/<VMID>.conf which specifies the VNC display number as follows (“77” in the example below):

args: -vnc 0.0.0.0:77

If you want to use password protection, add:

args: -vnc 0.0.0.0:77,password=on

The display number can be freely chosen, but each number must occur only once. The VNC service then listens at port 5900+display_number. Note that connections via noVNC use display number 0 and following, therefore it is recommended to use higher numbers in order to avoid conflicts.

You can now connect the VNC client to the host IP address and port as chosen (“5977” in the example above).

Read more

Share

Extreme slow internet speed pfsense over proxmox

For a qemu proxmox guest PFSense acts weriedly with the network speed- it gets extremely slow. So her goes the little tweaks that worked for me-

First, I chose Intel E1000 Interfaces instead VirtIO.

Second, in the PFSense webconsole-

In pfSense GUI, System > Advanced > Networking > Tick on-

  • Disable hardware checksum offload
  • Disable hardware TCP segmentation offload
  • Disable hardware large receive offload
Share

Perfect Proxmox Template with Cloud Image and Cloud Init

Instructions

Choose your Ubuntu Cloud Image. Here in this example will use ubuntu cloud-init image. Download Ubuntu (replace with the url of the one you chose from above)

wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img

Create a new virtual machine

qm create 8000 --memory 2048 --core 2 --name ubuntu-cloud --net0 virtio,bridge=vmbr0

Import the downloaded Ubuntu disk to local-lvm storage

Read more

Share

Proxmox VM auto start VM after found in shutdown state

I was having this strange issue, where a running busy VM stopeed all of a sudden due to high CPU or Memory overload issue. So manually had to start everythime. In order to avoid this, created a small script to start the VM in case if it’s down.

#!/bin/bash

# Set environment
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

su -

if [[ $(qm status 101) = *"status: stopped"* ]];
then
echo `qm start 101`
fi
Share

Force Stop Proxmox LXC

First try to unlock the pct (assuming your troubled container is 101):

pct unlock 101

if it works just stop and start again the vm. if it does’nt work (my case) try to stop with this

lxc-stop --name 101

if it’s does’nt work (my case) you can force stop with kill command

ps ax | grep lxc

then kill the process with your id (101 for me) kill pid (replace pid by the process name). After that you can just launch again you’r vm

Share

Remove Proxmox Subscription Notice

Copy and paste following command to the terminal

(6.1 and up)

sed -i.backup "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

(6.2-11 and up)

sed -i.backup -z "s/res === null || res === undefined || \!res || res\n\t\t\t.false/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

(6.2-12 and up)

Read more

Share