From owner-freebsd-virtualization@freebsd.org Fri Sep 28 14:29:08 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F19810B2379 for ; Fri, 28 Sep 2018 14:29:08 +0000 (UTC) (envelope-from matt.churchyard@userve.net) Received: from smtp-a.userve.net (smtp-outbound.userve.net [217.196.1.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.userve.net", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F488756B3 for ; Fri, 28 Sep 2018 14:29:07 +0000 (UTC) (envelope-from matt.churchyard@userve.net) Received: from owa.usd-group.com (owa.usd-group.com [217.196.1.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-a.userve.net (Postfix) with ESMTPS id AB127BD4; Fri, 28 Sep 2018 15:28:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=userve.net; s=201508; t=1538144938; bh=pbYdI8X0lH5OkawVAl/93dTFssQKQFOil1EVQcdm/hk=; h=From:To:Subject:Date:References:In-Reply-To; b=LYd8Fvc0FpJzaltHwmLr6J+dWOxAdebBHGi1WIvPnUogy1lCP1h1bKugf/mPpVpYz V5xWf/2MwgllUL0qmqT9vT79JuwVZ8m2kHFY9R5Q2k2/QInNsNDje2FGusatUtYI6f QaYrJ4RucVNJH1MGvaGHXrAOlB/5vM4kKkDAVwro= Received: from SERVER.ad.usd-group.com (192.168.0.1) by SERVER.ad.usd-group.com (192.168.0.1) with Microsoft SMTP Server (TLS) id 15.0.847.32; Fri, 28 Sep 2018 15:28:58 +0100 Received: from SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9]) by SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9%12]) with mapi id 15.00.0847.030; Fri, 28 Sep 2018 15:28:58 +0100 From: Matt Churchyard To: D'Arcy Cain , "freebsd-virtualization@freebsd.org" Subject: RE: New bhyve user Thread-Topic: New bhyve user Thread-Index: AQHUVy6KIM8IRd4MokidnpkHvp6wJqUFvCZA Date: Fri, 28 Sep 2018 14:28:57 +0000 Message-ID: <2a95db911caf43afba6408423597533c@SERVER.ad.usd-group.com> References: <2edf93d1-58c2-92bc-48e2-92a493a36e7e@druid.net> In-Reply-To: <2edf93d1-58c2-92bc-48e2-92a493a36e7e@druid.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.0.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2018 14:29:08 -0000 -----Original Message----- From: owner-freebsd-virtualization@freebsd.org On Behalf Of D'Arcy Cain Sent: 28 September 2018 14:24 To: freebsd-virtualization@freebsd.org Subject: New bhyve user >Greetings. I have just recently started using bhyve (previously a Xen use= r). I am using vm-bhyve to manage it. I have a few questions. >First question, am I making the right choice by switching and, if so, is b= hyve the right choice to switch to? I realize that that is an impossible q= uestion but perhaps some pros and cons as well as war stories will help me. It really depends on how well bhyve supports what you need to do. The main = downside of bhyve at the moment is that it's very new and lacks many featur= es and performance optimisations you may find in more established hyperviso= rs. I can't really say yes you should use bhyve or no you should stick with= Xen. >I created a switch and clients using the examples on the vm-bhyve web site= . However, I could not get IP working until I put an IP address on the vm-= public interface. I duplicated the address of the interface that it is >co= nnected to (re0 in my case) and used DHCP to assign addresses to the client= s. If this is the correct way, shouldn't it have happened automatically? No, you should not be duplicating IP addresses. A virtual "switch" is really just an ethernet bridge. If you want guests to= be on the same lan as the host, then you can just create a virtual switch = and add your physical interface to it # vm switch create public # vm switch add public re0 Any guest that is connected to the vm-public switch will be bridged to re0,= and as such to the network re0 is connected to. In that instance you would= give guests IP addresses on the same range as re0 (or they could get addre= sses from your local DHCP server). If you want to guests to have a separate network, then you can assign an ad= dress to the virtual switch (using a different address range to the host) # vm switch create guests # vm switch address guests 192.168.100.1/24 In this case you would assign guests address in that network, with 192.168.= 100.1 as the gateway. (Alternatively you could install something to provide= dhcp. There are guides on the vm-bhyve GitHub for using dnsmasq). For this to work you would either need to configure the host to perform NAT= , or configure the rest of your network to know that any traffic to 192.168= .100.0/24 should be routed to the bhyve host. (NAT is probably the easier o= ption) >In any case, I saw I see that it can be added at creation time but how do = I modify it later? I saw "switch address a.b.c.d/xx|none" in the man page = but no way to specify which switch the address should be applied to. I tri= ed >adding the switch name before and after the address but that gave me an= error. I've just tested the above address command and it seems to be working for m= e... >I tried to boot into a Linux install but even though I set grahics to yes,= it doesn't seem to be serving VNC. On the console I can only get into the= live CD. How do I get it installed? Did you have uefi=3D"yes" in the configuration? Graphics are only available= when using UEFI boot. >I am thinking of creating a base install with various install options and = then copy that over to new installs as a starting point. I was going to us= e rsync with the -S option to copy over the file as sparse. >Is there another way that is preferred? For this sort of setup, ZFS is the obvious answer as you can use send/recv = to duplicate guests (or even clone to create an instant copy without using = additional disk space). If not using ZFS then rsync would be a reasonable o= ption to create copies of guests. >In Xen there is a maxvcpus which limit the number of CPUs but they could b= aloon down if not busy so that other clients who are busy can use the CPUs.= In bhyve (at least in vm-bhyve) there is only a cpus line in the config. = >Is this a minimum, maximum or is it a hard limit? This is the number of virtual cpus that the guest will see. Remember that a= s far as the host is concerned, the guests are processes that are using res= ources, just like any other program. A guest that is not doing much will no= t being using much cpu time on the host, and the host will happily run othe= r guests (or system processes) on the same physical cpus. >That's it for now. Thanks for any help. >--=20 >D'Arcy J.M. Cain | Democracy is three wolves >http://www.druid.net/darcy/ | and a sheep voting on >+1 416 788 2246 (DoD#0082) (eNTP) | what's for dinner. >IM: darcy@Vex.Net, VoIP: sip:darcy@druid.net _____________________________= __________________ >freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/= mailman/listinfo/freebsd-virtualization >To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freeb= sd.org"