-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a guest OS whose name contain spaces causes it to fail #306
Comments
I have a patch for this issue. I am having problems to subscribe to the mailing list, but I will submit it as soon as I my request is approved/added to the list. |
How can you tell that error was due to the space in the name? The error message doesn't mention that. I am able to create and start a VM with a space in the name using Kimchi (I used "hello world"). And I am also able to do the same using virsh. So I don't think we should add this restriction. Regarding the bug, I don't know what has caused it. It may be some interaction between Ubuntu's AppArmor and libvirt... but it cannot be the space itself, otherwise I would have hit this same error, or even virsh, when I set a VM with spaces. I'm running Fedora 20. |
Well, renaming it fixes the problem: What I think it's odd is that when I rename it with spaces, it causes Virtual Machine Manager to fail as well. Here's a sample: With that said, I don't think it's a problem in Kimchi itself, and it's probably in libvirt or something else. However, given the fact that Virtual Machine Manager prevents the user from using spaces in the name of the guest OS, I think Kimchi should do the same. |
This may fix the problem but it may not be the best solution, specially when this solutions adds a limitation.
If that's an internal libvirt error, it will happen indeed to every client which uses it under the hood (Kimchi, virt-manager, virsh).
I also don't think it's a problem in Kimchi itself. The message says there's a conflict with AppArmor, we need to find out what is that exactly.
I don't think we should do something just because someone also does it, specially because this limits the possible VM names. |
What do you think would be an acceptable solution for / work-around this issue? |
I was able to create and start VMs with spaces on Fedora and openSUSE, but not on Ubuntu. So the problem only seems to happen there. The error message shows that the AppArmor's profile related to libvirt could not be loaded. I don't know what exactly is AppArmor, I believe it's something like a firewall or SELinux combined... AppArmor might have some profile that's stopping libvirt from creating a VM with space in the name. I think the solution would be to understand exactly what's happening - I just wrote here what I think it might be - and to make AppArmor work nicely with libvirt. We can debug AppArmor's log, libvirt's interation with it through the profiles, etc. As a last resort, we could apply that patch above (which blocks some VM name characters) only to Ubuntu. I really don't like the idea of restricting every single distro only because of Ubuntu as this seems to be a problem related to its own security layer, AppArmor. But even in that case, the patch doesn't actually fix the problem: you weren't able to create VMs with spaces, and after the patch, you're still not. So I think it's worth to debug this a little further and come up with a real solution. |
Maybe this can give us a hint about where to look at:
|
There is an "old" bug on launchpad where some users are reporting the exact same thing with QEMU and libvirt: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/799997 |
I have posted a work-around in the dev PDL. You can disable virt-aa-helper so that it's not loaded by libvirtd. Here's what I sent:
We have to put this information on a wiki page. |
It can works well to start a VM whose name contain spaces on F20. |
It's Ubuntu's AppArmor limitation. |
If not, tag it with "wontfix" ? |
I submitted a patch, but since it's a Ubuntu limitation it does not make sense to accept it. That app armor behavior can be disabled by following the steps I provided above. |
Hmm, ran into this issue (Ubuntu 14.04) after a (=compliment) flawless experience with kimchi. For new users, this can be typed as 'scary error'. Anyone considered to catch this error and amend it with the tip "Not all host OS-es can use spaces in the VM name". Then you don't have to change anything when this problem in Ubuntu is fixed, and don't have to impose restrictions on all users. And the error is much less scary ;-) |
I am strongly in favor for adding a temporary restriction/notification when running on Ubuntu. The error is exceptionally hard to figure out for someone new to Kimchi. |
As @ss23 told I ran into it. Without proper knowledge, this is a "never to be figured out" bug. Please add a restriction to the name field to disallow spaces. |
Creating a guest OS whose name contain spaces causes Kimchi to fail to start the guest OS. The UI displays a message stating that it "Failed to start":
This is the Kimchid startup log:
I believe Kimchi should prevent users from using certain characters in the Guest OS name, just like Virtual Machine Manager does. Here's an attached image for reference:
The text was updated successfully, but these errors were encountered: