3

I've got an Ubuntu server running a few things, and I'd like to add FreePBX to it. I don't want to reconfigure/reinstall my current Ubuntu installation just so I can run a Type-1 hypervisor like Xen (If I understand correctly I would have to reinstall Ubuntu inside the type-1 hypervisor). But I like the whole "autostart VMs on boot and connecting if you want to" flow, rather than the VBox/QEMU "Launch it when you need it and leave the window open" idea. Does such a thing exist for Ubuntu?

Edit: The whole point of this is for me to not even realize it's there if I don't check ps or connect to it. If you ask it to, Hyper-V will start VMs on boot automatically and transparently. You can later choose to connect if you wish, but services can still be running as if they are on the host machine.

5
  • You can create upstarts for your VM's if that's all you're wanting out of xen. I have a few vagrant boxes start and shutdown safely on boot, and shutdown.
    – user508889
    Apr 13, 2016 at 20:55
  • Your question contains the answer: VBox or QEMU. There is also virtual machine manager, which is another gui front end for qemu.
    – psusi
    Apr 13, 2016 at 23:15
  • Also KVM (which works in tandem with QEMU) and OpenStack are worth consideration.
    – DopeGhoti
    Apr 13, 2016 at 23:46
  • @psusi I specifically said NOT VBox or QEMU. Basically I want it to be transparent to me unless I connect to it. Apr 15, 2016 at 4:29
  • Woops... for some reason I read that as "I like the launch it when you need it rather than boot and auto start like xen".
    – psusi
    Apr 15, 2016 at 22:31

2 Answers 2

2

The way on Ubuntu would be to use libvirt on top of KVM/QEMU/VirtualBox. Quoting the Arch Wiki:

Libvirt is collection of software that provides a convenient way to manage virtual machines and other virtualization functionality, such as storage and network interface management. These software pieces include a long term stable C API, a daemon (libvirtd), and a command line utility (virsh). A primary goal of libvirt is to provide a single way to manage multiple different virtualization providers/hypervisors, such as the KVM/QEMU, Xen, LXC, OpenVZ or VirtualBox hypervisors (among others). Some of the major libvirt features are:

  • VM management: Various domain lifecycle operations such as start, stop, pause, save, restore, and migrate. Hotplug operations for many device types including disk and network interfaces, memory, and cpus.
  • Remote machine support: All libvirt functionality is accessible on any machine running the libvirt daemon, including remote machines. A variety of network transports are supported for connecting remotely, with the simplest being SSH, which requires no extra explicit configuration.
  • Storage management: Any host running the libvirt daemon can be used to manage various types of storage: create file images of various formats (qcow2, vmdk, raw, ...), mount NFS shares, enumerate existing LVM volume groups, create new LVM volume groups and logical volumes, partition raw disk devices, mount iSCSI shares, and much more.
  • Network interface management: Any host running the libvirt daemon can be used to manage physical and logical network interfaces. Enumerate existing interfaces, as well as configure (and create) interfaces, bridges, vlans, and bond devices.
  • Virtual NAT and Route based networking: Any host running the libvirt daemon can manage and create virtual networks. Libvirt virtual networks use firewall rules to act as a router, providing VMs transparent access to the host machines network.

CLI management is done primarily using the virsh command. There's an associated GUI front-end, called virt-manager.

As for starting VMs automatically, assuming you have a VM named foo, to mark it for starting at boot:

virsh autostart foo

And to unmark it:

virsh autostart --disable foo

The Ubuntu LTS Server Guide has a chapter on libvirt.

0
0

Virtual Machine Manager can manage quemu instances with a nice gui interface, and has an option you can check to auto start a vm when the host boots.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .