Tuesday, August 17, 2010

Adventures with QEmu

Setting up QEmu with a Windows XP host and a Ubuntu Server guest is the topic for another blog post.

This is the story of what happened when I tried to move it to another directory.

1. Decide that having QEmuManager sitting in your root My Documents folder is ugly and move it to a folder called Applications so it can snuggle up with PuttyPortable and ChromePortable.
2. Move the folder.
3. Start up QemuManager. Receive error stating it is unable to write to the original location.
4. Try to close QemuManager. Receive write error again. Eventually kill process using Task Manager.
5. Sigh; move folder back.
6. Start up QemuManager. Receive error stating it is unable to write to the new location (where it is no longer located).
7. Make "..." face. Repeat steps 4 and 5.
8. Spend a long time poking through the folder and menu options trying to find any path location.
9. Make a backup of your images folder.
10. Delete the application folder.
11. Unzip the original zip file to your preferred location.
12. Add a 'new' VM, only instead of creating a new disk image use your existing one.
13. It works. Cheer.
14. Discover networking no longer works on the Linux server.
15. Reboot a few times and fiddle with network settings. Discover that
16. Google "error while getting interface flags: no such device".
17. Find a post on Ubuntu forum describing similar issue. Descend into config file hell.
18. Follow instructions.
19. Everything works! *knocks on wood*

In summary:

To fix the "unable to write to [location]" error when you've moved Qemu Manager to a new location:
1. Make a copy of your VM image. In my case, it was the .qcow2 file in /Images. Make a note of what VM options you've chosen.
2. Delete the Qemu folder entirely.
3. Unzip qman70.zip to your new location.
4. Copy the image to the new /Images folder
5. Add a new VM in QemuManager, choosing the image file you saved.

To fix the networking problem (caused by the MAC address changing), as discovered by modifiedmind.
1. Locate /etc/udev/rules.d/70-persistent-net.rules. Make a backup, write down the module name (in brackets on the #PCI Device line)
2. Delete the #PCI Device line
3. sudo /etc/init.d/udev restart
4. sudo modprobe -r module
sudo modprobe module

Everything seems to work now.

No comments: