VMware Cloud Community
HBBC
Contributor
Contributor
Jump to solution

Bit of a chicken & egg situation with creating first template VM & VC 2

I've just scrapped my first (Dev) ESX setup having learned alot and now configuring it with a "proper" disk setup.

Previously I had VC running in a guest (configured as first VM to start on starting of the host) but I obviously created a VM specifically for it (manually) first time around.

This time, I've scrapped the lot, started afresh and am almost completed creating my first VM which I'd intended using as a "template" VM, deploying the first real machine from it, to use for VirtualCenter.

However, it's just dawned on me that "templates" don't exist until VC is actually installed! I'd rather not go through another install/SP/win-update routine for another VM so what is suggested instead?

One option is to work out the safest way to copy the existing .vhd offline then create a new VM pointing to that VHD and edit as appropriate.

Problem I see with this one is, the only time I ever tried it before I ended up with files in "odd" folder names rather than the "neat" folder structure that is normally created if using templates etc.

Any better suggestions?

Regards,

paul

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Yep, vmkfstools -i is the way to go. Here's how to do it in a bit more detail.

1/Create your "base" Windows VM, fully patched etc.

2/SSH into the ESX server (as a non-root user).

3/Type "su -" and enter your root password to become root. (NB: the minus sign after su is important).

4/ Create a directory for you VC VM with "mkdir /vmfs/volumes/yourvol/yourvcname".

5/ Clone the "base" Windows VMDK using "vmkfstools -i /vmfs/volumes/yourvol/yoursourceVM/yoursourceVM.vmdk /vmfs/volumes/yourvol/yourvcname/yourvcname.vmdk".

6/ Create a new VM using the VI client called "yourvcname", when it comes to adding a disk select "use an existing disk file" and browse to your cloned vmdk file.

7/ Power it on, install VC.

8/ Connect the VI client to VC, register the ESX host.

9/ The "base" Windows VM should still be registered on the ESX server, right click convert to template.

View solution in original post

0 Kudos
4 Replies
HBBC
Contributor
Contributor
Jump to solution

Just to confirm, this is still going to be a "Dev" setup, just with more than one spindle this time and "properly" looked after rather than used & abused as my first setup was!

0 Kudos
VirtualNoitall
Virtuoso
Virtuoso
Jump to solution

Hello,

Once you get your windows virtual machine setup the way you want, and before ou install VC, use vmkfstools -i to create a copy of it.

You could then, once VC is up and running, create a new VM in the VI client, add this existing disk to the VM, and then convert\clone it to a template.

admin
Immortal
Immortal
Jump to solution

Yep, vmkfstools -i is the way to go. Here's how to do it in a bit more detail.

1/Create your "base" Windows VM, fully patched etc.

2/SSH into the ESX server (as a non-root user).

3/Type "su -" and enter your root password to become root. (NB: the minus sign after su is important).

4/ Create a directory for you VC VM with "mkdir /vmfs/volumes/yourvol/yourvcname".

5/ Clone the "base" Windows VMDK using "vmkfstools -i /vmfs/volumes/yourvol/yoursourceVM/yoursourceVM.vmdk /vmfs/volumes/yourvol/yourvcname/yourvcname.vmdk".

6/ Create a new VM using the VI client called "yourvcname", when it comes to adding a disk select "use an existing disk file" and browse to your cloned vmdk file.

7/ Power it on, install VC.

8/ Connect the VI client to VC, register the ESX host.

9/ The "base" Windows VM should still be registered on the ESX server, right click convert to template.

0 Kudos
HBBC
Contributor
Contributor
Jump to solution

Many thanks both - spot on!

Regards,

Paul

0 Kudos