| 1 | Adding a new OS disk images to XVM installable as HVMs is quite simple: |
| 2 | simply download a trusted ISO of the os, create the image from it, and add the image to the database. |
| 3 | |
| 4 | note: see http://linux.die.net/ for man pages you don't have installed locally. |
| 5 | |
| 6 | I'll walk through the process with Fedora 14 as an example. |
| 7 | |
| 8 | {{{root@aperture-science:~# wget http://mirrors.mit.edu/fedora/linux/releases/14/Fedora/i386/iso/}}} |
| 9 | |
| 10 | |
| 11 | {{{root@aperture-science:~# du -sh Fedora-14-i386-DVD.iso}}} |
| 12 | |
| 13 | In this case we find that the image is 3.5G, which we need to know to create the logical volume in the volume group named xenvg. |
| 14 | |
| 15 | {{{root@aperture-science:~# lvcreate -n image_fedora-14-i686 -L 3.5G xenvg}}} |
| 16 | |
| 17 | Having created the space in the volume, we now need to place the image in it, reading from the ISO. |
| 18 | |
| 19 | {{{root@aperture-science:~# dd if=Fedora-14-i386-DVD.iso of=/dev/xenvg/image_fedora-14-i686 bs=4M}}} |
| 20 | |
| 21 | and then just clean up the old image |
| 22 | {{{root@aperture-science:~# rm Fedora-14-i386-DVD.iso}}} |
| 23 | |
| 24 | In order to allow users to install a copy of Fedora 14 from the web interface, invirt-web, and consequently invirt-database need to know about it. |
| 25 | We simply enter it into the database using the postgres shell on xvm. |
| 26 | |
| 27 | {{{root@xvm:~# sudo -u postgres psql invirt}}} |
| 28 | |
| 29 | |
| 30 | {{{invirt=# insert into cdroms values ('fedora-14-i686', 'Fedora 14 (i686)', 'fedora', '14/Fedora')}}} |
| 31 | |
| 32 | {{{invirt=# \q}}} |
| 33 | |
| 34 | {{{root@xvm:~# exit}}} |
| 35 | |
| 36 | |
| 37 | |
| 38 | Adding new Autoinstalls is somewhat more complicated. |
| 39 | Someone (quentin?) should fill in what is required to do that. |