Hello I am trying to get working an Ubuntu cloud image passing data-source information throught SMBIOS serial field, I am using vm-bhyve to manage my virtual machines, the steps that I have followed are the following:
I can see that bhyve virtual machine was launched with the correct parameters or at least I think so:
But my webserver 192.168.69.4:8000 doesn't receive any request.
Cloud-init documentation has a qemu example.
I have tried it, and it works:
What am I doing wrong? Am I assigning the wrong SMBIOS variable? Maybe I have understood all the thing incorrectly?
Code:
vm create -c 2 -m 2G -s 15G -t linux-zvol -i ubuntu-22.04-server-cloudimg-amd64.img ubuntu-cloud3
vm configure ubuntu-cloud3
bhyve_options="-o smbios.serial=ds='nocloud;s=http://192.168.69.4:8000/ubuntu-cloud3/'"
Code:
cat /zroot/vm/ubuntu-cloud3/vm-bhyve.log
Sep 25 11:03:58: initialising
Sep 25 11:03:58: [loader: grub]
Sep 25 11:03:58: [cpu: 2]
Sep 25 11:03:58: [memory: 2G]
Sep 25 11:03:58: [hostbridge: standard]
Sep 25 11:03:58: [com ports: com1]
Sep 25 11:03:58: [uuid: 24814564-5b7a-11ee-b808-3497f636bf45]
Sep 25 11:03:58: [debug mode: no]
Sep 25 11:03:58: [primary disk: disk0]
Sep 25 11:03:58: [primary disk dev: sparse-zvol]
Sep 25 11:03:58: initialising network device tap0
Sep 25 11:03:58: adding tap0 -> vm-public (public addm)
Sep 25 11:03:59: bring up tap0 -> vm-public (public addm)
Sep 25 11:03:59: booting
Sep 25 11:03:59: create file /zroot/vm/ubuntu-cloud3/device.map
Sep 25 11:03:59: -> (hd0) /dev/zvol/zroot/vm/ubuntu-cloud3/disk0
Sep 25 11:03:59: /usr/local/sbin/grub-bhyve -c /dev/nmdm-ubuntu-cloud3.1A -m /zroot/vm/ubuntu-cloud3/device.map -M 2G -r hd0,1 ubuntu-cloud3
Sep 25 11:03:59: [bhyve options: -c 2 -m 2G -AHP -o smbios.serial=ds='nocloud;s=http://192.168.69.4:8000/ubuntu-cloud3/' -U 24814564-5b7a-11ee-b808-3497f636bf45 -u]
Sep 25 11:03:59: [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/dev/zvol/zroot/vm/ubuntu-cloud3/disk0 -s 5:0,virtio-net,tap0,mac=58:9c:fc:01:07:9d]
Sep 25 11:03:59: [bhyve console: -l com1,/dev/nmdm-ubuntu-cloud3.1A]
Sep 25 11:03:59: starting bhyve (run 1)
But my webserver 192.168.69.4:8000 doesn't receive any request.
Cloud-init documentation has a qemu example.
I have tried it, and it works:
qemu-system-x86_64 -net nic -net user -m 2048 -nographic -hda /zroot/vm/.img/ubuntu-22.04-server-cloudimg-amd64.img -smbios type=1,serial=ds='nocloud;s=http://192.168.69.4:8000/ubuntu-cloud3/'
What am I doing wrong? Am I assigning the wrong SMBIOS variable? Maybe I have understood all the thing incorrectly?