Migrate ESXI to new drive


Recommended Posts

Ok so currently i have a 160gb Normal HDD

It has the latest ESXi installed and has 2 VM's (one around 40gb and one around 8gb) that i need to keep (there are others but i just play with them so dont mind redoing them)

I am getting a 120gb SSD so want to put this in and put ESXi on this along with the 2 VM's

What is the easiest way to do this?

Link to comment
Share on other sites

- Copy the VMs off to another drive\location (using the vsphere client)

- If you use vcenter, create a host profile, save it to another location

- Install new drive

- Install ESXI

- If you use vcenter, apply host profile, bam, config done. Else re-configure host. 

- Copy VMs back to host.

- Turn VMs on.

Aaannndd you're done.

Done this dunno how many times now. 

Link to comment
Share on other sites

ok i dont have vcentre is there any other way to save the host file?

so is it as easy as

backup the VM folder to a backup location

put new drive in

install ESXi and configure it (IP, SSH etc)

copy the VM back to the datastore

turn them on?

 

Link to comment
Share on other sites

I would recommend using this tool if you are doing backups over the network - Veeam Backup Free Edition v8.

However with 2 small VM's you are fine without it... Still I would do a md5 checks after backups are done.

Link to comment
Share on other sites

I'm glad I stalk Jared-. He gives some good advice, and help! I was wondering about this myself.

Couldn't you just use a drive cloning? It was suggested to me on another site when I asked about cloning large space, i.e. 3TB drive to a 6TB Drive.

Link to comment
Share on other sites

Drive cloning is a big no no with VMware.

Do it right.

In the real world, when I need to rebuild a host, I VMotion the active VMs on that host to another, put the empty host into maintenance mode, shutdown, rebuild, spit the host profile onto it, take it out of maintenance, VMotion the VMs back to it. VMware always recommend building the host if new hardware is installed (you typically have multiple hosts). 

Link to comment
Share on other sites

Drive cloning is a big no no with VMware.

Do it right.

In the real world, when I need to rebuild a host, I VMotion the active VMs on that host to another, put the empty host into maintenance mode, shutdown, rebuild, spit the host profile onto it, take it out of maintenance, VMotion the VMs back to it. VMware always recommend building the host if new hardware is installed (you typically have multiple hosts). 

 

I agree with not cloning, generally it's not a good idea for many reasons with VMware.

In this case Jared he doesn't have vCenter for vMotion and I'm assuming he is using the free version.

  1. You can get the full version of Veeam for 30 days, you could back them up with this and then restore them. Or
  2. Shutdown the VM's grab the host profile and SCP them somewhere and then you can SCP them back after the install and install the host profile again.
  3. Complete No.2 but instead of SCP you can use the Datastore browser and just download the VM directories.

There's a few options here.

 

Link to comment
Share on other sites

I was more kinda trying to show that it's best to blow the host away and start again in this case.

He could "Vmotion" his VMs to a USB :p

But you also give good options. I suspect the vphere client is sufficient enough, it doesn't do too bad when the VMs are small. Anything bigger than 500gig I'd look at the options ^.

Link to comment
Share on other sites

Personally I would: Enter maintenance mode, shutdown host, install new SSD with existing HDD, power up, create new datastore on SSD, SSH to server and use the vm copy commands to copy the VMs from the HDD to the SSD, shutdown the server, remove the HDD, power back up, add the moved VMs by using the datastore browser, add them to the startup/shutdown list as needed (no need to reconfigure VMs as settings will be kept) then exit maintenance mode and power up VMs.

Link to comment
Share on other sites

Well, yeah you could just stick the drive in and create a second datastore. He hasn't mentioned if he plans on running multiple drives.

Like, where is the hypervisor installed, on the same drive as the datastore? 

No need for maintenance mode here, maintenance mode is useless with 1 host anyway lol. Plus if you have one drive, you're blowing the system away and starting again. 

Link to comment
Share on other sites

I enter maintenance mode so that when you reboot it doesn't startup the VMs automatically, if you leave it on then you have to wait for them to boot, power them down and then continue.

Link to comment
Share on other sites

Well actually having the VMs boot up automatically is user selective. By default, they don't boot up automatically.

But you're forgetting here, if he's installing a new single drive, and re-installing the OS, there's no maintenance mode, he's re-installing the OS haha. 

But yes, your way does work too. Maintenance mode is usually used in situations where the host is in a farm\cluster, and you want to stop having VMs migrate to the dud host. 

Link to comment
Share on other sites

Drive cloning is a big no no with VMware.

Do it right.

In the real world, when I need to rebuild a host, I VMotion the active VMs on that host to another, put the empty host into maintenance mode, shutdown, rebuild, spit the host profile onto it, take it out of maintenance, VMotion the VMs back to it. VMware always recommend building the host if new hardware is installed (you typically have multiple hosts). 

My old job was having me learn how to use "vmotion". It was going to be my ONLY task, migrating VMs. I was going to be taking tasks from SAs and Network Admins.

Thanks for that extra tidbit! 

Link to comment
Share on other sites

Manually migrating VMs? VMotion has the smarts to do it automatically ;)

But yes, you do also do it manually when the push comes to shove. 

They wanted a DCIT Team Member to handle ALL migration of VMs. We're talking 200+ HP C7000 Chassis's with 5 - 20 VMs per Blade, not to mention it was 3 - 4 C7000 per rack. Anyways, I just need to get a ESX Box already, and start learning this sort of thing. So, when it's time to move onto a new job, I have a few things I can list that I know. :)

So, let me ask this then; why is it a no no? Is it because of the way VMWare saves files? Or is it just frowned upon because of the failure to copy information correctly?


Sorry for being a noob. I don't have anything to do tonight, besides study. Gaming is becoming boring to me.

Link to comment
Share on other sites

Ah yep, gotcha haha. 

No, valid question.

Yes, it's to do with the way VMware partitions the disks, lays out the system files, MBR, etc.. It takes no time to build a single standalone host, really, think about it. Network, time, handful of settings, pretty muuchh done. Most of VMware's customers have multiple hosts, running vcenter, and can afford to migrate VMs off the host while they rebuild it correctly. It's just best practice. This is why you should be using Vcenter because it gives you a ton more management features, ie host profiles. Basically you configure a profile, save it, then spit it to all the other hosts, and bam every host is configured the same. 

What you should be learning in your labs is to use external storage for your VMs, ie datastore via iSCSI. There's a use for your netapp. No one in the real world should be storing their VMs on a datastore that is a partition of the physical disk the hypervisor is installed on. This way, if you want to upgrade the hypervisor (esx version), you dont have to do anything except shutdown your VMs, reinstall OS on host, re-connect your iSCSI targets, import your VMs, and awayyy you go. 

VMotion works with shared storage. It's not the vmdk that's being moved around, more the virtual machine (which is stored in memory) itself. Because it's on shared storage, with multiple paths to each host, it can move around hosts in real time, and can still write to the vmdk which is static on the storage. 

That ^ is where the fun with VMware is at. 

 

Edited by Jared-
Link to comment
Share on other sites

While veem free backup works great..  There are many ways to skin this cat.. One just being an export of the machine and then redeployment.  I do this all the time with my templates, I deploy them - update them, then export them again as my new templates so that when I deploy a play vm be it a clean linux vm or even a windows machine its pretty close to being updated..  Not months and months behind.

You could just copy the files off your datastore be it another datastore or just your workstations hdd, or a share on your network..  You could just put in the new disk and install esxi, then copy your machines over to the new disk and its datastore.

You could just image your hdd to your ssd and then boot that..

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.