bhyve vm gets random hostname

I have a VM named fortress.crystalforest this is within DNS and has PTR records too.
nslookup from any of my other hosts come back with the valid answer.

hostname="fortress.crystalforest" is also set within rc.conf.

The funky bit,
Host: FreeBSD11
This is FBSD11 running as an bhyve vm. upon reboot it seems to be randomly choosing a random DNS record, not its own. This VM does host jails and I know I can run jails on the host, but I don't want to.

sky@host:~ % nslookup  name = fortress.fortress.  name = fortress.crystalforest.

sky@host:~ % ssh
Password for sky@web_php.crystalforest:

sky@web_php:~ % ifconfig
vtnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:0b:0e:74
        inet netmask 0xffff0000 broadcast
        media: Ethernet 10Gbase-T <full-duplex>
        status: active

sky@web_php:~ % nslookup  name = fortress.crystalforest.  name = fortress.fortress.

Whats even more strange, I dont host a jail named web_php and nor does a DNS record exist.
Its sounding like an DNS issue, but i'm not sure it is.


#Set hostname

#Network and DNS
ifconfig_vtnet0="inet netmask"

#Secure Stuff

#ZFS magic goes here

#Jail magic
jail_list="paw web_php7"

There's a bug somewhere.
I'm no expert of bhyve, but is there a docker/container like "web_php7" somewhere in the setup ?
You might want to double check reverse DNS lookups. It should really only return one PTR record, not multiple ones. And it looks like your VM is using either a different DNS, resulting in different results. Or you're mixing up different /etc/hosts files. Remember that a hosts file will overrule everything, the DNS itself may be in order but your hosts file may not.
Thanks for the assistance. I realize it was a silly mistake of mine.
I was trying to set the jail's host-name but had added the line to the pre-startup rather then to the jail startup.

I also now have a another funky problem where one jail can ping all other jails including access the outside world apart from the last started jail. The prision cannot ping the jail and nor can any of the other hosts. Strange thing was it was working absolutely fine until this morning. I am using vnet too

edit: now working magically

And now pkg is broken.

root@fortress:/var/db # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    6 MiB   6.1MB/s    00:01
Processing entries: 100%
FreeBSD repository update completed. 26598 packages processed.
All repositories are up to date.
root@fortress:/var/db # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (3 candidates): 100%
Processing candidates (3 candidates): 100%
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        mesa-libs: 17.1.2 -> 17.1.4
        libxshmfence: 1.2_1 -> 1.2_2

Number of packages to be upgraded: 2

372 KiB to be downloaded.

Proceed with this action? [y/N]: y
pkg: Not Found

pkg update -f

also doesn't fix the issue. I've deleted all cache and db's too. DNS is fine. as I've been using this without any issues :/
Odd. The package servers seem to be missing all packages starting with 'm' and onward. It has everything up to 'l' but nothing after it. The latest repository is complete, just the quarterly isn't.