[clug] Want to Virtualise an old Debian Potato System

Scott Ferguson scott.ferguson.clug at gmail.com
Wed Oct 9 05:22:33 MDT 2013


On 09/10/13 21:38, Stephen Hodgman wrote:
> Thanks Steve.
>  I just read about Clonezilla today and your solution sounds exactly
> what I need.
> I will try that out in the next few days hopefully.
>
> Stephen Hodgman
> 0407 182 355
> 02 6236 6380
>
> On 9/10/2013 9:27 PM, Steve Barnes wrote:
>>> G'day all,
>>> I have a "legacy" Debian Potato (2.2.19) system with some proprietary
>>> software and iBCS installed. This is way out of date and is being
>>> (slowly) replaced.
>>>
>>> As part of the migration we are getting MS server 2012 systems
>>> installed very soon.
>>> I was thinking of taking advantage of the Hyper V and seeing if I can
>>> get my Debian system installed as a VM.
>>>
>>> Anyone have any experience or recommendations on how to go about
>>> doing this?
>>> Will 2012 Hyper v support this system? It is running on hardware that
>>> is circa 2005
>>> I can get copy of the filesystems and partitions onto a physical
>>> disk.  That is easy.
>>> What I do not understand (among many other things :-) is how to get
>>> that into a VM image that will run.
>>> Any help or advice appreciated.
>>> Thanks,
>> Stephen,
>>
>> Can't comment on HyperV support.
>>
>> Re the filesystem and partition migration, assuming I understand you
>> correctly, I would consider using 2 copies of Clonezilla.
>>
>> Set up your VM under HyperV. Ensure networking is correct/functional.
>>
>> Boot the VM into Clonezilla, set it ready to receive a disk image over
>> the network.
>>
>> Boot your Potato into Clonezilla and follow the on screen prompts to
>> blast the disk image over the network into the waiting VM instance.
>>
>> Reboot and (hopefully) enjoy.
>>
>> Of course, this all assumes HyperV and Clonezilla play nicely together.
>>
>> You could probably achieve a similar outcome using a combination of
>> single user mode/live CD/rescue mode and dd|gzip|nc on both ends...
>>
>> Hope this helps
>>
>> Steve
>>
>>
Just use any live linux to dd an image of the machine (all partitions).
You can either mount cifs/nfs/sshfs or pipe that image through ssh to
another machine. e.g.:-
|dd if=/dev/sda | ssh
<http://wiki.sunnyside.home/wiki/doku.php?id=software:ssh>
someone at somewhere dd of=/home/someone/potato_sda.img| |(optionally use:
bs=4096 conv=sync,notrunc,noerror|)
run from another terminal for progress updates:-
|DD_PID=$(ps -eo pid,comm | awk '$2 == “dd” {print $1}')|
|watch kill -USR1 $DD_PID|
You can use kpartx to mount the partitions in that image if you need

The created image/s are RAW type which can then be converted to the
virtual disk format of your choice for virtualbox/vmware or whatever. e.g.:-


    Convert the image to VDI for VirtualBox

|scott at work:~$ VBoxManage convertdd 4GBKey.img 4GBKey.vdi –format VDI
Converting from raw image file=“4GBKey.img” to file=“4GBKey.vdi”…
Creating dynamic image with size 3998220288 bytes (3813MB)…|

You can also resize those partitions/disks once you've converted it to a
virtualmachine format.

Clonezilla will do it, but it makes the process more complicated. It
doesn't create a single image file, and most vms won't work with that
Clonezilla files so you need to create a virtualmachine then run the
process again in reverse

I also can't comment on HyperV support either, but I've used the dd
method many times with Windoof and Linux physical machines.

Of course, like most tasks, it can be done with rsync too ;)

As it's potato you've only got lilo to worry about, so no UUID hacking
as you will have with later linux - so you can just use tar to just copy
all the files (very fast), then reinstall a boot sector (dd can copy
just the boot sector)

Kind regards


More information about the linux mailing list