Discussion:
[Astlinux-users] Handy tool to convert DD images to VMWARE/VMDK virtual machines
Brian Barr
2012-01-22 23:50:56 UTC
Permalink
Came across this out there:

http://sourceforge.net/projects/raw2vmdk/

Its a command line java applet for converting raw "dd" type disk images to .vmdk files for use with vmware.

Very useful for testing Astlinux on your everyday machine.

Using this tool, I was able to generate a virtual machine of a recent astlinux release usable on my mac under vmware fusion.

Usage:

java -Dtype=<ide|buslogic|lsilogic|legacyESX> -jar raw2vmdk.jar <raw image> <vmdk outfile>

Example:

***@zaptop:~/raw2vmdk-0.1.jar$ java -jar raw2vmdk.jar "/media/disk-2/VM/FreeBSD 8.0 Minimal/freebsd8min.img" /home/zapotek/freebsd8min.vmdk
raw2vmdk 0.1.3.1 [$Rev: 28 $] initiated.
Author: Zapotek <***@segfault.gr>
Website: http://www.segfault.gr

Analysing image:
/media/disk-2/VM/FreeBSD 8.0 Minimal/freebsd8min.img [1073741824 bytes]

Number of sectors: 2097152
Number of cylinders: 1023
Heads per track: 16
Sectors per track: 63

Loading VMDK template...
Writing VMDK file to: /home/zapotek/freebsd8min.vmdk
All done.


-Brian
Lonnie Abelbeck
2012-01-23 03:04:23 UTC
Permalink
Hi Brain,

Thanks for the tip. Certainly running AstLinux in a VM can be quite useful.

Another method is to use VBoxManage from VirtualBox:

$ VBoxManage convertfromraw -format VMDK astlinux-1.0.1-asterisk-1.8.8.1.img astlinux-1.0.1.vmdk

For fun, I tried this myself, using Mac OS X, and VMware Fusion:

======================
Main VirtualBox Downloads:
https://www.virtualbox.org/wiki/Downloads

For Mac OS:
http://download.virtualbox.org/virtualbox/4.1.8/VirtualBox-4.1.8-75467-OSX.dmg

Either install VirtualBox as normal, or only install the minimum necessary for "VBoxManage" as I did...

Open "VirtualBox-4.1.8-75467-OSX.dmg" to mount "VirtualBox" drive.

Right-Click "VirtualBox.mpkg" and select "Show Package Contents"

Then navigate to: Contents -> Packages

Then install both: VirtualBox.pkg and VirtualBoxCLI.pkg

Then from OS X Terminal, type...

$ VBoxManage convertfromraw
--
Oracle VM VirtualBox Command Line Management Interface Version 4.1.8
(C) 2005-2011 Oracle Corporation
All rights reserved.

Usage:

VBoxManage convertfromraw <filename> <outputfile>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--uuid <uuid>
VBoxManage convertfromraw stdin <outputfile> <bytes>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--uuid <uuid>
--
The "VBoxManage" command is ready to roll, so download AstLinux 1.0.1-Asterisk-1.8.8.1 "Generic i586" (use the latest)

http://mirror.astlinux.org/downloads/img/geni586/astlinux-1.0.1-asterisk-1.8.8.1.img.gz

Then unzip it...

$ gunzip astlinux-1.0.1-asterisk-1.8.8.1.img.gz

$ VBoxManage convertfromraw -format VMDK astlinux-1.0.1-asterisk-1.8.8.1.img astlinux-1.0.1.vmdk
Converting from raw image file="astlinux-1.0.1-asterisk-1.8.8.1.img" to file="astlinux-1.0.1.vmdk"...
Creating dynamic image with size 268369920 bytes (256MB)...

Now we are ready to create a new VM in VMware, use the "astlinux-1.0.1.vmdk", Linux, "Other Linux 2.6.x kernel"

Then make some Settings changes...

Network: Connect directly to the physical network (Bridged)

Processors & RAM: 2 processor cores (for fun) and 512MB RAM

Hard Disk: Disk size: increase to 2.00 GB and check Pre-allocate disk space (optional), then click Apply.

The rest of the defaults should be OK.

Start the AstLinux VM, it should boot quite quickly...

Using Safari or Firefox navigate to "https://pbx.local/setup.php", follow the instructions for a new install...

http://doc.astlinux.org/userdoc:new-install

Configure as normal. You may find enabling the new Network -> Network Services: -> CLI Proxy Server: [ enabled ] and enable the CLI tab via the Prefs tab handy for the CLI console with a scrollback buffer, or SSH in via the Terminal.

Possibly VirtualBox could be used as easily as VMware, I'm not sure how the Settings changes for the bridged network and increasing the disk size would be performed, maybe someone wants to document that. I regularly use VMware Fusion on OS X, so I used it as the example.

Lonnie
Post by Brian Barr
http://sourceforge.net/projects/raw2vmdk/
Its a command line java applet for converting raw "dd" type disk images to .vmdk files for use with vmware.
Very useful for testing Astlinux on your everyday machine.
Using this tool, I was able to generate a virtual machine of a recent astlinux release usable on my mac under vmware fusion.
java -Dtype=<ide|buslogic|lsilogic|legacyESX> -jar raw2vmdk.jar <raw image> <vmdk outfile>
raw2vmdk 0.1.3.1 [$Rev: 28 $] initiated.
Website: http://www.segfault.gr
/media/disk-2/VM/FreeBSD 8.0 Minimal/freebsd8min.img [1073741824 bytes]
Number of sectors: 2097152
Number of cylinders: 1023
Heads per track: 16
Sectors per track: 63
Loading VMDK template...
Writing VMDK file to: /home/zapotek/freebsd8min.vmdk
All done.
-Brian
Ionel Chila
2012-01-25 04:18:35 UTC
Permalink
This a bit OT but this community has been very very good to me so I will give it a try. I recently installed TDM410 card with 1x fxs & 3x fox ports and I need to move my recent config to that new environment.  Can anyone please share some real examples of their extensions.conf file in relation with the dahdi-channels.conf, or point me to some good working examples? Basically I need to configure to receive and make phone calls throughout this new setup. Please contact me privately if you wish, or publicly is fine as well.

Thanks a bunch in advance

Loading...