User:Murdos/colinuxmbserver: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
((Imported from MoinMoin))
m (5 revision(s))
 
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:


The CoLinux Virtual [[MusicBrainz]] Server is variant of [[Virtual MusicBrainz Server|VirtualMusicBrainzServer]] using [http://www.colinux.org Cooperative Linux] instead of VMWare to run the virtual machine image provided by MusicBrainz. This image contains a Linux environment fully configured with the latest release of the [[Server]] source code. If you want to experiment with the data, or try hacking on some new features, it is intended to be the fastest way to get up and running.
The CoLinux Virtual [[MusicBrainz]] Server is variant of [[Virtual MusicBrainz Server|VirtualMusicBrainzServer]] using [http://www.colinux.org Cooperative Linux] instead of VMWare to run the virtual machine image provided by MusicBrainz. This image contains a Linux environment fully configured with the latest release of the [[Server]] source code. If you want to experiment with the data, or try hacking on some new features, it is intended to be the fastest way to get up and running.

Why should you use coLinux instead of VMWare?
* It is faster
* It can run as a Windows Service
* However it's more complex to set up


==What's in the Image?==
==What's in the Image?==


See [[Virtual MusicBrainz Server|VirtualMusicBrainzServer]]: we're using the same image.
See [[Virtual MusicBrainz Server|VirtualMusicBrainzServer]]: we'll use the same image.


==Preparation==
==Preparation==
Line 15: Line 20:
===Download the image using the link in VirtualMusicBrainzServer & extract the files===
===Download the image using the link in VirtualMusicBrainzServer & extract the files===


Check the [[Virtual MusicBrainz Server|VirtualMusicBrainzServer]] page to know the last VMWare image adress.
===Convert the virtual disk split in 2Gb files to a single virtual disk===

At the time of writing the URL to download it is [ftp://ftp.musicbrainz.org/pub/musicbrainz/MBServer-20070401-2.tar.bz2 ftp://ftp.musicbrainz.org/pub/musicbrainz/MBServer-20070401-2.tar.bz2].

===Convert the virtual disks split in 2Gb files to single virtual disks===


# Be sure to have VMWare Server installed: you'll need the ''vmware-vdiskmanager'' tool which comes with it
# Be sure to have VMWare Server installed: you'll need the ''vmware-vdiskmanager'' tool which comes with it
Line 21: Line 30:


<pre>vmware-vdiskmanager -r MBServer-Root-000001-cl1.vmdk -t 0 MBServer-Root-000001-cl1-flattened.vmdk
<pre>vmware-vdiskmanager -r MBServer-Root-000001-cl1.vmdk -t 0 MBServer-Root-000001-cl1-flattened.vmdk
vmware-vdiskmanager -r MBServer-DB-000001-cl1.vmdk -t 0 MBServer-DB-000001-cl1-flattened.vmdk
</pre>
</pre>


===Convert the new single virtual disk in VMWare format to QEmu raw format===
===Convert the new single virtual disks in VMWare format to QEmu raw format===


# You need the QEmu ''qemu-img'' tool
# You need the QEmu ''qemu-img'' tool
Line 29: Line 39:


<pre>qemu-img convert MBServer-Root-000001-cl1-flattened.vmdk MBServer-Root.img
<pre>qemu-img convert MBServer-Root-000001-cl1-flattened.vmdk MBServer-Root.img
qemu-img convert MBServer-DB-000001-cl1-flattened.vmdk MBServer-DB.img
</pre>
</pre>


===Convert the QEmu raw virtual disk in coLinux raw format===
===Convert the QEmu raw virtual disks in coLinux raw format===


<small>[http://colinux.wikia.com/wiki/Converting_Distributions#E._If_converting_from_a_QEMU_RAW_virtual_disk_image more info]</small>
# You need a win32 port of ''dd'' provided by [http://sourceforge.net/projects/unxutils unxutils]
# You need a win32 port of ''dd'' provided by [http://sourceforge.net/projects/unxutils unxutils]
# Assuming ''dd'' is in your %PATH%, launch:
# Assuming ''dd'' is in your %PATH%, launch:


<pre>dd if=MBServer-Root.img of=MBServer-Root bs=512 skip=63
<pre>dd if=MBServer-Root.img of=MBServer-Root bs=512 skip=63
dd if=MBServer-DB.img of=MBServer-DB bs=512 skip=63
</pre>
</pre>


==Running the CoLinux Virtual MusicBrainz Server==
==Running the CoLinux Virtual MusicBrainz Server==

You need to include the following in your coLinux XML configuration (for coLinux 0.6.x): <pre><block_device index="0" path="\DosDevices\<PATH_TO_YOUR_VIRTUAL_DISKS>\MBServer-Root" enabled="true" alias="sda1" />
<block_device index="1" path="\DosDevices\<PATH_TO_YOUR_VIRTUAL_DISKS>\MBServer-DB" enabled="true" alias="sdb1" />
<block_device index="2" path="\DosDevices\<PATH_TO_YOUR_VIRTUAL_DISKS>\<A_SWAP_FILE>" enabled="true" alias="sda5" />

<!-- bootparams allows you to pass kernel boot parameters -->
<bootparams>root=/dev/sda1</bootparams>

<memory size="256" />
</pre>

[[Image:Attention.png]] Don't forget the ''alias'' parameters. You also need a swap file - see [http://www.colinux.org http://www.colinux.org] if you don't know how to get one.

You should now be able to start the coLinux daemon.

For the follow-up, see [[Virtual MusicBrainz Server|VirtualMusicBrainzServer]].

==References==

* [http://ian.blenke.com/vmware/vmdk/xen/hvm/qemu Converting a VMWare image to QEMU RAW]
* [http://colinux.wikia.com/wiki/Converting_Distributions#E._If_converting_from_a_QEMU_RAW_virtual_disk_image Converting QEMU RAW virtual disk image for use with coLinux]


[[Category:Development]] [[Category:Server]]
[[Category:Development]] [[Category:Server]]

Latest revision as of 08:52, 15 March 2009

Products > Server > Server development > Server setup > CoLinux MusicBrainz Server

What Is the CoLinux Virtual MusicBrainz Server?

The CoLinux Virtual MusicBrainz Server is variant of VirtualMusicBrainzServer using Cooperative Linux instead of VMWare to run the virtual machine image provided by MusicBrainz. This image contains a Linux environment fully configured with the latest release of the Server source code. If you want to experiment with the data, or try hacking on some new features, it is intended to be the fastest way to get up and running.

Why should you use coLinux instead of VMWare?

  • It is faster
  • It can run as a Windows Service
  • However it's more complex to set up

What's in the Image?

See VirtualMusicBrainzServer: we'll use the same image.

Preparation

You first need to convert the virtual machine image for VMWare to a format adapted for coLinux.

Download the image using the link in VirtualMusicBrainzServer & extract the files

Check the VirtualMusicBrainzServer page to know the last VMWare image adress.

At the time of writing the URL to download it is ftp://ftp.musicbrainz.org/pub/musicbrainz/MBServer-20070401-2.tar.bz2.

Convert the virtual disks split in 2Gb files to single virtual disks

  1. Be sure to have VMWare Server installed: you'll need the vmware-vdiskmanager tool which comes with it
  2. Assuming vmware-vdiskmanager is in your %PATH%, launch:
vmware-vdiskmanager -r MBServer-Root-000001-cl1.vmdk -t 0 MBServer-Root-000001-cl1-flattened.vmdk
vmware-vdiskmanager -r MBServer-DB-000001-cl1.vmdk -t 0 MBServer-DB-000001-cl1-flattened.vmdk

Convert the new single virtual disks in VMWare format to QEmu raw format

  1. You need the QEmu qemu-img tool
  2. Assuming qemu-img is in your %PATH%, launch:
qemu-img convert MBServer-Root-000001-cl1-flattened.vmdk MBServer-Root.img
qemu-img convert MBServer-DB-000001-cl1-flattened.vmdk MBServer-DB.img

Convert the QEmu raw virtual disks in coLinux raw format

  1. You need a win32 port of dd provided by unxutils
  2. Assuming dd is in your %PATH%, launch:
dd if=MBServer-Root.img of=MBServer-Root bs=512 skip=63
dd if=MBServer-DB.img of=MBServer-DB bs=512 skip=63

Running the CoLinux Virtual MusicBrainz Server

You need to include the following in your coLinux XML configuration (for coLinux 0.6.x):

<block_device index="0" path="\DosDevices\<PATH_TO_YOUR_VIRTUAL_DISKS>\MBServer-Root" enabled="true" alias="sda1" />
<block_device index="1" path="\DosDevices\<PATH_TO_YOUR_VIRTUAL_DISKS>\MBServer-DB" enabled="true" alias="sdb1" />
<block_device index="2" path="\DosDevices\<PATH_TO_YOUR_VIRTUAL_DISKS>\<A_SWAP_FILE>" enabled="true" alias="sda5" />

<!-- bootparams allows you to pass kernel boot parameters -->
<bootparams>root=/dev/sda1</bootparams>

<memory size="256" />

Attention.png Don't forget the alias parameters. You also need a swap file - see http://www.colinux.org if you don't know how to get one.

You should now be able to start the coLinux daemon.

For the follow-up, see VirtualMusicBrainzServer.

References