ctrl_vlan.cfg 662 字节
Newer Older
S
Sitong Liu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
- ctrl_vlan:
    type = ctrl_vlan
    image_snapshot = yes
    nic_model = virtio
    vlan_id = 1
    nic_extra_params = ",status=on"
    Linux:
        vlan_ip = 192.168.10.1
        vlan_set_cmd = "ip link add link %s name %s.${vlan_id} type vlan id ${vlan_id}; "
        vlan_set_cmd += "ip link set %s address 00:52:11:36:3f:00 up; "
        vlan_set_cmd += "ifconfig %s ${vlan_ip}/24 up"
    Windows:
        vlan_set_cmd = powershell -command "Set-NetAdapter -Name '%s' -VlanID ${vlan_id} -Confirm:$false"
    variants:
        - ctrl_on:
            nic_extra_params += ",ctrl_vlan=on"
        - ctrl_off:
            nic_extra_params += ",ctrl_vlan=off"