Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Prompt For A New Hostname on Boot

I’ve been brushing up on a few technologies in my home lab, and have found myself using VMware workstation for some simple tasks that don’t require a whole virtualized environment. Workstation didn’t set the hostname of my Ubuntu 18.xx VMs properly after they booted. Maybe I’m a little spoiled by guest OS customization or missing something, but either way, I needed a way to quickly spin up a whole VM and have it’s hostname set correctly. It’s definitely not the cleanest, and I realize I would be better off using the Workstation Pro REST API, but I’m not there yet.

We can do this pretty easily by adding a script to the /etc/profile.d directory. The script I’m currently using is below:

Just modify your parent image, clone your test VMs, and this will prompt you to set a new hostname the first time you log in.

One thought on “Prompt For A New Hostname on Boot

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright VirtJunkie.com © 2024