Subject: [alpine-devel] advice for virtualization on desktop

From: Natanael Copa <[email-masked]>
Date: Thu, 8 Dec 2011 07:55:22 +0100

Hi,

I have been using qemu for some time for testing and network
development.

I think raw qemu is a bit cumbersome since i need to keep track of the
mac address of all the guests. When I create a guest i create a
start.sh script where i stuff in the mac address. (I sometimes need
multiple NICs in guests and will need multiple guest vlans etc.
vde, tap and bridges is what I use). This works ok, but I think it
could be done better. (I find it cumbersome to manage the guest mac
addr manually. assign a mac, and keep track of what guest has what mac)

So I am asking for advice.

I think I have the following alternatives:

Switch to Xen.

Use libvirtd.

Make virtualbox work.

In addition to N different alpine boxes I will install at least one
Windows 7 guest. I'd like to have an ubuntu guest and a fedora guest.
And fire up a random distro once in a while.

So far, Xen dom0 boots up, but xorg seems to fail (Sandy bridge
graphics) Interestingly enough it seemed to work with the ATI card
even if switching to console with ctrl-alt-1 didnt work.

I am having issues getting started with libvirtd. (how do i create a
new qemu guest? how do i start it, stop it?)

Virtual box needs some work to get compiled but might be nice to have
anyways. Virtualbox also has (had?) some closedsource code for some
features. Those will not be available on Alpine.

So, ideas? suggestions?

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Cameron Banta <[email-masked]>
Date: Thu, 8 Dec 2011 09:53:37 -0600

On Thu, Dec 8, 2011 at 00:55, Natanael Copa <[email-masked]> wrote:

> I highly recommend virtualbox.

I've used it for some time, and I find it very easy to use and set up. I
run a window xp guest regularly, several alpine guests, and occasionally
ubuntu/debian/fedora boxes. It's easy to change MAC address, and set up
virtualbox only networks. I personally like the gui for it, but you can do
everything and more from the VBoxManage command line.

I've tried xen, qemu-kvm, and libvirt, and didn't get very far. None of
them were as easy to use as virtualbox, so I gave up and went back to it.

> I do have the closed source bits installed on my non-alpine host, however
I don't really use them. (USB passthrough, RDP video)

Just my thoughts on it.
Cameron

---

From: Natanael Copa <[email-masked]>
Date: Thu, 15 Dec 2011 11:11:04 +0100

On Thu, 8 Dec 2011 09:53:37 -0600

> I've used it for some time, and I find it very easy to use and set
> up. I run a window xp guest regularly, several alpine guests, and
> occasionally ubuntu/debian/fedora boxes. It's easy to change MAC
> address, and set up virtualbox only networks. I personally like the
> gui for it, but you can do everything and more from the VBoxManage
> command line.

Thanks for the feedback. I used it some time ago (before i switched to
alpine as desktop) but i found it cumbersome to test alpine iso's with
it. I had to remove old iso and add new iso for every iso rebuild since
virtualbox stores some UUID. symlinking tricks to iso images didnt
work.
 
> I've tried xen, qemu-kvm, and libvirt, and didn't get very far. None
> of them were as easy to use as virtualbox, so I gave up and went back
> to it.
> 

I have used disk images over virtual USB bus with qemu to debug boot
from cdrom + configs on usb issues. Unfortunally, I have not find any
virtualization that allows me too boot from usb bus. (i think the
limitation is in qemu bios)
 
> Cameron

Thanks for the feedback!
Yes, I do want have virtualbox in alpine at some point.

-nc

---

---

From: Leonardo Arena <[email-masked]>
Date: Fri, 9 Dec 2011 11:15:54 +0100

> features. Those will not be available on Alpine.

I've used VirtualBox first and Virt-Manager extensively on Ubuntu, and
I'll definitely go with Virt-Manager.
It's more flexible and powerful than Virtualbox under several aspects.
One bad note is the configuration of networking.
Although latest versions have introduced support for macvtap that
doesn't require setting up a bridge at host level, macvtap is slow
compared to a tun interface.
So setting up networking under Virt-Manager is not trivial like in Virtualbox.

The problem is that Virt-Manager is still broken and may be libvirt
needs some work in order to get them fully functional under Alpine.

- leonardo

---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 15 Dec 2011 11:13:01 +0100

On Fri, 9 Dec 2011 11:15:54 +0100

> So setting up networking under Virt-Manager is not trivial like in

Non-trivial netoworking setups seems to be non-trivial in all
virtualization solutions. Well, virtualbox and vmware makes it fairly
easy.
> needs some work in order to get them fully functional under Alpine.

Yeah. I think we want fir virt-manager on Alpine in any case.

-nc

---

---

From: Jesse Young <[email-masked]>
Date: Fri, 9 Dec 2011 07:09:24 -0600

On Thu, 8 Dec 2011 07:55:22 +0100

> I think I have the following alternatives:

I used to work with virtualbox, but I found that when I would run a
guest for a couple of days it (the Windows XP guest) would crash. I
switched to raw qemu-kvm to libvirtd/virt-manager.

> new qemu guest? how do i start it, stop it?)

I've been using the virt-manager (pygtk) utility with some
success. it's fairily easy to work with. I couldn't get raw libvirtd
working, too much XML crap, and no apparent starting point, so I
looked up virt manager.  I found libvirtd to be really obnoxious
when it sticks it's fingers into my iptables/dnsmasq/radvd setup. I
worked around this by setting the iptables path, etc. to /bin/true at
configure time. So far I haven't come across any issues with it. If
you're doing fancy network testing, you'd probably want to do this
manually anyways. I was suprised libvirtd doesn't hand off it's
networking configuration to a script.

Just my 2c
Jesse

---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 15 Dec 2011 11:15:43 +0100

On Fri, 9 Dec 2011 07:09:24 -0600
Jesse Young <[email-masked]> wrote:

> > Windows 7 guest. I'd like to have an ubuntu guest and a fedora
> > guest. And fire up a random distro once in a while.
> >

Thanks for the feedback. I have similar feeling of libvirtd from the
experience I had with it when i used Arch Linux as desktop. It set up
dnsmasq and i dunno what.

Seems like simplest is to use plain qemu so far.

-nc

---

---

From: Kevin Chadwick <[email-masked]>
Date: Thu, 15 Dec 2011 11:12:55 +0000

On Thu, 15 Dec 2011 11:15:43 +0100
Natanael Copa wrote:

This is probably of little interest and virtual box has probably
improved since due to the criticism but it may be worth knowing.

Haven't tried for a while but OpenBSD wouldn't run on virtualbox and
Theo de raadt said after wasting time working out a bug report was
virtual boxes fault that he couldn't believe any OS would ignore the
problems and continue to run with the bugs it has. Something to do with
memory handling I think. I've used vmware since as the machine I want
to run it on hasn't got hardware vitualisation support but it is a pain
if you run out of free space. I've looked at disabling that but was
worried about stability.

> I had with it when i used Arch Linux as desktop.

I'm setting up some Arch desktops now. Any reason you don't use Arch
anymore or just switched to Gentoo hardened or Alpine?

---

---

From: Florian Heigl <[email-masked]>
Date: Wed, 14 Dec 2011 22:41:42 +0100

Hi Natanael,

> multiple NICs in guests and will need multiple guest vlans etc.

I can offer two things:
Help you with dealing with the XML files needed for use with Libvirt
and making the networks autostart.
Work together to make the Xen port 100% usable and give hints on how
to use it for a desktop-py scenario

I would be happy about the second since it would be good to work on
that. Not saying that it wouldn't help me a lot, too ;)

Also I'm afraid there will be two half-working virtualization
solutions instead of one well-working one, since I except Virtualbox
to be a lot of work to package / make work.

VirtualBox can also be run under libvirt control, or without it. This
year i've probably launched, tested and deleted 600 or so libvirt VMs,
and had no problems with it.
But there is a fine line to it. My workmates had tried to build the
autobuild cluster for our check_mk build using it and virtualbox kept
going topside down, with a wide choice of different errors.

But, to be clear on that, on my work laptop and on the desktop at
home, virtualbox is the #1 choice. I'll also use KVM on the desktop
for OpenNebula testing, but that means it's stricly as a "server" like
scenario. Mostly I blame that on Libvirt idiocy.
One last thing one should mention: VirtualBox is the least user
friendly of the pack once you're using the CLI for automating install
tests, etc.
Cool thing is that VirtualBox has great PXE support, emulates Intel
NICs instead of Realcrap[tm].

I wouldn't object using as a desktop thing Xen instead if I had a
distro that gave me a working Xen install. Although, honestly, stuff
like mounting and unmounting of ISOs is about 5000% more complicated
there than anywhere else ;)

So, err, this is a rather undecided reply.

Poke at Virtualbox, and if you think you can port it in 1-2 days, then
go with virtualbox.
Otherwise, or once you want automated installs, memory compression,
dumping live VM memory, scripting, etc. and a general notation of
"bleeding edge", switch to Xen.

Florian

---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 15 Dec 2011 11:33:55 +0100

On Wed, 14 Dec 2011 22:41:42 +0100
Florian Heigl <[email-masked]> wrote:

> > I think raw qemu is a bit cumbersome since i need to keep track of
> > the mac address of all the guests. When I create a guest i create a

I use /etc/init.d/vde.tap$N atm to start the virtual switches. and add
the tap devices to bridges together with the ether interfaces.

this works farily well now, even if it was not really trivial to set up.

This is done completely without any xml files and I still use shell
scripts with mac adresses for qemu.

> to use it for a desktop-py scenario

The stopper for me was that xorg didnst start in my dom0 with Sandy
Bridge. IT did start on the old box with ATI card. (Maybe i shouldnt
start xorg in dom0 in first place?)

switching from xorg to tty didnt work either. (ctrl-alt-1 etc)

> Poke at Virtualbox, and if you think you can port it in 1-2 days, then

I have started with this but it seems like it still needs some work :-/

> "bleeding edge", switch to Xen.

I found xen seems to be pretty complicated for desktop use. For now I
think the simplest solution for me is continue use qemu. Maybe get it
working with libvirtd. Ping me on IRC if you have time to help me set
that up.

I got spice working with qemu too.
 
> Florian

Thanks a lot for your insightsful comments!

-nc

---