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

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



2009/2/17 Bill Davidsen <davidsen tmr com>:
> 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?
>>
> No.
>
> 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

I don't quite follow you here.
>
> 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.
>
When I tried "-net nic -net tap", I get this error,

/etc/qemu-ifup: could not launch network script
Could not initialize device 'tap'

So I tried just using nic, that did boot up the system but I did not
have any network connection. I tried using macaddr=<my active
network>, that too ended up with no network. I don't know whether this
is relevant, I have 2 network cards but none of them are in use. I
have to use a USB wifi receiver to connect to the internet. (don't ask
why, its because of the landlord). So the macaddr I used was for the
wifi receiver (wlan0).

Without either of those the machine boots up with network access and I
can log into the system using the gui. I can do system updates and
browse the internet, however when i try to (from the host) ping the ip
I get from ifconfig on the guest, there is 100% packet loss.

I hope I am not doing something stupid ... :-o

-- 
Suvayu

Open source is the future. It sets us free.


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