clonezilla, partimage, dd, acronis... what is best for p2v ?
-
fdelval
- Posts: 9
- Joined: 16. Dec 2010, 22:23
- Primary OS: Debian Lenny
- VBox Version: OSE Debian
- Guest OSses: windows
clonezilla, partimage, dd, acronis... what is best for p2v ?
Hello all,
First post in the forums, but long time using VB with great results.
Now its time to go further and i would like to virtualize a phisical linux box.
I have been told to use all of those tools explained in the thread subjet, but im not sure, each of them seems to have a weaknesses, and noone seems to really work 100%.
Whats the official p2v tool for VB in order to get a phisical linux?
thank you.
First post in the forums, but long time using VB with great results.
Now its time to go further and i would like to virtualize a phisical linux box.
I have been told to use all of those tools explained in the thread subjet, but im not sure, each of them seems to have a weaknesses, and noone seems to really work 100%.
Whats the official p2v tool for VB in order to get a phisical linux?
thank you.
-
sej7278
- Volunteer
- Posts: 1003
- Joined: 5. Sep 2008, 14:40
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Solaris, Linux, Windows, OS/2, MacOSX, FreeBSD
- Contact:
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
i'd just go with clonezilla, dd is guaranteed to work but it stores unused bytes too, clonezilla can just save the used space on supported partition types (i'm currently restoring a 160gb xp drive and the image is only 9gb).
i wouldn't use acronis - they never truly supported ext3 and will never support ext4 or btrfs; plus you have to use the enterprise version with reiser/jfs/xfs.
i wouldn't use acronis - they never truly supported ext3 and will never support ext4 or btrfs; plus you have to use the enterprise version with reiser/jfs/xfs.
-
fdelval
- Posts: 9
- Joined: 16. Dec 2010, 22:23
- Primary OS: Debian Lenny
- VBox Version: OSE Debian
- Guest OSses: windows
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
im having a bad time with clonezilla and usb.
Everytime i try to restore an image, i get CRC error, i tryed 3 times already, diff USB's and different target image...
i read in the clonezilla FAQ something like if you clone HDA1, you need to restore in HDA1, but im just doing a whole HDD clone... im a little lost with clonezilla tbh
also, i know if i still have to rebuild the init ram after restoring
Everytime i try to restore an image, i get CRC error, i tryed 3 times already, diff USB's and different target image...
i read in the clonezilla FAQ something like if you clone HDA1, you need to restore in HDA1, but im just doing a whole HDD clone... im a little lost with clonezilla tbh
also, i know if i still have to rebuild the init ram after restoring
-
sej7278
- Volunteer
- Posts: 1003
- Joined: 5. Sep 2008, 14:40
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Solaris, Linux, Windows, OS/2, MacOSX, FreeBSD
- Contact:
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
i find the regular clonezilla live based on debian is flakey, the ubuntu maverick one is fine for me though - in fact i just restored a clone of my netbook.
i do it over the network using nfs4 though, not using usb for storage (only to boot from).
but i agree clonezilla is a bit overwhelming, as someone with over a dozen years unix experience, it still frightens me lol!
with any cloning tool, if you're cloning from machines with different disks (size, number, controller etc.) then you usually have to run a rescue cd to fix fstab after you've restored - especially modern linux distro's that use uuid's instead of simply /dev/sda1 etc.
its not easy, but it is possible - i've even cloned an encrypted machine into an unencrypted vm (in fact i now run my host as a guest!) by adding a 2nd virtual drive and dd'ing from the mounted encrypted (i.e. decrypted) to the other drive - even removing the lvm!
i do it over the network using nfs4 though, not using usb for storage (only to boot from).
but i agree clonezilla is a bit overwhelming, as someone with over a dozen years unix experience, it still frightens me lol!
with any cloning tool, if you're cloning from machines with different disks (size, number, controller etc.) then you usually have to run a rescue cd to fix fstab after you've restored - especially modern linux distro's that use uuid's instead of simply /dev/sda1 etc.
its not easy, but it is possible - i've even cloned an encrypted machine into an unencrypted vm (in fact i now run my host as a guest!) by adding a 2nd virtual drive and dd'ing from the mounted encrypted (i.e. decrypted) to the other drive - even removing the lvm!
-
fdelval
- Posts: 9
- Joined: 16. Dec 2010, 22:23
- Primary OS: Debian Lenny
- VBox Version: OSE Debian
- Guest OSses: windows
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
wow, great job with the encrypted one!, its motivating.
I will make a try with the clonezilla based on ubuntu and check.
Meanwhile, i was thinking that fixing the fstab would be only necessary if i clone partitions only, right?
My phisical PC is a 45gb disk with 4 partitios, and the virtual one could use a disk with same 45gb. If i clone the entire disk, what could happen to fstab?
My main worry is the init ram and drivers...
I will make a try with the clonezilla based on ubuntu and check.
Meanwhile, i was thinking that fixing the fstab would be only necessary if i clone partitions only, right?
My phisical PC is a 45gb disk with 4 partitios, and the virtual one could use a disk with same 45gb. If i clone the entire disk, what could happen to fstab?
My main worry is the init ram and drivers...
-
sej7278
- Volunteer
- Posts: 1003
- Joined: 5. Sep 2008, 14:40
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Solaris, Linux, Windows, OS/2, MacOSX, FreeBSD
- Contact:
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
i thought the uuid's in fstab were generated from the hard disk serial or something, but they aren't, so you should be ok.
i think initrd will update itself ok - i only had to fuzz with it to stop it trying to decrypt my already decrypted partitions.
there's also the rsync option - i've rsync'ed a local filesystem to a (running!) remote openvz container before.
been a long time since i've done this i'm afraid, i wish i'd documented it
i think initrd will update itself ok - i only had to fuzz with it to stop it trying to decrypt my already decrypted partitions.
there's also the rsync option - i've rsync'ed a local filesystem to a (running!) remote openvz container before.
been a long time since i've done this i'm afraid, i wish i'd documented it
-
fdelval
- Posts: 9
- Joined: 16. Dec 2010, 22:23
- Primary OS: Debian Lenny
- VBox Version: OSE Debian
- Guest OSses: windows
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
awesome, rsync'd
But did you rsync'd the whole disk? partitions only?
But did you rsync'd the whole disk? partitions only?
-
sej7278
- Volunteer
- Posts: 1003
- Joined: 5. Sep 2008, 14:40
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Solaris, Linux, Windows, OS/2, MacOSX, FreeBSD
- Contact:
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
i did it from a backup of my system, using sudo instead of root ssh, but its easier just using root ssh and doing each directory individually as root on your host (root@guest is the target below):
rsync -azp --progress --delete --numeric-ids /bin/ root@guest:/bin/
rsync -azp --progress --delete --numeric-ids /etc/ root@guest:/etc/
rsync -azp --progress --delete --numeric-ids /home/ root@guest:/home/
rsync -azp --progress --delete --numeric-ids /lib/ root@guest:/lib/
rsync -azp --progress --delete --numeric-ids /root/ root@guest:/root/
rsync -azp --progress --delete --numeric-ids /sbin/ root@guest:/sbin/
rsync -azp --progress --delete --numeric-ids /usr/ root@guest:/usr/
rsync -azp --progress --delete --numeric-ids /var/ root@guest:/var/
essentially don't sync /tmp, /dev or /proc !
when i used this method it was from an ubuntu 8.04 x86 openvz container to another identical-ish container (minimal install). you basically need both machines running, best to stop a many processes as your can first.
usually disclaimer applies, don't blame me if you accidentally delete your host filesystem instead of your guest
also you might want to do /home/ manually if you have a lot of large files in there (e.g. your VDI's!)
oh to answer your question, this is at a filesystem level, not disk/partitions.
rsync -azp --progress --delete --numeric-ids /bin/ root@guest:/bin/
rsync -azp --progress --delete --numeric-ids /etc/ root@guest:/etc/
rsync -azp --progress --delete --numeric-ids /home/ root@guest:/home/
rsync -azp --progress --delete --numeric-ids /lib/ root@guest:/lib/
rsync -azp --progress --delete --numeric-ids /root/ root@guest:/root/
rsync -azp --progress --delete --numeric-ids /sbin/ root@guest:/sbin/
rsync -azp --progress --delete --numeric-ids /usr/ root@guest:/usr/
rsync -azp --progress --delete --numeric-ids /var/ root@guest:/var/
essentially don't sync /tmp, /dev or /proc !
when i used this method it was from an ubuntu 8.04 x86 openvz container to another identical-ish container (minimal install). you basically need both machines running, best to stop a many processes as your can first.
usually disclaimer applies, don't blame me if you accidentally delete your host filesystem instead of your guest
oh to answer your question, this is at a filesystem level, not disk/partitions.
-
fdelval
- Posts: 9
- Joined: 16. Dec 2010, 22:23
- Primary OS: Debian Lenny
- VBox Version: OSE Debian
- Guest OSses: windows
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
EDITED:
problem solved.
I had to format the USB HDD to ext3 in order to make it work.
problem solved.
I had to format the USB HDD to ext3 in order to make it work.
-
fdelval
- Posts: 9
- Joined: 16. Dec 2010, 22:23
- Primary OS: Debian Lenny
- VBox Version: OSE Debian
- Guest OSses: windows
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
oh well i totally restored an 9.10 ubuntu to a virtual machine.
The hardware is TOTALLY different, quadcore Q9550 Vs pentium4, 500gb disk Vs 40gb, 4 gb ram Vs 1gb of different speeds....
I had to do NOTHING, networking works by only configuring the virtualbox networking, and no MBR fixing, no initRAM fixing... nothing...
i am scared about the process being so simple... ?
The hardware is TOTALLY different, quadcore Q9550 Vs pentium4, 500gb disk Vs 40gb, 4 gb ram Vs 1gb of different speeds....
I had to do NOTHING, networking works by only configuring the virtualbox networking, and no MBR fixing, no initRAM fixing... nothing...
i am scared about the process being so simple... ?
-
sej7278
- Volunteer
- Posts: 1003
- Joined: 5. Sep 2008, 14:40
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Solaris, Linux, Windows, OS/2, MacOSX, FreeBSD
- Contact:
Re: clonezilla, partimage, dd, acronis... what is best for p2v ?
weird isn't it - i'm always surprised when i do it, i can't imaging windows coping at all well with it, but linux just sorts itself out.fdelval wrote:oh well i totally restored an 9.10 ubuntu to a virtual machine.
The hardware is TOTALLY different, quadcore Q9550 Vs pentium4, 500gb disk Vs 40gb, 4 gb ram Vs 1gb of different speeds....
I had to do NOTHING, networking works by only configuring the virtualbox networking, and no MBR fixing, no initRAM fixing... nothing...
i am scared about the process being so simple... ?
disk/cpu/ram isn't going to make any difference in a vm.
a little surprised you didn't have to fix /etc/fstab, but these days of using UUID's instead of /dev/sda1 probably make that unnecessary.
not sure why you had to format the usb disk - are you booting clonezilla from it as well as backing up to it?! i just used a 256mb usb stick for clonezilla.