Re: C bhyve administration tool

2015-11-04 Thread Andreas Nilsson
Well,

in all honesty, getting vm managers to kvm equivalents ( ie virt-manager )
should not be a goal. virt-manager and friends are terrible. Please
envision something better!

Where it is hosted and what language it is written in doesn't really matter.

Just my 2 cents.

Best regards
Andreas

On Wed, Nov 4, 2015 at 4:36 PM, Trent Thompson 
wrote:

> Going back to the original message in the thread, yes, I think the more the
> merrier.
> I created iohyve to solve a problem I had. I wanted to store my bhyve VM's
> in ZFS.
> Matt C. created vm-bhyve to solve the problem of storing VM's in a manager
> that didn't use ZFS.
> Matt and I have traded ideas back and forth even though we maintain
> different managers.
> I think that is the most important thing we need to focus on, working
> together to get bhyve at the same level as KVM and other hypervisors.
>
> Throw it up on Github so we can prod and poke at it. I don't know much
> about C, but I am always willing to learn.
>
> -Trent   (@pr1ntf)
>
> On Wed, Nov 4, 2015 at 2:47 AM, Matt Churchyard via freebsd-virtualization
> <
> freebsd-virtualization@freebsd.org> wrote:
>
> > > Hello!
> > >
> > > Couple months ago I started writing a bhyve management tool in C for
> > > our startup, in preparation for migration to FreeBSD for our servers.
> > > The goal was to be able to create, drop, and auto-start/stop/restart
> > > VMs, individually or all at once, and provide a plugin infrastructure
> > > to expose some metrics / errors for reporting and aggregation. More
> > > importantly it would detect errors/failures, report them and attempt
> > > to restart the VM per assigned policy.
> > >
> > > The effort stalled due to some high priority work that crept in.
> > > However, I am planning on restarting soon and wanted to check if there
> > > was a need for something like this.  I ran across Michael Dexter's
> > > vmrc, and although its shell based, it does provide quite a bit of
> > > features that we were looking for.  There's also iohyve. And I heard
> > > Peter and Neel are working on something as well. If there is interest,
> > > this would be open sourced from the start. Or if there is an existing
> > > effort that addresses these problems, I would love to contribute to
> that
> > project.
> > >
> > > Thoughts, comments, concerns, please share.
> > >
> >
> > >vm-bhyve is most mature to this point IME, just don't use the ports
> > version.
> >
> > > Adam
> >
> > Thanks Adam :)
> >
> > I could do with updating the port. Unfortunately this is my first porting
> > experience so not exactly sure of the 'correct' channel to go through to
> > get things updated. It took 2 months for my original port request to be
> > addressed and I'm not sure re-opening that bug is the right way to do it.
> >
> > If anyone uses the port, the error that gets printed when running 'vm
> > init' can be completely ignored. It's just trying to load any existing
> > virtual switches from the switch configuration file, and complaining that
> > the switch configuration file doesn't exist. Apart from that and a few
> > newer features/tweaks, I don't think there's anything particularly
> > show-stopping about the current port/package if people prefer installing
> it
> > that way to downloading from GitHub.
> >
> > Of course it would still be interesting to see a "real" bhyve management
> > tool (possibly even an official one) written in C.
> >
> > Matt
> > ___
> > freebsd-virtualization@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> > To unsubscribe, send any mail to "
> > freebsd-virtualization-unsubscr...@freebsd.org"
> >
> ___
> freebsd-virtualization@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "
> freebsd-virtualization-unsubscr...@freebsd.org"
>
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Disk IO throttling for VM guests?

2014-05-08 Thread Andreas Nilsson
On Thu, May 8, 2014 at 5:57 PM, Miroslav Lachman <000.f...@quip.cz> wrote:

> Is there any possibilities to limit disk IO for virtualization guest on
> FreeBSD?
> I would like to know, if it is possible to limit IOps for jails, or Bhyve
> guest, or VirtualBox quests. There are ways to limit CPU or RAM for them,
> but CPU and RAM are really huge these days. On the other hand, HDDs are
> still very IO limited and if one guest runs disk IO hungy task, then all
> other guest are affected / slow.
>
> I read about plugable GEOM scheduler few years ago (GEOM_SCHED), but it
> seems that it is dead project and there is no module for it to allow some
> scheduling according to PID, JID or something like this.
>
> So do we have anything like this for Jails or Bhyve?
> http://wiki.qemu.org/Features/DiskIOLimits
> http://wiki.smartos.org/display/DOC/Tuning+the+IO+Throttle
>
> Miroslav Lachman
>

Well, there is rctl. I haven't tried it yet though.

Best regards
Andreas
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: virt-manager bhyve

2014-05-05 Thread Andreas Nilsson
On Tue, May 6, 2014 at 2:00 AM, Craig Rodrigues  wrote:

> On Mon, May 5, 2014 at 2:47 PM, Alexandar Narayan
>  wrote:
> > Has anyone built virt-manager with bhyve support?
>
> I haven't tried any of this stuff, but you may want to read the blog
> postings mentioned at this link:
>
>
> http://www.freebsd.org/news/status/report-2014-01-2014-03.html#libvirt/bhyve-Support
>
> Those blog postings were written by Roman Bogorodskiy.  Roman
> has done a lot of work to get libvirt working with bhyve, but there seems
> to be
> some additional setup steps required.  These steps are mentioned in
> his blog postings.
>
> --
> Craig
>

I for one would like the libvirt package provided with pkgng to have have
support for it. At least for 10-RELEASE.

Best regards
Andreas
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Routing strangeness on 9.2 jail on 10.0 host with vimage

2014-02-11 Thread Andreas Nilsson
Hello,

I have a host running 10.0(-RC5) with vimage and 64 routetables. On that
I'm trying to run a 9.2 jail ( with vnet ).


jail.conf is as

$ cat /etc/jail.conf

$ppath="/usr/local/jails/";

exec.start = "/bin/sh /etc/rc";

exec.stop = "/bin/sh /etc/rc.shutdown";

vnet;

allow.raw_sockets;

mount.devfs;

host1 {

path = "${ppath}/subdir1/host1";

vnet.interface = "epair4b";

}
The jail starts up fine, but when trying to check the routing table in the
jail I get:

$ netstat -rn

netstat: no namelist

What does it mean? Is there a way around this? On my 10.0 jail it works
just fine.


Best regards

Andreas Nilsson
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Simulating CD-ROM device with BHyve and ISO disk image?

2013-08-27 Thread Andreas Nilsson
What happens if you specify

cd9660:iso9660/CDROM when first boot attempt has failed?

You could also try cd9660:/dev/vtbd1


Best regards
Andreas


On Wed, Aug 28, 2013 at 1:12 AM, Craig Rodrigues wrote:

> Hi,
>
> I have an ISO image that I am trying to boot in BHyve.
>
> I tried this:
>
> truncate -s 2G /tmp/disk.img
> sh /usr/share/examples/bhyve/vmrun.sh -I test.iso -d /tmp/disk.img freenas1
>
> The initial kernel boots, but then fails to mount the root device:
>
>
> 
> mountroot> ?
>
> List of GEOM managed disk devices:
>   iso9660/CDROM vtbd1 vtbd0
>
> FreeBSD is a registered trademark of The FreeBSD Foundation.
> FreeBSD 9.1-STABLE #0 r+42f8bbd: Sun Aug 18 00:03:25 PDT 2013
> r...@build.ixsystems.com:
> /tank/home/rodrigc/freenas/freenas/os-base/amd64/tank/home/rodrigc/freenas/freenas/FreeBSD/src/sys/FREENAS.amd64
> amd64
> gcc version 4.2.1 20070831 patched [FreeBSD]
> CPU: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (2494.19-MHz K8-class CPU)
>   Origin = "GenuineIntel"  Id = 0x206a7  Family = 0x6  Model = 0x2a
> Stepping = 7
>
>
> Features=0x8f8bab7f
>
>
> Features2=0x83ba6257
>   AMD Features=0x20100800
>   AMD Features2=0x1
>   TSC: P-state invariant
> real memory  = 536870912 (512 MB)
> avail memory = 492359680 (469 MB)
> Event timer "LAPIC" quality 400
> ACPI APIC Table: 
> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
> FreeBSD/SMP: 2 package(s) x 1 core(s)
>  cpu0 (BSP): APIC ID:  0
>  cpu1 (AP): APIC ID:  1
> WARNING: VIMAGE (virtualized network stack) is a highly experimental
> feature.
> ACPI Warning: FADT (revision 5) is longer than ACPI 2.0 version, truncating
> length 268 to 244 (20110527/tbfadt-320)
> ioapic0: Changing APIC ID to 2
> ioapic0  irqs 0-16 on motherboard
> kbd0 at kbdmux0
> aesni0:  on motherboard
> cryptosoft0:  on motherboard
> acpi0:  on motherboard
> atrtc0:  port 0x70-0x71,0x72-0x77 irq 8 on acpi0
> Event timer "RTC" frequency 32768 Hz quality 0
> Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
> acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
> pcib0:  port 0xcf8-0xcff on acpi0
> pci0:  on pcib0
> pcib0: no PRT entry for 0.31.INTA
> virtio_pci0:  port 0x2000-0x201f mem
> 0xc000-0xc0001fff at device 1.0 on pci0
> vtnet0:  on virtio_pci0
> virtio_pci0: host features: 0x1018020
> 
> virtio_pci0: negotiated features: 0x1018020
> 
> vtnet0: Ethernet address: 00:a0:98:30:99:23
> virtio_pci1:  port 0x2040-0x207f mem
> 0xc0002000-0xc0003fff at device 2.0 on pci0
> vtblk0:  on virtio_pci1
> virtio_pci1: host features: 0x1004 
> virtio_pci1: negotiated features: 0x1004 
> vtblk0: 2048MB (4194304 512 byte sectors)
> virtio_pci2:  port 0x2080-0x20bf mem
> 0xc0004000-0xc0005fff at device 3.0 on pci0
> vtblk1:  on virtio_pci2
> virtio_pci2: host features: 0x1004 
> virtio_pci2: negotiated features: 0x1004 
> vtblk1: 254MB (521624 512 byte sectors)
> uart2: <16550 or compatible> port 0x3f8-0x3ff irq 4 at device 31.0 on pci0
> uart2: console (9600,n,8,1)
> Timecounters tick every 1.000 msec
> ipfw2 (+ipv6) initialized, divert enabled, nat enabled, default to accept,
> logging disabled
> DUMMYNET 0xfe0002106940 with IPv6 initialized (100409)
> load_dn_sched dn_sched WF2Q+ loaded
> load_dn_sched dn_sched FIFO loaded
> load_dn_sched dn_sched PRIO loaded
> load_dn_sched dn_sched QFQ loaded
> load_dn_sched dn_sched RR loaded
> SMP: AP CPU #1 Launched!
> Timecounter "TSC-low" frequency 1247092718 Hz quality 1000
> Trying to mount root from cd9660:/dev/cd0 [ro]...
> mountroot: waiting for device /dev/cd0 ...
> Mounting from cd9660:/dev/cd0 failed with error 19.
> Trying to mount root from cd9660:/dev/acd0 [ro]...
> mountroot: waiting for device /dev/acd0 ...
> Mounting from cd9660:/dev/acd0 failed with error 19.
>
> Loader variables:
>
> Manual root filesystem specification:
>   : [options]
>   Mount  using filesystem 
>   and with the specified (optional) option list.
>
> eg. ufs:/dev/da0s1a
> zfs:tank
> cd9660:/dev/acd0 ro
>   (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)
>
>   ?   List valid disk boot devices
>   .   Yield 1 second (for background tasks)
>   Abort manual input
>
> mountroot> ?
>
> List of GEOM managed disk devices:
>   iso9660/CDROM vtbd1 vtbd0
>
>
> 
>
> Currently the logic for how the root mount device is chosen
> is hardcoded in the vfs_mountroot_conf0 function:
>
> http://bxr.su/FreeBSD/sys/kern/vfs_mountroot.c#823
>
>
> This logic basically says, try in this order:
>
> cd9660:/dev/cd0
> cd9660:/dev/acd0
> device specified in vfs.root.mountfrom
>
> It looks like with BHyve, if I invoke the vmrun.sh script as I have
> done, the ISO file is not on cd0 or acd0, but is on vtbd1.
>
> Is there a way I can mount the ISO file on a simulated cd0 device?
> This would make the logic in my

Re: Help: Getting started with bhyve

2013-03-12 Thread Andreas Nilsson
Intel Core i5 *is* 64-bit, see
http://ark.intel.com/products/43546/Intel-Core-i5-650-Processor-4M-Cache-3_20-GHz(
this is a really old i5 )

Best regards
Andreas


On Tue, Mar 12, 2013 at 4:28 PM, suraj swaminathan
wrote:

> I have intel i5 processor. Hence i386 version.
> Okay now it makes sense(If bhyve is supported only on amd64). Guess I have
> to get hold of a machine with amd64, use the iso from:
>
> http://ftp4.us.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/10.0/
> Correct me if I'm wrong.
>
> Thanks,
> Suraj
>
>
>
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: BHyVe: vm_setup_memory(highmem): Cannot allocate memory

2012-09-02 Thread Andreas Nilsson
On Sun, Sep 2, 2012 at 6:56 PM, Roman Bogorodskiy  wrote:

>   Roman Bogorodskiy wrote:
>
> >   Peter Grehan wrote:
> >
> > > Hi Roman,
> > >
> > > > Yeah, but I'd like to leave more memory for the host system, so I
> > > > specified 6GB. I have 8GB at all, so 2GB left for VMs.
> > > > Should it cause any problems?
> > >
> > >   No, that should be fine.
> > >
> > > > BTW, I encountered a problem with the tap0 device. I create a tap
> device
> > > > and assign an address to it, using 'ifconfig tap0 192.168.1.1 up'.
> > > >
> > > > I boot a VM and everything goes fine. When I do 'reboot' in the
> guest,
> > > > it reboots, but tap0 on the host goes down and its address is
> dropped.
> > > > Is that an expected behaviour?
> > >
> > >   Yes - we probably need to fix the tap device to not do that :(
> >
> > Yeah, it would be great to get this fixed.
> >
> > And one question: is there a way to get a list of all running VMs on the
> > host? Doesn't seem like vmmctl being able to do that.
>
> Oh, I've started reading the code and figured out that I can just do
> `ls /dev/vmm`!
>
> Roman Bogorodskiy
>

IMHO: Please don't introduce "reading stuff in /dev" as a standard way to
get info ( at least not for end user). sysctl is so much nicer to work with.

Regards
Andreas
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"