Category Archives: Uncloud

Convert Proxmox .raw to HyperV .vhdx

Show raw device names

zfs list 
#example output may look something like this
rpool/data/vm-100-disk-1

Export to file

dd if=/dev/zvol/rpool/data/vm-100-disk-1 of=/file.raw

Convert to HyperV

qemu-img convert -f raw /file.raw -O vhdx -o subformat=dynamic /file.vhdx

Mount file.vhdx on HyperV and start

One liner method:

Forget about the export and feed the raw device directly to qemu-img

qemu-img convert -f raw /dev/zvol/rpool/data/vm-100-disk-1 -O vhdx -o subformat=dynamic /file.vhdx

 

Proxmox ATI GPU Passthrough Guide

After a lot of fiddling around with settings and hardware, I finally have a stable Proxmox 5.1 ATI GPU pass-through system.   What helped me was this helpful article to finally get all the bugs ironed out.   I did have to make several tweaks for my system.   I’m running an Intel system with ATI Radeon GPU.

  1. Ensure VT-d is supported and enabled in the BIOS
  2. Enable IOMMU on the host
    1. append the following to the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub
      intel_iommu=on
    2. Save your changes by running
      update-grub
  3. Blacklist NVIDIA & Nouveau kernel modules so they don’t get loaded at boot
    1. echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
      echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf
      echo "blacklist radeon" >>
      /etc/modprobe.d/blacklist.conf
    2. Save your changes by running
      update-initramfs -u
  4. Add the following lines to /etc/modules
    vfio
    vfio_iommu_type1
    vfio_pci
    vfio_virqfd
  5. Reboot the host
  6. Create your Windows VM using the UEFI bios hardware option (not the deafoult seabios) but do not start it yet.  Use VirtIO.  Modify /etc/pve/qemu-server/<vmid>.conf and ensure the following are in the file. Create / modify existing entries as necessary.
    bios: ovmf
    machine: q35
    cpu: host,hidden=1
    numa: 1
  7. Install Windows
    1. Mount second ISO  (virtio-win*.iso)
    2. Load IO driver from d:\viostore\w10\amd64\viostore.inf
    3. After install be sure to enable Remote desktop.
  8. Pass through the GPU.
    1. Modify /etc/pve/qemu-server/<vmid>.conf and add
      hostpci0: <device address>,x-vga=on,pcie=1. Example

      hostpci0: 01:00,x-vga=on,pcie=1
  9. Passthrough USB keyboard and mouse
    1. I find it best to passthrough specific USB ports rather than device IDs.  That way I can hotplug different devices to specific ports later without having to reboot.
  10. Done.

Troubleshooting

Blue screening when launching certain applications

AMD drivers setup application and/or Windows boot would consistently blue screen on me with the following error:

kmode_exception_not_handled

The fix as outlined here was to create /etc/modprobe.d/kvm.conf and add the parameter “options kvm ignore_msrs=1”

echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf

Update 4/9/18: Blue screening happens to Windows 10 1803 as well with the error

System Thread Exception Not Handled

The fix for this is the same – ignore_msrs=1

Frezing keyboard/mouse:

Device Manager -> Human Interface Devices -> Microsoft Hardware USB Keyboard -> Power Management -> Uncheck “Allow the computer to turn off this device to save power”

Notes:

Other guides require setting up vfio.conf.  With my hardware it was not required.  It’s probably needed for a nVidia card though.

  1. Determine the PCI address of your GPU
    1. Run
      lspci -v

      and look for your card.  Usually 01:00.0 & 01:00.1. You can omit the part after the decimal to include them both in one go – so in that case it would be 01:00

    2. Run lspci -n -s <PCI address> to obtain vendor IDs. Example :
      lspci -n -s 01:00
      01:00.0 0300: 10de:1b81 (rev a1)
      01:00.1 0403: 10de:10f0 (rev a1)
  2. Assign your GPU to vfio driver using the IDs obtained above. Example:
    echo "options vfio-pci ids=10de:1b81,10de:10f0" > /etc/modprobe.d/vfio.conf

Greedy Search Engines – All the same

I fell in love with Google search back when people still used WebCrawler.  But that’s because back then Google was the underdog.   I still like using Google.   Google just works, but once in a while I check out what others are doing because I’m rooting for the next uderdog.  Now that Google is a giant behemoth, making their ads harder to spot, and ratcheting up their tracking, I figured it’s about time to switch.  But where to?

Supposedly Bing is the closest contender.   While I have no love for Microsoft, I was desperate.  So I tried it.   It wasn’t the first time.   I try this once a year or so just to see what’s out there.   Last time I tried Bing was kind of ok except for that giant background picture that slows everything to a crawl when I’m working over remote desktop.   This time I was horrified.  The first screen of results were pure ads.   There wasn’t a single real result until I scrolled down past the first screen.   The bottom of the screen wasn’t any better.  If this is the strategy Microsoft is using to catch up with Google Search then good luck to them – they are screwed.  Or are they?   After all I bet the sheeple who get Bing as default on their Windows 10 don’t notice the tiny little word “ad” beside each of those ads and are just fine whatever they were fed.   After all it was close enough…. and perhaps even helpful.  This is not for me …and that’s why Ad Block Plus exists.

Introducing FreeMyBits.com

FreeMyBits helps you get your data back under your control.

There are many ways your organization can lose control of its precious data. You may have been locked-in by vendor or service provider, you may have outgrown a system or you need to downsize a legacy behemoth, you may have lost a key employee, you may have been hacked or your perhaps obsolescence simply caught up with you.

Whatever the reason is, FreeMyBits helps small and medium business like yours to get control back. Their team consists of specialists with proven enterprise expertise.  FreeMyBits can handle both mainstream systems and obscure legacy contraptions. They succeed where others struggle.

FreeMyBits also provides planning and consulting services to minimize the risk of lock-in.