 Time here for more systems. We're going to talk about virtual machine migration. We're going to focus on the tool clonezilla. Clonezilla is something that's free open source. I've been using it for a long time. I've cloned a lot of systems with it. And one of the nice things about clonezilla is it has a built-in network stack that allows you to transfer from one source system to a destination system without having to go through and create an image file first. I like this feature because well creating an image file is one step and then decoding the image file and bringing it back over into another system is another step and now you're talking about a lot more time. Doing it this way we're going to do a direct from one network image to another network image and push it right across. So you run clonezilla on the source and destination. Really simple to do and it's going to clone it in really easy one step. I do have a separate video where I dive into using how to convert physical disks using virtual disk disk to VHD. So I do have that video if you're interested in doing it that way and that's out of scope for this particular topic. We want to focus on how we do it with clonezilla and how to make it easy before we dive into all these details. Let's first if you'd like to learn more about me or my company head over to laurancesystem.com. If you'd like to hire a short project there's a hires button right at the top. If you'd like to help keep this channel sponsor free and thank you to everyone who already has there is a join button here for YouTube and a patreon page. Your support is greatly appreciated. If you're looking for deals or discounts on products and services we offer on this channel check out the affiliate links down below. They're in the description of all of our videos including a link to our shirt store. We have a wide variety of shirts that we sell and new designs come out well randomly. So check back frequently and finally our forums. Forums.LauranceSystems.com is where you can have a more in-depth discussion about this video and other tech topics you've seen on this channel. Now back to our content. Now in case you haven't heard of it what is CloneZilla besides a website that looks a little bit dated but I love the simplicity of it when there's no marketing team and it's just a great open source tool and CloneZilla is a partition and disk image cloning program similar to the true image or Norton ghost. Remember those? Those have been well I haven't used those in a while. There's plenty of more modern ones out there and actually this can be done with other tools but this is the free and open source CloneZilla and we're going to use that today and it does work great. CloneZilla Live is suitable for single machine backup and restore. Now I will admit it goes out of scope of this particular talk but yes it does support cloning like they say 40 plus computers simultaneously. It has some cool features for setting up complete servers and cloning and imaging systems. It's got a lot of fun features. We're just going to use the basics of it and use it in the beginner mode but they got some documentation here if you want to use it in some of those other modes or if you want to mass deploy something using CloneZilla. Let's go over here to the download and we're using the testing version 2.70-26. This is the latest as of right now. It's actually had the same interface for quite a while even years ago when I used this. I even though I downloaded this today and this is the latest as of today it's been the same interface for quite a while so that's one thing nice about it if you learn it now it is pretty simple to use later. Now right here virtual box is going to be our source so let's log into this all right and our source is going to be virtual box running a Debian system that I've cloned over and actually before I set this demo up I cloned it from xcp and g to virtual box and now we're going to be taking it from virtual box over to xcp and g and the hypervisor doesn't really matter if you're using hypervvm where I've actually used this all over the place to get virtual machines from where they are to where people want them to be and like I said clone zill is free so it's low hanging fruit to use this one so let's shut this system down actually you show you that it works on the internet too so you ping something uh one down one at one all right works we got it online and everything's up and running so let's shut it down and power it off and now we're going to boot it up off the desk now out of scope of this because it varies from whatever hypervisor you're using is getting the settings right so you can attach an iso in virtual box it's pretty easy go here choose clone zilla there we go there's my clone zilla boot iso actually I should double check make sure I got the boot order correct so go over here to system uh floppy funny but we'll just go with optical and hard disk we want it to boot off of that iso here in virtual box now this is our source so we're going to go ahead and hit start but before we do something of note clone zilla bdi normal 65 gigs that means our destination has to have at least 65 gigs of storage or more now clone zilla doesn't auto expand and have all those fancy options and it natively when we use the basic mode and it's out of scope of this video I just wanted to talk about how to get started if you have another tool that has all the cool auto expand or you can auto expand later by booting again and editing the partitions out of scope of this particular video but it is important to know the destination has to at minimum be the same size bigger is going to be a little bit preferred just in case there's some type of alignment issues that you're running to so at least 70 gigs is what we're going to go with on our destination let's go ahead and start up and look at clone zilla from the source side just go ahead and boot up the live one here all right choose your default keyboard layout I'm fine with us customize as you see fit start clone zilla all right now the shell command that came up first is actually kind of neat one of the things that's going to tell us here is what the shell command is for this menu driven system and why that's important is because you are possibly going to do this more than once and if you are you will want to just know what command is that are going through these menus each time it will actually create the command line you can just go right to the command line and type in the command to set this up and the settings without going through a menu each time if you need to a lot of times it's a one-off and I like the menu driven system because it works really well now we have the image or device device so we can clone from machine to machine locally device to image because we want to put it somewhere or we want to set up remote source this is the bypass creating an image and then importing the image on the other system so we're just going to remote source beginner mode is perfectly fine disk to disk or part to remote now if you want to partition or do you want a disk to disk we're going to go full disk to disk here so disk to remote local disk DHCP static IP works fine too um DHCP service setup so we're going to go ahead and take advantage of it saves me some typing what is the source drive there's only one so it only has one option here uh live dangerously and skip repairing source file system that's fine I knew it booted I know it works we're fine with skipping the check choose what to do when it's finished well we're just going to ask me don't you can tell it's a power off and this is kind of a nice thing if you want to auto power down the vm when you're done but we're just going to say choose but it's one of the options now here's that command I was talking about and you can see it down here this is what we could do to actually run this automatically again if we wanted to and just run it from the command line they built that command for us using this menu press enter it's going to go ahead and check out the disk create the process and get everything prepped in ready here it's got to do its inventory find out what's on here found the device waiting for the machine to connect now they give us the command to use on the other one but don't worry we're just going to use a menu to make life easy so right here the IP address is 192 1683.114 this will allow me to connect to the other system with this IP address and pull all the data over so let's get this out of the way and go over to zen orchestra and create a new virtual machine uh this is debian so we'll choose this don't worry if your exact one's not in there loan zilla demo give it a couple cpu's i'll say four two gigs ram sounds good we've already got the clone zilla over here uh storage and well let's drop it on the true and ask that i was doing some testing on whoops now here's that important part 10 gigs is a default that doesn't seem like enough we'll just put 70 at least the same size or bigger as i said so we've done all the creation here have some cpu's memory etc assigned to it we're gonna hold it and hit create and let it boot off of this all right go over here to console all right same menu options here choose the keyboard leave it at english start clone zilla now this is the remote destination so this is where we're going to be cloning to dhcp is fine it's on the same network perfect now here we go where we have three dot one it recognized that as the dhcp server but three dot one one four is where we want to be so we just type in one four whoops four it okay restore disk restore partition if you don't do the same choice we chose push a disk that means we have to restore a disk if we were doing partition we have to choose partition it doesn't know yet so you have to choose the right one where do you want to land it we only have one drive 75 gig drive we created here press enter to continue all right are you sure you want to do this i feel confident i want to destroy all the data on this drive i just created which has no data on it now on rare occasions on some systems when i moved them it'll ask me to do this twice i don't know why it will not do the changes and i have to restart clone zilla and it works but this time it worked perfectly fine i have seen that in case you're wondering the solution relatively simple rerun clone zilla it's it's rare but sometimes it seems to get stuck on writing on some hypervisors but not with xcp ng it's been some of the other ones xcp ng it seems to work perfectly fine in so there's nothing changing over here but as you can see over here it's working so we're reading from tom's computer this is waiting for target machine connect but it's listening and running through the process right here and i have a 10 gig network connected but obviously there's other limitations between this is a 10 gig network and it's using the same 10 gig connection for the storage for this particular demo lab i have set up so while it may be importing a 10 gig it also has to write 10 gig over that same network interface which will cause a little bit of slowdowns but it's going relatively fast here we'll go ahead and skip ahead to the end all right it's just about finished and i do want to note it does say device size versus space in use it is space aware so it didn't have to transfer fully 62 gigs it only had to transfer the 18 gigs that were actually in use one of the reasons it went a little bit faster that was like a little couple minute process it's going to do some checking to make sure that this is set up properly it's going to confirm that the grub is set up because this was linux it's going to try to use a grub 2 to restore the west double check everything all right and it's back at asking what's we want to do we could rerun start over but we're going to go with power off now we're going to go here make sure hard drive is set to boot go to the disc eject this go to the console start this back up all right hey looks like a success here let's log in while we have success we've completely cloned the same machine but we're not online network unreachable this is one of the challenges you run into right away now with windows obviously it's going to start doing some new hardware detection when you change hypervisors and i will admit too if you are doing this with windows and i mentioned this in my p2v if you have any type of special tools installed for drivers and windows you may want to remove those this generally goes for any operating system if you're going from like vmware remove the vmware tools before you migrate it over to xcpng but let's get into the network settings which is actually pretty easy on linux here i have config dash a show me all the interfaces so eth0 is there but unconfigured if we just go to i have config well we don't have any interfaces we just go to here and etc network and interfaces and it's still looking for enp0s3 which was its name in virtual box so now we just got to type eth0 eth0 i'm going to reboot it real quick obviously someone's screaming i could just have restarted the network stack absolutely i could i like to make sure everything works on boot so we'll reboot real quick but that's it it should come up and have full network capabilities now i have config hey look it's got an ip address it's set to dhcp it got 3.110 so let's go ahead and and we're pinging things and we're back online and the cloning is complete now as far as our virtual box machine it's still sitting here we could actually keep running it again if we want to clone this in more places it just kind of hangs out here but we're going to head and shut it down but once you've kicked it off and you want to leave it as a source on the network you can keep pulling it back from that source if you'd like to that's it doesn't shut this side down once the source has been pulled it still sits there quietly waiting for maybe the next source and as i stated it does have some more advanced features you can get into where i believe it does some multicasting so you can have multiple simultaneous systems cloning across the network there's some neat features that you can do with it that goes above and beyond the scope of this particular video but clonezill is definitely a great tool and it's just an easy way when you have to do these migrations from one hypervisor to another vm migration obviously would take it a lot longer and my video is dives deeper into converting files and you know like i said that has its own challenges and because you have to do one step of conversion then another step of conversion it can be a little bit more challenging when you do it this way you're doing right from one network source to another network source your limitation of course is the speed of that network source but if you got a 10 gig connection we clone the 60 gig system here in only a few minutes so well yeah well 18 gigs use 60 gig drive 18 gigs use i should be very clear on that i know all right and thanks and thank you for making it to the end of the video if you like this video please give it a thumbs up if you'd like to see more content from the channel hit the subscribe button and hit the bell icon if you like youtube to notify you when new videos come out if you'd like to hire us head over to laurancesystems.com fill out our contact page and let us know what we can help you with and what projects you'd like us to work together on if you want to carry on the discussion head over to forums.laurancesystems.com where we can carry on the discussion about this video other videos or other tech topics in general even suggestions for new videos they're accepted right there on our forums which are free also if you like to help the channel out in other ways head over to our affiliate page we have a lot of great tech offers for you and once again thanks for watching and see you next time