Hostname parameter not taken into consideration

I run 2 boxes using the following

config.vm.define “web” do |web|
web.vm.boot_timeout = 1500
web.vm.box = “generic/fedora39”
web.vm.box_version = “4.3.12”
web.vm.hostname = “web”
web.vm.network “private_network”, ip: “192.168.56.20”
web.vm.network “forwarded_port”, guest: 80, host: 8080
end

config.vm.define “db” do |db|
db.vm.boot_timeout = 1500
db.vm.box = “generic/fedora39”
db.vm.box_version = “4.3.12”
db.vm.hostname = “db”
db.vm.network “private_network”, ip: “192.168.56.30”
end

both run correctly but when I ssh to anyone and issue “hostname” command I get fedora39 and not the name I allocated in db.vm.hostname

image