[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: qemu-kvm: qns regarding network and usb keyboard setup

suvayu ali wrote:
Hi all,

Recently I started experimenting with kvm with F10 as the host, and I
have been having some problems.

I need to login to my virtual machine from the shell from the host
itself and/or from another machine remotely over the internet. I went
through the man pages but couldn't make anything out of it. I am a
newbie so could someone please point me to a resource where I can read
up more on this which is a little more understandable?


On the other hand I can tell you what I did, a better way to do it (which I didn't know when I started), and it should get you started. You may have joy from virt-manager, it's on my list of things to try when I have time to look at better solutions to problems to problems for which I have an ugly working solution.

The secret is to have your NIC attached to a bridge on the host, and use that for networking. So instead of having eth0 be your device for default route, you have the bridge, and the physical bridge is attached to the bridge. Now you can use either a fixed IP or a known DHCP assigned IP for your virtual machine.

I have:  NIC(eth0)---[bridge(br0)]---default route

Start the kvm machine with: "-net nic,macaddr=$MAC -net tap" to do DHCP IP assignment, or "-net nic -net tap" to use a static IP or random IP from DHCP. I run my own DNS, DHCP, mail, http, so I can control everything, but you may not wish to do so.

The better way: I have seen posted the suggestion that you name the NIC "peth0" and the bridge "eth0" to make the default Fedora firewall and routing work. Haven't tried it.

Hope this gets you started, I read the kvm list and I just beat on it until it worked "back when" without much doc, and haven't changed anything.

Bill Davidsen <davidsen tmr com>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]