Most Popular in Unix
-
This forum's font looks bad on my new installation
-
Scripting Issue
-
need to know if there are ftp connections in my machine
-
Help a user logon in SUN SOLARIS 10 ?
-
cut words based on the word count of a line
-
How to check if my AIX server has Dual HBA's?
-
Installing bash on AIX 6.1
-
AIX KSH: 0403-029 There is not enough memory available now
-
Bipolar Monkey - A mascot looking for a project
-
EvE Online IGB - PHPBB Interface: PHPBB3 Interface Beta 1
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
Localized Flipboard Content guides available for UK, Ireland, Australia and Canada
A fix for those "Pairing Record Missing" errors
You're the Pundit: iPad 3
Apple removes standard Mac OS X 10.7.3 download due to bugs, offers combined download instead
MPAA Sues LimeWire Back From The Dead
This forum's font looks bad on my new installation
Scripting Issue
need to know if there are ftp connections in my machine
AirServer Lets You Push Airplay Audio To Your Apple Computer [Video]
Dev Juice: How do I autocomplete in Xcode 4?