'Create a fake machine with one untagged port and subports
according vlan_networks parameter.
:param trunk_network: Instance of Network where trunk port should be
created.
:param vlan_networks: List of Network instances where subports should
be created.'

def create_vlan_aware_vm(self, trunk_network, vlan_networks):

    trunk_parent_port = self.safe_client.create_port(self.tenant_id, trunk_network.id)
    vlan_subports = [self.safe_client.create_port(self.tenant_id, vlan_network.id, mac_address=trunk_parent_port['mac_address']) for vlan_network in vlan_networks]
    trunk = self.safe_client.create_trunk(self.tenant_id, name='mytrunk', port_id=trunk_parent_port['id'], sub_ports=[{'port_id': vlan_subport['id'], 'segmentation_type': 'vlan', 'segmentation_id': vlan_network.tag} for (vlan_subport, vlan_network) in zip(vlan_subports, vlan_networks)])
    vm = self.useFixture(machine.FakeFullstackTrunkMachine(trunk, self.host, trunk_network.id, self.tenant_id, self.safe_client, neutron_port=trunk_parent_port, bridge_name=trunk_ovs_utils.gen_trunk_br_name(trunk['id'])))
    for (port, vlan_network) in zip(vlan_subports, vlan_networks):
        ip_network = make_ip_network(port, vlan_network.network)
        vm.add_vlan_interface(port['mac_address'], ip_network, vlan_network.tag)
    vm.block_until_boot()
    return vm
