Editing Running Scratchbox in KVM

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
= Preface =
+
= Running Scratchbox in KVM =
 +
 
 +
== Preface ==
This is currently (mostly) a personal notes page, but you're welcome to edit, comment and make corrections or additions to it. Hopefully (and after some editing) it might become a complete HOWTO guide at some point.
This is currently (mostly) a personal notes page, but you're welcome to edit, comment and make corrections or additions to it. Hopefully (and after some editing) it might become a complete HOWTO guide at some point.
Line 7: Line 9:
I'm also a KVM newbie, so I could be doing some things wrong or in an unnecessarily complicated way. (Being new to this is also the reason why I decided to start writing down what I do; otherwise I'd have no way to backtrack and repeat my steps if I screw up somewhere along the way...)
I'm also a KVM newbie, so I could be doing some things wrong or in an unnecessarily complicated way. (Being new to this is also the reason why I decided to start writing down what I do; otherwise I'd have no way to backtrack and repeat my steps if I screw up somewhere along the way...)
-
== Why run scratchbox in KVM? ==
+
=== Why run scratchbox in KVM? ===
There are several reasons why you might want to do this:
There are several reasons why you might want to do this:
Line 21: Line 23:
* Or using a separate, standalone, non-virtualized installation would of course work too, if you have a machine to spare for that or don't mind rebooting, but that's beside the point of this article.
* Or using a separate, standalone, non-virtualized installation would of course work too, if you have a machine to spare for that or don't mind rebooting, but that's beside the point of this article.
-
= Requirements =
+
== Requirements ==
Firstly, your CPU must support virtualization. This can be checked with:
Firstly, your CPU must support virtualization. This can be checked with:
Line 38: Line 40:
and do rest of your user-privileged setup in that terminal.
and do rest of your user-privileged setup in that terminal.
-
= Installation =
+
== Installation ==
Also refer to [http://www.linux-kvm.org/page/Documents the KVM documentation] and [http://www.linux-kvm.org/page/FAQ FAQ].
Also refer to [http://www.linux-kvm.org/page/Documents the KVM documentation] and [http://www.linux-kvm.org/page/FAQ FAQ].
Line 44: Line 46:
TODO: Check the [http://www.linux-kvm.org/page/Management_Tools Management tools] listed on the KVM pages, to see if there's some better way for the setup. At least [http://sourceforge.net/projects/aqemu/ AQEMU] looks promising.
TODO: Check the [http://www.linux-kvm.org/page/Management_Tools Management tools] listed on the KVM pages, to see if there's some better way for the setup. At least [http://sourceforge.net/projects/aqemu/ AQEMU] looks promising.
-
== Network ==
+
=== Network ===
As we're not setting up a virtual server farm here, you probably won't want to bridge your physical network interface; a virtual network will do just fine.
As we're not setting up a virtual server farm here, you probably won't want to bridge your physical network interface; a virtual network will do just fine.
Line 66: Line 68:
Now we're all set, proceed to:
Now we're all set, proceed to:
-
== Creating the virtual machine, option one ==
+
=== Creating the virtual machine, option one ===
There are at least two ways to initialize the virtual machine. The first one I tried was - if my memory (er, shell history) serves me right:
There are at least two ways to initialize the virtual machine. The first one I tried was - if my memory (er, shell history) serves me right:
Line 78: Line 80:
Also note that you could as well give a path to a bootable ISO image, but I happened to have a Deian-Lenny install CD lying around, so I used that.
Also note that you could as well give a path to a bootable ISO image, but I happened to have a Deian-Lenny install CD lying around, so I used that.
-
== Creating the virtual machine, option two ==
+
=== Creating the virtual machine, option two ===
I actually didn't finish the installation with the above command line, deciding instead to install newer versions of kvm and the tools from unstable - to check if the booting issue would be fixed. It wasn't, but with virt-manager 0.8.0-2 it's possible to create virtual machines through the GUI. (Actually I'm not sure if the version I had from 'testing' might have included that as well, but if it did, I didn't notice. Like said these are my installation notes, please comment or fix if what I'm saying is not correct.)
I actually didn't finish the installation with the above command line, deciding instead to install newer versions of kvm and the tools from unstable - to check if the booting issue would be fixed. It wasn't, but with virt-manager 0.8.0-2 it's possible to create virtual machines through the GUI. (Actually I'm not sure if the version I had from 'testing' might have included that as well, but if it did, I didn't notice. Like said these are my installation notes, please comment or fix if what I'm saying is not correct.)
Line 95: Line 97:
You should now have a working virtual machine installation. Insert the installation cdrom, check that the Boot Device in virt-manager "Details" page is set to CDROM (don't forget to Apply the change if it's not), and proceed to the next step:
You should now have a working virtual machine installation. Insert the installation cdrom, check that the Boot Device in virt-manager "Details" page is set to CDROM (don't forget to Apply the change if it's not), and proceed to the next step:
-
== Installing the OS ==
+
=== Installing the OS ===
There shouldn't be anything special or noteworthy here. Just a plain normal Debian installation (you may need to change the virt-manager Boot Device back to Hard Disk after the installation is complete).
There shouldn't be anything special or noteworthy here. Just a plain normal Debian installation (you may need to change the virt-manager Boot Device back to Hard Disk after the installation is complete).
Line 105: Line 107:
One further question: I chose the default single-partition setup, which also seemed to create swap on the virtual disk. Does that ever make sense, or would it be better to just give the virtual machine "enough" ram and let the host handle swapping? How much would be enough for building stuff in the SDK? How much would be too much (with respect to the physical ram installed on the host)?
One further question: I chose the default single-partition setup, which also seemed to create swap on the virtual disk. Does that ever make sense, or would it be better to just give the virtual machine "enough" ram and let the host handle swapping? How much would be enough for building stuff in the SDK? How much would be too much (with respect to the physical ram installed on the host)?
-
== Installing the SDK ==
+
=== Installing the SDK ===
<s>With the OS in place, there shouldn't be anything unusual about the SDK installation either, but I didn't get that far yet. Up to now I had enough to do just learning to use KVM and working around the various bugs in the virtualization tools, and decided to stop here for today and write those steps down. If someone else has time to continue this before I do, please go ahead :-)</s>
<s>With the OS in place, there shouldn't be anything unusual about the SDK installation either, but I didn't get that far yet. Up to now I had enough to do just learning to use KVM and working around the various bugs in the virtualization tools, and decided to stop here for today and write those steps down. If someone else has time to continue this before I do, please go ahead :-)</s>
Line 111: Line 113:
EDIT: No problems with SDK installation, but didn't have time to continue with this page yet.
EDIT: No problems with SDK installation, but didn't have time to continue with this page yet.
-
== Setting up a network filesystem ==
+
=== Setting up a network filesystem ===
To be able to edit sources on the host side (and not have to replicate my entire emacs setup). Could be done in either direction: sources on host, and exported to vm so scratchbox can access them, or sources on vm and exported to host.
To be able to edit sources on the host side (and not have to replicate my entire emacs setup). Could be done in either direction: sources on host, and exported to vm so scratchbox can access them, or sources on vm and exported to host.
Line 117: Line 119:
TODO, the biggest piece still missing from a fully functional setup. I'm not so familiar with network filesystems, any ideas what's the best way to do this?
TODO, the biggest piece still missing from a fully functional setup. I'm not so familiar with network filesystems, any ideas what's the best way to do this?
-
== Setting up Xephyr ==
+
=== Setting up Xephyr ===
In principle you could install Xephyr either on your host or in the virtual machine. I'm currently running it in the virtual machine over ssh, e.g.
In principle you could install Xephyr either on your host or in the virtual machine. I'm currently running it in the virtual machine over ssh, e.g.
Line 123: Line 125:
and then the usual "export DISPLAY=:2" and "af-sb-init.sh start" in scratchbox.
and then the usual "export DISPLAY=:2" and "af-sb-init.sh start" in scratchbox.
-
== OpenGL with the virtual setup ==
+
=== OpenGL with the virtual setup ===
TODO. Possible?
TODO. Possible?
-
== Finetuning ==
+
=== Finetuning ===
Putting the necessary steps from above into scripts so that the setup is easy to restart after a reboot. Maybe other scripts or tools to make the initial setup easier, or even a ready-to-run SDK image, if some kind person at Nokia or in the community decides to create such things? TODO.
Putting the necessary steps from above into scripts so that the setup is easy to restart after a reboot. Maybe other scripts or tools to make the initial setup easier, or even a ready-to-run SDK image, if some kind person at Nokia or in the community decides to create such things? TODO.

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)