How to fix HostID after OS upgrade

Hi I updated FreeBSD on a droplet (11.3 -> 12.1) and after rebooting my droplet become unavailable because of missed network config. In the /etc/rc.conf I found the following (in the Digital Ocean dynamic section):

ifconfig_vtnet0="inet  netmask "

After fixing the gateway and IP/mask with actual values - everything works well. At least until next reboot. In the boot log (dmesg -a) I found the following:

DigitalOcean: current hostID **adbd6c77-xxx...**
DigitalOcean: expected hostID **d050c92d-yyy...**
DigitalOcean: resizing the disk...
vtbd0 recovering is not needed
vtbd0p3 resized
growfs: cannot find special device for /dev/gpt/rootfs
DigitalOcean: no need to resize rootfs
DigitalOcean: mount configdrive
could not determine starting sector, using very first session
DigitalOcean: applying droplet configuration
DigitalOcean: reading meta-data
eval: /usr/local/bin/jq: not found
DigitalOcean: hostname is set in /etc/rc.conf, skipping setting hostname
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding public IPv4 configuration
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding anchor ipv4 configuration
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding private IPv4 configration
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding IPv6 configuration
DigitalOcean: finished droplet configuration
DigitalOcean: re-starting networking
lo0: link state changed to UP
ifconfig: 'netmask' requires argument
ifconfig: 'prefixlen' requires argument
vtnet0: link state changed to UP
ifconfig: alias: bad value

So I suppose the reason is in broken hostID - the DO VM-host cannot set proper network config in /etc/rc.conf for droplet because of incorrect hostID. What should I do to fix this?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi there @Selin,

I think that the problem is that the jq command is missing and this is why you are getting the Bad values error.

You need to install the jq command. On FreeBSD you could do that with:

pkg install jq 

For any other operating systems you can take a look at the official documentation here:

For more on how the jq command works you can take a look at this tutorial here on how to work with jq.

Hope that this helps! Regards, Bobby

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.