Most Popular in Unix
-
ILOM Sunservice login incorrect
-
Auto putty login and an ebook required
-
zlogin: makeutx failed
-
what is the difference between /etc/mnttab and /etc/vfstab
-
SAN/Solaris: luxadm shows NOT CONNECTED
-
involuntary context switching
-
Jumpstart Error: Unsupported version (3.0).
-
Net Calculator
-
Installing bash on AIX 6.1
-
SFTP check if file exists
Steps to Clone a VMWARE guest on a ZFS NFS share
Today?s task was to create a base image to use for Windows on my ESXi box so I don?t have to sit through windows install everytime I want to play with windows apps. Of course being a starter ESXi system I don?t have vCenter or anything else that provides vMotion. Here are the steps.
Create a ZFS filesystem and share it with root read/write permissions.
Set your favorite zfs options, disable atime, enable compression, etc.
Setup nfs sharing with root privs
zfs set sharenfs=root=@192.168.1/24 tank/esx2 # please make as secure as you wish.
zfs set quota=20g tank/esx2
# unless your cpu is really slow I think compression would be great because all of these
#blocks will be shared among the clones
zfs set compression=on tank/esx2
zfs set atime=no tank/esx2
Go to your ESX(i) box and create a new dataset using the newly created share.
Create a new guest storing everything on the new datastore.
First I installed 2k3 enterprise installed 16GB harddisk ( yes way too big, but if you don?t use the space its basically free, and it?s a pain to run out).
Then I installed all my favorite applications and plugins so I only have to do it once.
Vmware tools
Filezilla
Firefox
Isomagic
Putty
Adobe reader
SNMP ( nice to add this so it?s easier to monitor)
Flash Player
Notepad++
Now configure a few things, so we do it once and don?t have to do it again.
Set hostname to be ?baseimage? or something.
Make sure the guest is set to use dhcp so you don?t have conflicts later
Create user accounts
Configure proxy
Configure web homepage
Configure snmp
Configure ntp
the next steps I?m not sure how necessary they are but I figure I would do them anyway.
Clean up C: drive
DEFRAG DISK
Now poweroff the guest
Login to your OpenSolaris box, take a snapshot of the guest filesystem
zfs snapshot tank/esx2@base_windows_image
zfs clone tank/esx2@base_windows_image tank/new_guest
zfs set sharenfs=root=@192.168.1/24
rename the directory that holds your base image to something related to your next guest, changing the directory name won?t use more than 1 block of space unless you give it a really long name.
Now back to the esxi box and add another datastore with the cloned directory
Create a new guest using custom method, use an existing image
Choose the one on the freshly cloned filesystem
Add/remove hardware as you desire, does anyone use floppy disks anymore?
Boot it up everything should work
Now reset the hostname to what you need it to be.
Give it a static ip if desired.
Customize the guest as you see fit?
Done
Create a ZFS filesystem and share it with root read/write permissions.
Set your favorite zfs options, disable atime, enable compression, etc.
Setup nfs sharing with root privs
zfs set sharenfs=root=@192.168.1/24 tank/esx2 # please make as secure as you wish.
zfs set quota=20g tank/esx2
# unless your cpu is really slow I think compression would be great because all of these
#blocks will be shared among the clones
zfs set compression=on tank/esx2
zfs set atime=no tank/esx2
Go to your ESX(i) box and create a new dataset using the newly created share.
Create a new guest storing everything on the new datastore.
First I installed 2k3 enterprise installed 16GB harddisk ( yes way too big, but if you don?t use the space its basically free, and it?s a pain to run out).
Then I installed all my favorite applications and plugins so I only have to do it once.
Vmware tools
Filezilla
Firefox
Isomagic
Putty
Adobe reader
SNMP ( nice to add this so it?s easier to monitor)
Flash Player
Notepad++
Now configure a few things, so we do it once and don?t have to do it again.
Set hostname to be ?baseimage? or something.
Make sure the guest is set to use dhcp so you don?t have conflicts later
Create user accounts
Configure proxy
Configure web homepage
Configure snmp
Configure ntp
the next steps I?m not sure how necessary they are but I figure I would do them anyway.
Clean up C: drive
DEFRAG DISK
Now poweroff the guest
Login to your OpenSolaris box, take a snapshot of the guest filesystem
zfs snapshot tank/esx2@base_windows_image
zfs clone tank/esx2@base_windows_image tank/new_guest
zfs set sharenfs=root=@192.168.1/24
rename the directory that holds your base image to something related to your next guest, changing the directory name won?t use more than 1 block of space unless you give it a really long name.
Now back to the esxi box and add another datastore with the cloned directory
Create a new guest using custom method, use an existing image
Choose the one on the freshly cloned filesystem
Add/remove hardware as you desire, does anyone use floppy disks anymore?
Boot it up everything should work
Now reset the hostname to what you need it to be.
Give it a static ip if desired.
Customize the guest as you see fit?
Done
More Stories in Unix Admin Corner
Most Popular Stories
A fix for those "Pairing Record Missing" errors
ILOM Sunservice login incorrect
Auto putty login and an ebook required
zlogin: makeutx failed
Innovation isn't dead, it just moved to the cloud
Diablo 3 Slow on Mac? Here is a Solution
Planning Board Rendering Unveils New Glass-Enclosed Apple Store for Stanford
7 Online Resources To Trace The History Of Your House
Daily iPhone App: Elenints matches Triple Town's planning with a few new tricks
Meet Heckerty, well-known British children's story, makes its way to the iPad