Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken bhyve zone after add_nics #961

Open
sjorge opened this issue Oct 1, 2020 · 2 comments
Open

Broken bhyve zone after add_nics #961

sjorge opened this issue Oct 1, 2020 · 2 comments

Comments

@sjorge
Copy link
Contributor

sjorge commented Oct 1, 2020

[root@carbon ~]# vmadm start 48fdf46a-12df-41e1-94d5-b322f2e98dd3
Unable to start VM 48fdf46a-12df-41e1-94d5-b322f2e98dd3: first of 1 error: Command failed: zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[2]='-U'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[3]='48fdf46a-12df-41e1-94d5-b322f2e98dd3'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[4]='-B'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[5]='1,manufacturer=Joyent,product=SmartDC HVM,version=7.20201001T070452Z,serial=48fdf46a-12df-41e1-94d5-b322f2e98dd3,sku=001,family=Virtual Machine'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[6]='-s'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[7]='31,lpc'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_attr_bootrom=uefi'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[8]='-l'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[9]='bootrom,/usr/share/bhyve/uefi-rom.bin'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_attr_com1=/dev/zconsole'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[10]='-l'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[11]='com1,/dev/zconsole'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_attr_com2=socket,/tmp/vm.ttyb'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[12]='-l'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[13]='com2,socket,/tmp/vm.ttyb'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_attr_hostbridge=<null>'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[14]='-s'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[15]='0,hostbridge,model=i440fx'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_attr_vcpus=4'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[16]='-c'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[17]='4'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_attr_ram=4096'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[18]='-m'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[19]='4096'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device_resources=_dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0 '
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_path=/dev/zvol/rdsk/zones/48fdf46a-12df-41e1-94d5-b322f2e98dd3/disk0'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_model=ahci'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_boot=false'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_pci_slot=0:4:0'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_model=ahci'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_model=ahci'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_model=ahci'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_device__dev_zvol_rdsk_zones_48fdf46a_12df_41e1_94d5_b322f2e98dd3_disk0_media=disk'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[20]='-s'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[21]='0:4:0,ahci-hd,/dev/zvol/rdsk/zones/48fdf46a-12df-41e1-94d5-b322f2e98dd3/disk0'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_net_resources=net0 '
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': get_zcfg_var: '_ZONECFG_net_net0_primary=<null>'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[22]='-s'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': add_arg: argv[23]='6:1,virtio-net-viona,net0'
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': Error: no primary net has been specified
zone '48fdf46a-12df-41e1-94d5-b322f2e98dd3': exec /usr/lib/brand/bhyve/boot 48fdf46a-12df-41e1-94d5-b322f2e98dd3 /zones/48fdf46a-12df-41e1-94d5-b322f2e98dd3 failed

This was a zone without any nics, I then added one using

echo '{"add_nics": [{"vlan_id": 110, "nic_tag": "trunk", "model": "virtio"}]}' | vmadm update 48fdf46a-12df-41e1-94d5-b322f2e98dd3

This succeeds the validation, but results in a broken zone.

@jasonbking
Copy link
Contributor

Can you add a "primary": true attribute to the NIC? It looks like it's expecting that to be set on a NIC in the instance.

@sjorge
Copy link
Contributor Author

sjorge commented Oct 2, 2020

Yeah that fixed it, but validation of add_nics should catch that right? Or if it's the first nic, just add it. I believe the later happens on vmadm create.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants