Hello everyone!
I have installed Ubuntu Server 18.04 in na Hyper-V VM (please, no flack, not my fault...) and this particular network is a VLAN. No other traffic is permitted through the relevant switch, only that one VLAN id (let's say, 39).
So... I have no connectivity to the internet to apt-get the vlan package, but without the vlan package I can't set up eth0.39 to get internet connectivity. A nasty egg/chicken problem.
I can't even download the sole package to another machine on the same subnet, because without the vlan setting on my eth0 I can't even access neighbouring machines.
I have no access to the Hypervisor disks also, so I can't mount them.
What sould I do?
The answer on Thomas' comment actually Works (and I quote):
BUT...
If you are using Microsoft's Hyper-V, you can simply configure it on Hyper-V and let your Ubuntu be oblivious about the whole VLAN business. You can do it on the Hyper-V Manager software or using the new (web-based) Windows Admin Center.
For Hyper-V Manager
Virtual Machines
, select the appropriate virtual machine and then right-clickSettings
.Enable virtual LAN identification
, and then type the sameVLAN ID
as the one you specified for the virtual switch.For Windows Admin Center
Open Windows Admin Center with your browser
Click on the machine that hosts your VM
Click on
Virtual Machines > Inventory
Click on the desired VM
Click on
More > Configuration
Click on
Network
In the
VLAN Identifier
field, inform the apropriate VLAN ID.Click
Save
Your Ubuntu VM on Hyper-V is now networking on the correct VLAN without even noticing.