Most Popular in Unix
-
phpBB Rivals 1.8.1 (Default branch)
-
aix5.3 migration locked on 7026 with 0c46 LED-screen code
-
About the security content of iOS 4.1 for iPhone and iPod touch
-
Calculate the Median, first quartile and third quartile using AWK
-
AIX upgrade
-
iWeb: Comment attachment returns 404 page
-
Boot time driver conflict
-
Script needed...
-
How to Set UP a Server of SNMP
-
Good Coders
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
- Checking Dolly?s Paternity
- Steps to Clone a VMWARE guest on a ZFS NFS share
- The ZFS pipe is clogged
- DeDup will get faster on lowend machines
- Feeling Old yet?
- VMware Lab updates
- GNS3 rocks
- Top 10 things I learned about using a DL380 G3 as a ESXi LAB
- Bad Disk and destroying the pool, back up in less than 5 hours.
- Tieing a stick to a Dell 2716
Most Popular Stories
Pirate Bay Sunk At Last After Europe-Wide Raids?
Apple Confirms Game Center Compatibility: Yes on 2nd-Generation iPod Touch, No on iPhone 3G
The Future of Ad Agencies and Social Media
Apple drops iOS 4.1 this afternoon as new iPods hit the streets
[$] Looking at Fedora 14 and Ubuntu 10.10
'Macworld Mobile' Coming to Mobile World Congress 2011
MIT app turns your Android phone into a supercomputer... of sorts
Retro new iPhone dock has pricey, film noir feel
Games updated for Game Center (soon)
The HyperDrive Is a 750GB Hard Drive That Connects Right To Your iPad [Storage]