Saturday, 14 May 2016

Importing OVA container into Proxmox (Step-by-Step)

10:32 Posted by Jurgens Krause , , , 9 comments
OVAs are an industry standard, and many appliances are distributed as such. Unfortunately Proxmox does not yet support OVA importing in an easy, user friendly way.

After downloading the OVA you will need to get it on to your server. My preferred way is by using WinSCP, if you are using Linux or OSX, you can use command line scp to do the transfer.



  1. Start up WinSCP and select "SCP" as the file protocol.
  2. Enter the Host name, User name and Password for your Proxmox server.
  3. Click yes
  4. At the security key warning, click "Yes"
  1. In the right hand pane, navigate to /tmp 
  2. Drag and drop the file you want to upload into the tmp folder
Depending on your network and the file size, this step may take a while.

Once the file has been uploaded, connect to the Proxmox server using Putty or your favourite ssh client.

Change into the /tmp directory:
cd /tmp

Extract the OVA file:
tar -xvf *.ova

This should output a couple of files from the OVA container, it should include an OVF file, which is the VM Defenition file, and a VMDK file, which is the actual hard disk image. Again, this may take a while.

Convert the vmdk to a Proxmox compatible qcow2 file:
qemu-img convert -f vmdk RADIUSdesk-2016-4-0-disk1.vmdk  -O qcow2 qcowdisk.qcow2

Run the following command, substituting the correct ovf filename, to get the vm settings:
cat RADIUSdesk-2016-4-0.ovf | grep -e "Memory RAMSize" -e "CPU count" -e "Netw" -e "Disk"

Using the settings from the above command, set up a new VM using the Proxmox web interface, you can make a tiny hard drive, since we will overwrite it.

Run the following command to overwrite the newly created disk image with the one we converted earlier. Remember to substitute the correct filenames:
mv qcowdisk.qcow2 /var/lib/vz/images/115/vm-115-disk-1.qcow2

You can now start the new VM with the imported disk image.

Lastly, remove all the files we created in temp by using "rm filename" for each file.

Job done!!

Friday, 29 January 2016

Tuesday, 12 January 2016

Linux Directory Copy

07:53 Posted by Jurgens Krause , , , , No comments
Easy to use, easy to forget

Copy directory and subdirectories
The -R flag is to signal a recursive copy

cp -R source-dir dst-dir

Note that this will place source-dir/* in dst-dir. If you want to place source-dir/* in dst-dir/source-dir/* you must use the following command:

mkdir /dst-dir/source-dir
cp -R source-dir dst-dir/source-dir

If you want to move all directories to sub-directory, in case you used the wrong command above, use the following:

mv !(subdir) subdir


Thursday, 7 January 2016

Lenovo Energy Management - (Plugged in, not charging) Solved

The last time I reinstalled my Lenovo Y50-70 with Windows 10  64-bit, I ran into the following problem:


The laptop is plugged in, but the battery is not charging beyond 60%.

This is due to the fact that I had enabled "Conservation Mode" in the Lenovo Energy Manager in the previous Windows 8.1 installation. The problem is that the Energy Manager is not available under Windows 10.

To fix the problem:

  1. Navigate to the drivers page for your notebook on the Lenovo Website.
  2. Select "Power Management" as the component
  3. Select Windows 8.1 as your Operating System
  4. Download and install the driver

The software should install without issue, at least in my experience.

Open the Lenovo Energy Manager, you will see that the current status is "Conservation Mode" this causes the battery not to be charged full in order to prolong the battery life expectancy



Click on the menu button in the top right corner, and navigate to the "Settings" tab.

On the settings tab, disable conservation mode:

Your battery should now charge to 100%