Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Monday, April 13, 2015

Making your Windows KVM guest boxes fly with VirtIO



In order to extract the maximum performance out of a Windows guest OS on KVM / qemu you should install VirtIO.

What is virtio?

There are quite a few articles about it but basically it is like the VMWare Tools for KVM. It is a bunch of libraries that basically speed up your guest OS by making it more efficient to communicate with the host.

What speed ups are we talking about? Mainly disk I/O and network. Without Virtio drivers installed your Windows guest will feel like molasses. Or more like the difference between traditional hard drives and SSDs. It will still work but you won't like it.

What tripped me up about install the drivers was that everywhere I looked it said to download them from the Fedora project here: http://alt.fedoraproject.org/pub/alt/virtio-win/stable/.

The problem is I was using Ubuntu so while you can install the drivers it just blue screens on you with a giant STOP error. Basically I was using the wrong drivers.

I am on Ubuntu 14.04 LTS so what I really wanted was this: https://launchpad.net/kvm-guest-drivers-windows/+download


The overall technique is setup a device that uses virtio in the libvirt configuration file for your guest. This is an xml configuration file you access by typing virsh and then "edit <name>".

After you do this you will want to specify a specific network card or disk that has type="virtio". This will cause Windows to detect a new type of device in Device Manager. You then update the driver by using the downloads found on launchpad.

If you are lucky you will see the following:


Both should say "packaged by Canonical". These are the major drivers you will want. The other is a serial driver and then a balloon driver. The balloon driver is for dynamic memory management.

If you are wondering why you don't need to install these drivers on Linux guests it is because linux guests have it compiled into the kernel by default.



Tuesday, May 12, 2009

Ubuntu: Getting files off your phone using bluetooth

Sometimes you just want to get a file off your phone. One of the easiest ways to do this is bluetooth. The problem is that some carriers (such as Verizon) lock their phones down so you can't transfer files from your phone to your PC over bluetooth.

The real technicality is that while the phone can't initiate the sending of the file, you can still browse the phone for files and pull them.

So far the most useful tool I found to get files off my phone (which is an LG Chocolate) is obexftp.

To get started install the package using Synaptic then open up a console and type:

$ obexftp -b

When you find a device you want you connect to it like so:

$ obexftp -b 00:1E:75:ED:62:2C -l
Browsing 00:1E:75:ED:62:2C ...
Channel: 7
Connecting...done
Receiving "(null)"...
done
Disconnecting...done

The way obexftp works is that you basically have to run the command over and over with different options to get what you want. So after running it with this "list" option I say I want to browse the folder "MyPictures".

$ obexftp -b 00:1E:75:ED:62:2C -c MyPictures -l
Browsing 00:1E:75:ED:62:2C ...
Channel: 7
Connecting...done
Sending "MyPictures"... done
Receiving "(null)"...
done
Disconnecting...done

Now that I know the location of the file I can procede to actually get the file.

$ obexftp -b 00:1E:75:ED:62:2C -c MyPictures -g 0512091207.jpg
Browsing 00:1E:75:ED:62:2C ...
Channel: 7
Connecting...done
Sending "MyPictures"... done
Receiving "0512091207.jpg"...|done
Disconnecting...done

Easy enough. Probably not the most intuitive way to do things but it gets the job done.