VMware Cloud Community
Bastian82
Contributor
Contributor
Jump to solution

Making template from VM and restoring data

Hi,

I got a question about one thing which i have to make sure before i go foward with seting up system. I got VM and it has 2 VirtualDisks: Virtualdisk_1 (20GB) and Virtualdisk_2(400GB). Virtualdisk_1 is for plain, full configured system (/,/boot,/dev,/var,/usr .. etc.) and Virtualdisk_2 is for user data. So i want to make partition /home on Virtualdisk_2. Anyway, i olso planning to copy ready, fully configured VM as my template VM is case i have to setup everything again very quickly. The problem is i dont like to keep 420GB (2 both virtualdisks) as my template. I would like to keep only 20GB template (saving only Virtualdisk_1). Is it possible to recover VM from template if i delete Virtualdisk_2 with /home partition and then somehow create new Virtualdisk_2 and set /home partition there? Or maybe i have to keep all virtualdiskcs files if previously i set /home partition on one of it. If the second option is the only which should i consider, i probably will use virtualdisk_2 as data disk and will use soft link to /home keeped on Virtualdisk_1 but i want to know what option i have.

Thanks in advance

Reply
0 Kudos
1 Solution

Accepted Solutions
weinstein5
Immortal
Immortal
Jump to solution

If I understand you correctly - yes you can have template of your machine that contains only the disk 1 and deploy form template and then add a brand new disk2 - and then restore the user data to that disk2

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

View solution in original post

Reply
0 Kudos
12 Replies
weinstein5
Immortal
Immortal
Jump to solution

If I understand you correctly - yes you can have template of your machine that contains only the disk 1 and deploy form template and then add a brand new disk2 - and then restore the user data to that disk2

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
Bastian82
Contributor
Contributor
Jump to solution

Ok, nice to hear.

The problem is when i delete Virtualdisk_2 with partition /home on it and in case i have to restore system from template, how to set again /home partition on new Virtualdisk_2 and set it in /etc/fstab. Recovered system from template won't start becouse /home partition is missing

Reply
0 Kudos
patrickds
Expert
Expert
Jump to solution

This is more of a Guest OS issue than a Vmware issue.

For the Vmware host system, starting up your VM without its data disk present is no problem.

The question is: how does your guest OS react when it cannot mount the /home partition.

I don't think /home is really critical for getting any linux-type OS to boot, so you should be fine.

After restoring the template, you can attach a new data disk, mount it as /home and restore the data, or reattach the original disk if it's not lost.

Bastian82
Contributor
Contributor
Jump to solution

Great. Thank you.

Reply
0 Kudos
Bastian82
Contributor
Contributor
Jump to solution

Hello again,

I wish to ask you guys about one thing. As i wrote earlier in this topic. Im running ESXi4.1 free licence and managing VM by VSphere Client. As far as i read in documentation i cannot make templates for VM because I need to have vCenter Server licence for that. So the only way is to copy disk file of VM and store it in save place. It works as template for me. And it would be ok, but during copying the disk file i have to shutdown VM, otherway copying fail. Is there any other way to make such template in free licence ? Or only way is to upgrade licence for Vcenter Server? Additionaly, i would like to ask if vSphere for small business have that possibilities? As far as i know vsphere is not bare metal ? Im a bit confised in all solutions vmware have. Thanks for reply

Reply
0 Kudos
patrickds
Expert
Expert
Jump to solution

Templates require a license for your ESXi host and Vcenter.

The host license can be any version (except for the free one), essentials also has templates.

Vcenter requires a separate license, and is a software you install in a Windows machine, either physical or virtual.

Contact a local reseller for pricing, you might be cheaper off buying an Acceleration Kit bundle, containing licenses for up to 3 ESX(i) hosts and Vcenter, than buying separate licenses for 1 host and Vcenter.

When creating templates through Vcenter, you should also shut down your VM prior to cloning it to a template, or you risk creating a template that is in an inconsistent state.

weinstein5
Immortal
Immortal
Jump to solution

Just to make sure it is clear templates are a feature of vCeneter and vCenter requires a non-free license for the esx/esxi hosts

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
Bastian82
Contributor
Contributor
Jump to solution

Thanks for reply.

vSphere is not bare metal hipervisor , am i right ?

Reply
0 Kudos
patrickds
Expert
Expert
Jump to solution

Vsphere is the name for the entire Vmware infrastructure, made up of ESX hosts and Vcenter.

The ESX(i) system is a baremetal hypervisor.

Vcenter is a Windows service that enables advanced management features.

Reply
0 Kudos
Bastian82
Contributor
Contributor
Jump to solution

Ok, so what is vSphere 4 ?

Reply
0 Kudos
patrickds
Expert
Expert
Jump to solution

Like I said: Vsphere is not a product in itself, but is the complete environment built up of ESX(i) hosts and Vcenter.

Vsphere is a concept, not an actual product.

'Vsphere 4' indicates that the current version is 4 (version of ESX) , the previous version was called 'Virtual Infrastructure 3.5', the ESX hosts being ESX 3.5

Reply
0 Kudos
Bastian82
Contributor
Contributor
Jump to solution

That explains much. Thanks.

Reply
0 Kudos