[OpenIndiana-discuss] KVM in Zones && networking
Jonathan Adams
t12nslookup at gmail.com
Mon Feb 22 11:22:57 UTC 2016
I have to ask, is there any particular reason that you're running the KVM
in a zone, as opposed to the global zone?
I have several KVM instances, but always run them in the global zone
because I'm lazy/ for convenience.
are you running network/physical or nwam? in the global, or in the zone?
have you passed through both vnics to the zone, did you plumb any/both of
them (in either the global or the zone)?
when you run "dladm show-vnic" how does it show your vnics?
when you run "dladm show-link" does it show the original interface and the
vnic as "up"
Jon
On 22 February 2016 at 11:14, Calin Somoza <calin at calin.de> wrote:
> Hi
>
> i have just tried the same in the global Zone but still have no luck using
> a vnic in the kvm Guest.
>
> Calin
>
>
> Am 21.02.2016 um 15:41 schrieb Jonathan Adams:
>
>> Quick question, if I may, in the zone do you have vnic1 plumbed? If you do
>> then there will be issues with the same MAC address used in the zone _and_
>> the KVM instance which wants to believe it is it's own machine.
>>
>> You will always be better off passing in a second virtual nic just for the
>> KVM it you decide to run KVM in a zone.
>>
>> Jon
>> On 21 Feb 2016 00:13, "Jacques Hugo" <jacques.hugo at threetwo.co.uk> wrote:
>>
>> Hi all,
>>>
>>>
>>>
>>> This post is around running a KVM inside a Zone and trying to get the
>>> networking working. I hope some of you have a working config and any
>>> help
>>> is appreciated. Although networking in the Zone is working fine, I
>>> cannot
>>> seem to connect in the KVM running inside it. I'm def missing a
>>> networking/routing issue here.
>>>
>>>
>>>
>>> I am sure this is the standard setup (output shortened for brevities
>>> sake):
>>>
>>>
>>>
>>> 1. Global Zone's network interfaced. We're using vnic1 for the
>>> Zone
>>>
>>> # dladm show-vnic
>>>
>>> LINK OVER SPEED MACADDRESS MACADDRTYPE
>>> VID
>>>
>>> net0 igb0 1000 2:8:20:4:5e:e1 random 0
>>>
>>> net1 igb0 1000 2:8:20:d:5b:d2 random 0
>>>
>>> vnic1 igb0 1000 2:8:20:d8:ad:72 random 0
>>> ## using this VNIC
>>>
>>>
>>>
>>>
>>>
>>> 2. Zone setup. The Zone has exclusive rights to the physical
>>> interface (vnic 1)
>>>
>>> # zonecfg -z src info
>>>
>>> zonename: src
>>>
>>> zonepath: /naspool/zones/src
>>>
>>> brand: ipkg
>>>
>>> autoboot: true
>>>
>>> bootargs:
>>>
>>> pool:
>>>
>>> limitpriv:
>>>
>>> scheduling-class:
>>>
>>> ip-type: exclusive
>>>
>>> hostid:
>>>
>>> fs-allowed:
>>>
>>> net:
>>>
>>> address not specified
>>>
>>> allowed-address not specified
>>>
>>> physical: vnic1
>>>
>>> defrouter not specified
>>>
>>> device:
>>>
>>> match: /dev/kvm
>>>
>>> device:
>>>
>>> match: /dev/zvol/rdsk/naspool/zones/src/kvm
>>>
>>> dataset:
>>>
>>> name: naspool/zones/src/kvm
>>>
>>>
>>>
>>>
>>>
>>> 3. The startscript for the KVM:
>>>
>>> #!/bin/ksh
>>>
>>>
>>>
>>> MAC=$(dladm show-vnic -po macaddress vnic1)
>>>
>>>
>>>
>>>
>>>
>>> /usr/bin/qemu-kvm \
>>>
>>> -boot cd \
>>>
>>> -cpu host \
>>>
>>> -enable-kvm \
>>>
>>> -vnc 0.0.0.0:43 \
>>>
>>> -smp 4 \
>>>
>>> -m 8192 \
>>>
>>> -no-hpet \
>>>
>>> -localtime \
>>>
>>> -drive
>>> file=/dev/zvol/rdsk/naspool/zones/src/kvm/disk0,if=ide,index=0 \
>>>
>>> -drive
>>>
>>>
>>> file=/naspool/zones/src/kvm/iso/sol-11_3-text-x86.iso,media=cdrom,if=ide,ind
>>> ex=2 \
>>>
>>> -net nic,vlan=0,name=net0,model=e1000,macaddr=$MAC \
>>>
>>> -net vnic,vlan=0,name=net0,ifname=vnic1,macaddr=$MAC \
>>>
>>> -vga std
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> The KVM (Solaris 11) start fine and the installation goes through
>>> without a
>>> hitch (quite fast to be honest, very good performance). However I cannot
>>> connect to it from the outside. The KVM host I have configured with an
>>> IP
>>> but cannot ping it, or from the KVM itself cannot see the default gw.
>>> However traffic to/from the Zone is working fine. Running a KVM in the
>>> Global Zone works a treat, however inside a Zone I am definitely missing
>>> a
>>> step in getting the routing from the KVM to the Zone sorted.
>>>
>>>
>>>
>>> Any help appreciated. Thanks for your time.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Jacques
>>>
>>>
>>>
>>> _______________________________________________
>>> openindiana-discuss mailing list
>>> openindiana-discuss at openindiana.org
>>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>>
>>> _______________________________________________
>> openindiana-discuss mailing list
>> openindiana-discuss at openindiana.org
>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>
>>
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
>
More information about the openindiana-discuss
mailing list