I am planning on running several virtual machines on a single host. I will have two or three Linux baeed virtual machines and one or two Windoze. I plan on using a F11 host system.
I need most of these to run automatically on boot-up of the host system. It would be really nice if I could use something like the Ctl-Alt-FN to be able to access and switch between virtual machines. This needs to be stable. The machines that these virtual machines are intended to replace are often running hundreds of days between reboots.
My gut feel is that the virt-manager suite might be the way to go, editting the apropriate xml files as required. I also see there is a qemu launcher and it seems to work okay. I suspect there are others as well.
What tends to be the consensus here on the various virtual machine managers? Are there white papers somewhere that could give some insight?
Thanks
Rich
On Tue, Jun 30, 2009 at 10:59:55AM -0400, Rich Mahn wrote:
I am planning on running several virtual machines on a single host. I will have two or three Linux baeed virtual machines and one or two Windoze. I plan on using a F11 host system.
I need most of these to run automatically on boot-up of the host system. It would be really nice if I could use something like the Ctl-Alt-FN to be able to access and switch between virtual machines. This needs to be stable. The machines that these virtual machines are intended to replace are often running hundreds of days between reboots.
I don't know of anything that lets you use Ctrl-Alt-FN to switch between guests. If X is running then you can run several instances of virt-viewer, possibly fullscreen.
For stability and long-term maintainability, I wonder if you've considered using RHEL or CentOS? That means you have to use Xen as the hypervisor, but if you use libvirt / virsh / virt-manager, the future upgrade path to KVM is reasonable. All tools stay the same, and you just need to run our forthcoming v2v tool on the guests (or reinstall the guests) when you upgrade.
My gut feel is that the virt-manager suite might be the way to go, editting the apropriate xml files as required. I also see there is a qemu launcher and it seems to work okay. I suspect there are others as well.
The only one we're supporting here on Fedora is libvirt / virsh / virt-manager. Use 'virsh edit <domain>' to edit the XML for a domain. The same commands will work on RHEL / CentOS too.
Rich.
I thought I had virt-manager running, but I see it doesn't work correctly. I think I am either missing a package or have permissions or configuration parameters wrong.
Here are some of the problems:
1. I can run virt-manager (from the command line) from a regular account fine, but if I am root, I get this error when I try the same thing:
No protocol specified No protocol specified Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager.py", line 371, in <module> _show_startup_error(str(run_e), "".join(traceback.format_exc())) File "/usr/share/virt-manager/virt-manager.py", line 52, in _show_startup_error import gtk File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 79, in <module> _init() File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 67, in _init _gtk.init_check() RuntimeError: could not open display
2. virsh seems to work as root. It lists the domains, anyhow.
3. When I try to create a new domain sometimes it looks like it is working until it is actually supposed to start. Then nothing seems to happen. I don't know what processes to look for via 'ps', but I suspect whatever started died almost immediately. NOTE: this is what happens if I don't specify any virtual disk storge.
4. Creating exactly the same domain with virtual disk storage, when it tries to create the domain I get the popup error "Unable to compelte install: internal error Domain <mydomainname> didn't show up." The detail of the error is this:
Unable to complete install '<class 'libvirt.libvirtError'> internal error Domain test didn't show up
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/create.py", line 1501, in do_install dom = guest.start_install(False, meter = meter) File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 541, in start_install return self._do_install(consolecb, meter, removeOld, wait) File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 633, in _do_install self.domain = self.conn.createLinux(install_xml, 0) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 974, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: internal error Domain test didn't show up
5. For the first case described in 3 above, the virt-manager shows the domain as running. virsh also shows it as running. However, if I try to terminate it, shut it down, or whatever (even restart later), I get this error:
Error shutting down domain: invalid domain pointer in no domain with matching id -1
and the details are:
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/engine.py", line 507, in shutdown_domain vm.shutdown() File "/usr/share/virt-manager/virtManager/domain.py", line 565, in shutdown self.vm.shutdown() File "/usr/lib64/python2.6/site-packages/libvirt.py", line 472, in shutdown if ret == -1: raise libvirtError ('virDomainShutdown() failed', dom=self) libvirtError: invalid domain pointer in no domain with matching id -1
6. Looking at just qemu from the command line, I can run this as a normal user:
qemu -no-reboot -boot d -cdrom cdr.iso
and it works as expected, bring up a window that is a the console associated with that virtual machine. However, if I run the exact same command as root, I get these errors, and nothing is run:
No protocol specified No protocol specified Could not initialize SDL - exiting
As bad as this looks, I get the feeling it's just some permissions problem or a configuration problem somewhere. I'm guessing virt-manager tries to do some things as root and ends up equivalent to the command line qemu situation for root.
On Tue, Jun 30, 2009 at 7:31 PM, Rich Mahnrich@lat.com wrote:
I thought I had virt-manager running, but I see it doesn't work correctly. I think I am either missing a package or have permissions or configuration parameters wrong.
Here are some of the problems:
- I can run virt-manager (from the command line) from a regular account
fine, but if I am root, I get this error when I try the same thing:
Don't run this command as run, it is trying to open an X display.
- Looking at just qemu from the command line, I can run this as a normal user:
qemu -no-reboot -boot d -cdrom cdr.iso
and it works as expected, bring up a window that is a the console associated with that virtual machine. However, if I run the exact same command as root, I get these errors, and nothing is run:
As above.
Anand
On Tue, Jun 30, 2009 at 02:31:45PM -0400, Rich Mahn wrote:
RuntimeError: could not open display
You need to make sure your $DISPLAY variable is passed when you become root. Or just run virt-manager as normal user - it's designed to use PolicyKit to acquire the right permissions.
virsh seems to work as root. It lists the domains, anyhow.
When I try to create a new domain sometimes it looks like it is working until it is actually supposed to start. Then nothing seems to happen. I don't know what processes to look for via 'ps', but I suspect whatever started died almost immediately. NOTE: this is what happens if I don't specify any virtual disk storge.
qemu prevents domains from starting without storage.
- Creating exactly the same domain with virtual disk storage, when it tries to create the domain I get the popup error "Unable to compelte install: internal error Domain <mydomainname> didn't show up." The detail of the error is this:
Look at the log file (/var/log/libvirt/qemu IIRC).
- For the first case described in 3 above, the virt-manager shows the domain as running. virsh also shows it as running. However, if I try to terminate it, shut it down, or whatever (even restart later), I get this error:
[more bugs elided]
The libvirt which was in F11-Preview was really broken. Upgrade to the new version in updates-testing and reboot to fix everything.
Rich.
On Tue, Jun 30, 2009 at 02:31:45PM -0400, Rich Mahn wrote:
RuntimeError: could not open display
You need to make sure your $DISPLAY variable is passed when you become root. Or just run virt-manager as normal user - it's designed to use PolicyKit to acquire the right permissions.
It's not DISPLAY that's the problem. I don't know exactly what it is, but when I changed back to gdm from kdm, the root type problems went away.
virsh seems to work as root. It lists the domains, anyhow.
When I try to create a new domain sometimes it looks like it is working until it is actually supposed to start. Then nothing seems to happen. I don't know what processes to look for via 'ps', but I suspect whatever started died almost immediately. NOTE: this is what happens if I don't specify any virtual disk storge.
qemu prevents domains from starting without storage.
It seems to work fine with just a cd-image.
- Creating exactly the same domain with virtual disk storage, when it tries to create the domain I get the popup error "Unable to compelte install: internal error Domain <mydomainname> didn't show up." The detail of the error is this:
Look at the log file (/var/log/libvirt/qemu IIRC).
VERY good advice. From the log file I learned that the startup problems I had were due to the cdr iso file being on nfs storage. Once I copied it to the local disk it worked fine. Changing the virt_use_nfs, qemu_use_nfs didn't work because virt-manager tries to set the security label, and that's not supported on this version of nfs.
- For the first case described in 3 above, the virt-manager shows the domain as running. virsh also shows it as running. However, if I try to terminate it, shut it down, or whatever (even restart later), I get this error:
[more bugs elided]
The libvirt which was in F11-Preview was really broken. Upgrade to the new version in updates-testing and reboot to fix everything.
I am using whatever the current F11/x86_64 updates has. I couldn't find any libvirt in updates-testing.
Rich.
great name!!!
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
On Wed, Jul 01, 2009 at 10:25:37AM -0400, Rich Mahn wrote:
VERY good advice. From the log file I learned that the startup problems I had were due to the cdr iso file being on nfs storage. Once I copied it to the local disk it worked fine. Changing the virt_use_nfs, qemu_use_nfs didn't work because virt-manager tries to set the security label, and that's not supported on this version of nfs.
This is a bug - any ideas Dan?
Rich.
On Wednesday 01 July 2009 10:34:41 Richard W.M. Jones wrote:
On Wed, Jul 01, 2009 at 10:25:37AM -0400, Rich Mahn wrote:
VERY good advice. From the log file I learned that the startup problems I had were due to the cdr iso file being on nfs storage. Once I copied it to the local disk it worked fine. Changing the virt_use_nfs, qemu_use_nfs didn't work because virt-manager tries to set the security label, and that's not supported on this version of nfs.
This is a bug - any ideas Dan?
At the very least, I consider this a bug and have reported it as such: https://bugzilla.redhat.com/show_bug.cgi?id=508865
I suspect this is the result of trying to use SELinux to protect everything and the mandatory access control idea that everything is disallowed except that which is explicitly permitted.
But, I just do not understand what and why CD/DVD images and devices are being protected. Furthermore, when virtualization changes a file's context (including /dev/sr0), could this effect other valid usage of these files/devices? If there is no effect for other applications, then just what is protected?
Gene
On Wed, Jul 01, 2009 at 10:25:37AM -0400, Rich Mahn wrote:
- Creating exactly the same domain with virtual disk storage, when it tries to create the domain I get the popup error "Unable to compelte install: internal error Domain <mydomainname> didn't show up." The detail of the error is this:
Look at the log file (/var/log/libvirt/qemu IIRC).
VERY good advice. From the log file I learned that the startup problems I had were due to the cdr iso file being on nfs storage. Once I copied it to the local disk it worked fine. Changing the virt_use_nfs, qemu_use_nfs didn't work because virt-manager tries to set the security label, and that's not supported on this version of nfs.
Thats a bug in libvirt
https://bugzilla.redhat.com/show_bug.cgi?id=507555
Daniel
On Wednesday 01 July 2009 04:33:19 Richard W.M. Jones wrote:
- For the first case described in 3 above, the virt-manager shows the domain as running. virsh also shows it as running. However, if I try to terminate it, shut it down, or whatever (even restart later), I get this error:
[more bugs elided]
The libvirt which was in F11-Preview was really broken. Upgrade to the new version in updates-testing and reboot to fix everything.
Can you be a little more specific as to which virtualization packages should be pulled from updates-testing. Looking over what is available as of today, it is not obvious that there are any such packages. As of this date, I am up-to- date with respect to any regular updates available.
Gene
On Wed, Jul 01, 2009 at 12:03:20PM -0400, Gene Czarcinski wrote:
On Wednesday 01 July 2009 04:33:19 Richard W.M. Jones wrote:
- For the first case described in 3 above, the virt-manager shows the domain as running. virsh also shows it as running. However, if I try to terminate it, shut it down, or whatever (even restart later), I get this error:
[more bugs elided]
The libvirt which was in F11-Preview was really broken. Upgrade to the new version in updates-testing and reboot to fix everything.
Can you be a little more specific as to which virtualization packages should be pulled from updates-testing. Looking over what is available as of today, it is not obvious that there are any such packages. As of this date, I am up-to- date with respect to any regular updates available.
In that case you should be fine.
I have a mix of boxes on (old) Rawhide, F11-Preview and so on, and on some of them I had to upgrade libvirt (only) to get guest installation working.
Rich.