From owner-freebsd-testing@freebsd.org Mon Mar 12 20:57:36 2018 Return-Path: Delivered-To: freebsd-testing@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 C910BF49F80 for ; Mon, 12 Mar 2018 20:57:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x229.google.com (mail-lf0-x229.google.com [IPv6:2a00:1450:4010:c07::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D35A71FD9; Mon, 12 Mar 2018 20:57:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x229.google.com with SMTP id w16-v6so4330932lfc.13; Mon, 12 Mar 2018 13:57:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=2fYd371wLY7IEnl0jCeEHX9IpInfITCHFasMUUWL/ZY=; b=VqBqG/74f9/duJZRDjAcVlFohnhb8afZClGXh73PiOMPIvMIAeK9mhCwzokpggrG8y zuu2WLTAhUGgQpKBMScHlf8lro+HALed6D1rII3MpYmoLrKPpgy7yN4hWcBddPf1OFBS yuSjxjYR6wwICTqdLqODTsZbt4t7E/0X1pSB4tzA21RTEDg4CCEUm+dtPhhc7qyDTcxx l/0M8BOvQhiEJujNiqrCunH2ixlOV8n7L3/pXHrJrN/69ySB93T9Awg8O3Q+dpb2buMr rVneXRkmdp5fLMOnqzM9if1/pLAbY0yWuh5VhKyeKf1G9A9qw6iZIPSv3viXPZDUkFWc DREA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=2fYd371wLY7IEnl0jCeEHX9IpInfITCHFasMUUWL/ZY=; b=kugfLKTTlIZf8X+Y0E+LNZNcJWv/SO5poOb3jhax/nsm1EBkZgGqkKKX6CHj51OpZ4 WLQDgS8nvB+1jBGRTP5KBKq3pHf/akZmZJINm9YfgS3V3P6eVO3xJ/69hiAensW8A/hJ 4A44W9RuxhA5BHPSYyYXt63GQZdcKUdEH1/pePfNGLXsFIdl1Z0ysw6lYlkiCef/qe2J LkozTlamUXRzLWuG4J7UZeYqg9oK4SFfKaASCYVwbbEXWCWhc2BFalHfD0d136N7HW2E Ng1GXb+TUK/sMBx7ko5FFdvuA078l2I2HrA+fNtUOMRHiX0V4OZG0S1CCU7oD6xsp8Cx eNEQ== X-Gm-Message-State: AElRT7E+EAblh4pYfYXVAHi/x22ResCdOw864DUSPdi57jOno2NO4e6a QiK1ZaafDdR0KDjf4lI+/96pGpf5vyIUhY3p2kc= X-Google-Smtp-Source: AG47ELvM6+yRUo0QeKAIgQP+uoIr3bJxl4Wyv3P+/iNyxw2D7z5btn6xMxGyWpK9VvpT9MOXLbevJfLrAJ2zozjdS6Y= X-Received: by 2002:a19:b593:: with SMTP id g19-v6mr6420626lfk.47.1520888253106; Mon, 12 Mar 2018 13:57:33 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Mon, 12 Mar 2018 13:57:32 -0700 (PDT) In-Reply-To: <20180312154346.GA97195@raichu> References: <20180312154346.GA97195@raichu> From: Alan Somers Date: Mon, 12 Mar 2018 14:57:32 -0600 X-Google-Sender-Auth: M8eJl1ZQCk5g8kLvbyanWOCj74E Message-ID: Subject: Re: automatically provisioning a bhyve test VM To: Mark Johnston Cc: "freebsd-testing@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 20:57:36 -0000 On Mon, Mar 12, 2018 at 9:43 AM, Mark Johnston wrote: > Hi, > > I have some tests for FreeBSD's kernel dump code that I'd like to make > more robust. They use bhyve to test a variety of combinations of kernel > dump configurations: e.g., full dump vs. minidump, encryption, > compression, dump device block size, etc.. Each test triggers a kernel > panic and dump, and upon reboot opens the dump in kgdb, in the VM, to > get some confidence that the dump is valid. > > I use sysutils/vm-bhyve to simplify some aspects of VM management, and > that works pretty well. I use some hacks to configure networking for the > VM, and this is the part that I don't like. The tests run on the host > and use ssh to run commands in the VM. For this to work, I need to > hardcode an IP for the guest and for the bridge to which the guest's tap > interface is connected, which of course only works if those IPs aren't > already somehow in use by the host. I'd prefer something that makes zero > assumptions about the host and just provides the bare minimum needed to > establish a private communication channel to run commands on the guest > (which includes getting the output and exit status of said commands). > Ideally this would still involve assigning private IPv4 addresses to > each side since I'd like to expand my test suite to cover netdump, which > makes it possible for a panicking kernel to transmit a dump to a remote > host. Does anyone have any suggestions for a more elegant way to go > about this? Does anyone else automatically provision and tear down bhyve > VMs as part of a test suite? > _______________________________________________ > freebsd-testing@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-testing > To unsubscribe, send any mail to "freebsd-testing-unsubscribe@freebsd.org" > Could you use the virtual serial port instead of a virtual network? That would eliminate the assumption about a suitable IP address for the guest. You could also try using an IPv6-only guest with a link-local address. Thanks to IPv6's scoping rules, this would be guaranteed not to interfere with any other interface on the host, so long as you don't bridge it. -Alan