www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

[Updated] ZS 3.2.0 Template with VMware Tools pre-installed

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
gordonf



Joined: 26 Feb 2012
Posts: 86

PostPosted: Wed Feb 26, 2014 4:41 pm    Post subject: [Updated] ZS 3.2.0 Template with VMware Tools pre-installed Reply with quote

This is an old post and I removed the old downloads. The 3.2 download is here:

http://www.antiwindowscatalog.com/downloads/ZS32_OVA_Template.zip (570 MB)

[original post]

I successfully installed VMware Tools 9.2.3 to a profile on ZS 3.0.0, and I am trying to export this profile for use by others.

The Installation Manager add-on for ZS 3.0.0 does create a series of volumes on a hard drive, but the OS and core software resides on a CDFS or UDF partition on the disk, which makes it a "Live CD" on hard disk. This means one can't just pre-install VMware Tools to it like one could to a normal Linux installation. But the /Database softlink created when making profiles can contain other things.

This URL contains a backup of the profile I made:

http://www.antiwindowscatalog.com/downloads/zs_ovf_template.zip

(Update 03 March 2014) Restoring this profile does work on a new ZS 3.0.0 installation.

This contains some oddball settings unique to my environment, so you'll need to change the IP, default gateway and DNS forwarder settings to match yours. This is a whole new profile, so it will replace any existing IP, firewall, etc settings. Back up your own profile before installing this one. It also does not contain any new kernel modules, so you'll need to use the Intel E1000 NIC instead of vmxnet2 or vmxnet3.

This was built using the same steps that worked on 1.0 Beta 16, but I had to re-link /etc/modules instead of /lib/modules during the installation.

=====================

If messing with a working profile or rebuilding your profile isn't a good idea, try this OVA (single file OVF) template instead:

http://www.antiwindowscatalog.com/downloads/ZS_OVA_Template.zip

This will not automatically launch VMware Tools however. To launch Tools, restore or create a profile on this ZS installation, then add this line to your profile's Startup/Cron post-boot script:

/DB/vmware-tools/startup/run.sh

WARNING: This messes with a few directories at root, notably /etc, /sbin and /usr, and it breaks switching between or deactivating profiles while VMware Tools is running. To safely manipulate profiles, first remove the run.sh line from your profile's Startup/Cron post-boot script, restart ZS, and then you can manipulate profiles. Re-add the line to any profiles you want to use VMware Tools with.

This is quite experimental. I don't know if this breaks any downloadable modules yet; I think it's OK to disable the startup/cron post-boot line and restart before adding or removing any modules, and then replace it once the modules work.

The whole idea of putting VMware Tools on is to support automatic shutdown in case of host shutdown or restart, and for some monitoring. This installation does not include the vmxnet drivers or anything else really; to do that would require compiling the drivers against the ZS Kernel source. The emulated Intel E1000 NIC works well as long as you don't need anything faster than 1 Gbps.
--


Last edited by gordonf on Thu Oct 02, 2014 12:42 pm; edited 3 times in total
Back to top
View user's profile Send private message
dialbat



Joined: 28 Feb 2014
Posts: 1

PostPosted: Fri Feb 28, 2014 1:56 pm    Post subject: Reply with quote

How can i use it, it's bck file?
Back to top
View user's profile Send private message
gordonf



Joined: 26 Feb 2012
Posts: 86

PostPosted: Fri Feb 28, 2014 4:48 pm    Post subject: Restore to ZS using Profile tool Reply with quote

dialbat wrote:
How can i use it, it's bck file?


Log on to your ZS 3.0.0 web interface and browse to Setup, then Profiles, then select the disk your installation uses for its profiles. For VMware you'll need to have a virtual disk with at least 1 GB free space as the profile appears to take up 856 MB. You then click Restore Profile, and select the BCK file.

Once restored, select the profile you restored and click Activate. It'll then offer to restart the OS. It'll restart with the odd IP and DNS forwarder settings I mentioned, so you'll need to change the IP settings from the console and then the DNS Forwarder setting from the web interface. You'll know it's running that profile when the console says "Profile: OVF Template." Your VMware console should also tell you that the VM has some form of VMware Tools running.

The OVA template might be a better idea than restoring a profile backup.
--
Back to top
View user's profile Send private message
gordonf



Joined: 26 Feb 2012
Posts: 86

PostPosted: Mon Mar 03, 2014 7:34 pm    Post subject: Improved How-to Reply with quote

I managed to migrate a ZS 1.0 Beta 16 profile to the ZS 3.0.0 OVA template, not lose any configuration from the profile, and have the updated VMware Tools (9.2.3) running.

Here's a proper how-to:

1) Download the OVA (single file OVF) template from the first post.

2) If you run VMware Tools on your existing ZS VM router, disable launching it and restart ZS. For instance, on the 1.0 b16 example, browse to Setup, Startup / Cron, pick Post-Boot, and delete or comment-out lines like:

Code:
/DB/vmware-tools/startup/run.sh
or
/Database/vmware-tools/startup/run.sh


3) Make a backup of your profile(s) (Setup, Profiles). If you're backing up logs too, note your profile's size and remember that the template creates a volume that only has 2 GB free disk space.

4) Deploy the OVA template to your VMware installation. OVA templates are supposed to be supported by ESXi 5 or later, and VMware Workstation 8 or later.

5) Modify the deployed VM as needed, by adding network adapters (E1000 only; no vmxnet support here), RAM, disk, etc. Turn off "connected" on the NICs until you get a chance to change IPv4 addresses on them.

6) Power up the new ZS VM you just deployed. Change the NIC IPv4 settings to match your old ZS VM's settings from the ZS console.

7) Turn off "connected" on the old ZS VM NICs and turn on "connected" on the new ZS VM NICs. This will cut you off from your old ZS. Browse to the new ZS admin interface.

8) Log on, browse to Setup, Profiles, and restore your backed-up profile. Activate it, and restart ZS. When it comes back, it should work as your old ZS VM did but VMware Tools will not yet be running. Test your new router to make sure everything's working; especially make sure the NIC names and IPv4 assignments are correct.

9) Now we activate VMware Tools. Browse to Setup, Startup / Cron, then select Post Boot and add this line:

Code:
/DB/vmware-tools/startup/run.sh


Change the status from Disabled to Enabled. Because the Tools folders reside in /DB instead of /Database, this will work for any profile.

10) Finally, Restart ZS once more. Once it restarts, it should work as your previous ZS worked plus have a running VMware Tools. You can test "Shut Down Guest," "Restart Guest," and see its IPv4 addresses in the VM's properties.

That's it.

If you need to free up disk space and your previous profile had a copy of VMware Tools in it, open its console, bring up a shell, and browse your /Database directory. You can delete old copies of vmware-tools, rootfs, and vmware-tools-distrib from there if they exist.

WARNING: The run.sh script re-links two root-level directories: /usr and /sbin, which seems to break switching and deactivating profiles. It might also negatively impact downloaded modules. To safely manipulate profiles, and possibly modules, disable the Startup / Cron post-boot command that launches VMware Tools and restart ZS beforehand. Once you're done, re-enable the command and restart.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group