Virtual Machine or Physical Machine Migration With Clonezilla

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
tommy here from lawrence systems we're going to talk about virtual machine migration we're going to focus on the tool clonezilla phonezilla 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 gonna 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 and really easy one step i do have a separate video where i dive into using how to convert physical disk using virtual disk disk to vhd so i do have that video if you're interested in doing it that way 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 lawrences.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.laurensystems.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 mozilla live is suitable for single machine backup and restore now i will admit it goes out of scope with 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 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 learned it now it is pretty simple to use later now right here virtualbox is going to be our source so let's log into this all right and our source is going to be virtualbox running a debian system that i've cloned over and actually before i set this demo up i cloned it from xc png to virtualbox and now we're going to be taking it from virtualbox over to xcpng and the hypervisor doesn't really matter if you're using hyper-v vmware 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 clonezilla's free so it's low-hanging fruit to use this one so let's shut this system down actually show you that it works on the internet too so you ping something uh 1.1.1 all right works we got 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 using is getting the settings right so you can attach an iso in virtualbox it's pretty easy go here choose clonezilla there we go there's my clonezilla boot iso actually i should double check make sure i got the boot order correct so i 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 virtualbox now this is our source so we're going to go ahead and hit start but before we do something of note clonezilla bdi normal 65 gigs that means our destination has to have at least 65 gigs of storage or more now clonezilla doesn't auto expand and have all those fancy options in 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 clonezilla 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 clonezilla all right now the shell command that came up first is actually kind of neat one of the things it'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 instead of 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 in 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 in 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 a partition or do you want a disk this we're going to go fold this to disk here so disk to remote local disk dhcp static ip works fine too um dhcp server setup so i'm 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 gonna 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 gonna say choose but it's one of the options now here's that command i was talking about 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 it 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 and ready here it's gotta 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 the menu to make life easy so right here the ip address is 192.168.3.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 just choose this don't worry if your exact one's not in there alone still a demo give it a couple cpus let's say four two gigs of ram sounds good i've already got the clonezilla over here uh storage well let's drop it on the trueness that i was doing some testing on oops now here's that important part 10 gigs is the 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 cpus memory etc assigned to it we're going to go ahead 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 clonezilla now this is the remote destination so this is where we're going to be cloning two dhcp is fine it's on the same network perfect now here we go where we have 3.1 it recognized that as the dhcp server but 3.114 is where we want to be so we just type in one four whoops four hit 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 clonezilla and it works but this time it worked perfectly fine i have seen that um in case you're wondering the solution relatively simple um rerun clonezilla it's it's rare but sometimes it seems to get stuck on writing on some hypervisors but not with xcpng it's been some of the other ones xcpng 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 that same 10 gig connection for the storage for this particular demo lab i have set up so while it may be importing at 10 gig it also has to write 10 gig over that same network interface which will cause a little bit of slow downs 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 all a 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 the grub 2 to restore the os double check everything all right it's back at asking what 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 the dis eject this go to the console start this back up all right hey looks like success here let's log in while we have success we've completely cloned this 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 windows and i mentioned this in my p2v uh if you have any type of special tools installed for drivers in 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 xe png 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 e0 is there but unconfigured if we just go to ifconfig well we don't have any interfaces we just go to here and etc network and interfaces and it's still looking for enp 0s3 which was its name in virtualbox 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 sets a 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 virtualbox machine it's still sitting here we could actually keep running it again if we wanted to clone this in more places it just kind of hangs out here but we're going ahead 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 um where i believe it does some multicasting so you can have multiple simultaneous systems cloning across the network uh there are some neat features that you can do with it that goes above and beyond the scope of this particular video but clonezilla 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 uh 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 cloned a 60 gig system here in only a few minutes so well yeah well 18 gigs used 60 gig drive 18 gig 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 lawrences.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.lawrences.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'd like to help the channel 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 you
Info
Channel: Lawrence Systems
Views: 30,168
Rating: undefined out of 5
Keywords: lawrencesystems, vm migration, vm migration techniques, vmware, virtual machines, virtual machine, virtualization, hypervisor, vm, migration, linux, private cloud, physical to virtual
Id: wSTk9BLwF5k
Channel Id: undefined
Length: 15min 43sec (943 seconds)
Published: Tue Dec 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.