I wanted to start learning Kubernetes.
So I thought I’d spin up a Ubuntu VM to use as my sacrificial guinea pig.
While the normal NAT mode works well enough for most of my networking needs, I wanted the Ubuntu VM to show up and work as a machine on my host’s network.1
I have two network cards on my desktop and wanted to allocate one of them to this VM.
I wanted a passthrough, where the guest OS would see the NIC and then have exclusive access to it.
When I tried doing that, KVM complained that it could not do this with PCI devices.
Hmm, that had me stumped a bit.
And then I learnt about attaching my VM’s NIC directly to a physical interface.
What I needed to do was use Macvtap as my network source in the VM’s settings.
It then prompted me for my NIC’s device name, which I gave it, courtesy a little spelunking through
And then once I began my Ubuntu VM install, it detected my NIC and then let me assign an ip that I use on my local network.
For all intents and purposes the VM now appears as just another machine on my network ala my Pis.
P.S. Subscribe to my mailing list!
Forward these posts and letters to your friends and get them to subscribe!
P.P.S. Feed my insatiable reading habit.
To my mind, that’d be one less layer of networking I’d need to deal with. ↩︎