Ask Your Question
0

Nova generated an error : libvirtError : unable to create cgroup for instance : no such file or directory [on hold]

asked 2015-01-16 21:34:47 -0500

Wang Xiaoyu gravatar image

updated 2015-01-19 18:43:30 -0500

When i did some operations which restart VM , create VM or resume VM from susppend status , then i got some error information about libvirt.

The error log is here:

`File  "/usr/lib/python2.7/dist-packages/libvirt.py", line 711, in createWithFalgs
     if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed' , don=self)
libvirtError : unable to create cgroup for instance : no such file or directory 
`

so, you can see that libvirtError: Unable to create cgroup for instance error. I think that the cgroup files should be deleted by upstart or systemd.I also search related discussion about this issue. it's said that the error is upstart or systemd bug. But i am not sure about it. Then I wonder the real reason for this issue, and how to resolve it. if anyone know that, please let me know.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-01-19 05:04:06 -0500

updated 2015-01-19 05:25:00 -0500

Hi Wang Xiaoyu, I have one questions for you. ----> Were you able to create an instance and tell me whether it went 'running state'? I think this error cannot pop up, if you have created an instance!!!!!!!!

OpenStack website has a document on Instance resource qouta which says that, CPU quota are handled by using cgroups. I would suggest you to reinstall libvirtd and try out the things

edit flag offensive delete link more

Comments

Hello, Yashpal Beppurana . This is right that instance's cpu , memory and freezer ,and so on, are handled by using cgroups. To response your question, I can not create instance on my openstack. I found that some cgroup files were deleted. Others said that the error is upstart or systemd bug.

Wang Xiaoyu gravatar imageWang Xiaoyu ( 2015-01-19 06:14:23 -0500 )edit

Let's go on here. When instance dose not using some resouces, such as blockio, the upstart or systemd will delete it which is in the /sys/fs/cgroup/ folder.Then you restart, create or suspend , and so on, your instances that some issues will be generated.

Wang Xiaoyu gravatar imageWang Xiaoyu ( 2015-01-19 06:19:25 -0500 )edit

Then, i try two way to resolve issue.

  • Using the command mount -t cgroup -o memory name /sys/fs/cgroup/cpu that it will generate /sys/fs/cgroup/cpu folder. The /sys/fs/cgroup/cpu is the missing files which cause the error.
Wang Xiaoyu gravatar imageWang Xiaoyu ( 2015-01-19 06:26:50 -0500 )edit
  • I restart libvirt-bin service, but i check /sys/fs/cgourp/ that /sys/fs/cgroup contains a empty cpu folder. But i can create instance. So I guess that it may not qouta instance resources, that i have not check it.

So , if you know the reason. Please tell me. thanks.

Wang Xiaoyu gravatar imageWang Xiaoyu ( 2015-01-19 06:29:59 -0500 )edit

Hey, I don't know the reason on why the things are getting deleted from your /sys/fs/cgroup/cpu folder. Try installing libvirt-bin again on your machine. Hope that works, good luck.

Yashpal Beppurana gravatar imageYashpal Beppurana ( 2015-01-19 07:34:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-01-16 21:34:47 -0500

Seen: 1,084 times

Last updated: Jan 19 '15