Hello.
I find very comfortable to start automatically the vncviewer client as soon as a bhyve vm is created,but it does not work as expected. Let's take this as example :
this script is able to create the bhyve vm without problem but when it is ready,I face two problems :
1) the first time that the vncviewer client appears it says : connection failure. Reconnect ? I say yes and it works. This is the minor problem,even if it is a little annoying
2) the most serious problem with that script is that the vm can't connect to internet. I'm sure that the problem is inside this line :
and more precisely the error happens because I'm using the & character. If I remove that character and I run the vm like this :
it can connect to internet. Do you know why it does not accept that character ? how can I fix it ? it's annoying for me to open manually the vnc viewer every time that I launch a vm. I prefer that the script does it automatically.
I find very comfortable to start automatically the vncviewer client as soon as a bhyve vm is created,but it does not work as expected. Let's take this as example :
Code:
bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \
-s 0,hostbridge \
-s 3,ahci-cd,/mnt/$vmdisk'p2'/bhyve/iso/Android/android-x86_64-9.0-r2-k49.iso \
-s 4,virtio-blk,/mnt/$vmdisk'p2'/bhyve/os/Android/android9.img \
-s 8,virtio-net,tap9 \
-s 29,fbuf,tcp=0.0.0.0:5909,w=1440,h=900 \
-s 30,xhci,tablet \
-s 31,lpc -l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
-l com1,stdio \
vm9 & vncviewer 0:9
this script is able to create the bhyve vm without problem but when it is ready,I face two problems :
1) the first time that the vncviewer client appears it says : connection failure. Reconnect ? I say yes and it works. This is the minor problem,even if it is a little annoying
2) the most serious problem with that script is that the vm can't connect to internet. I'm sure that the problem is inside this line :
Code:
vm9 & vncviewer 0:9
and more precisely the error happens because I'm using the & character. If I remove that character and I run the vm like this :
Code:
bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \
-s 0,hostbridge \
-s 3,ahci-cd,/mnt/$vmdisk'p2'/bhyve/iso/Android/android-x86_64-9.0-r2-k49.iso \
-s 4,virtio-blk,/mnt/$vmdisk'p2'/bhyve/os/Android/android9.img \
-s 8,virtio-net,tap9 \
-s 29,fbuf,tcp=0.0.0.0:5909,w=1440,h=900 \
-s 30,xhci,tablet \
-s 31,lpc -l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
-l com1,stdio \
vm9
it can connect to internet. Do you know why it does not accept that character ? how can I fix it ? it's annoying for me to open manually the vnc viewer every time that I launch a vm. I prefer that the script does it automatically.