Tomasz Kowal
2014-Jun-05 21:00 UTC
[libvirt-users] Cannot obtain CPU freq during vbox machine creation
Dear libvirt experts, I can not instantiate even a simple machine when using the 'vbox' hypervisor: s14% virt-install --connect=vbox:///session --virt-type vbox --name vtest --memory 500 ERROR cannot obtain CPU freq: No such file or directory s14% virsh -c vbox:///session błąd: cannot obtain CPU freq: No such file or directory (1) How to fix this error? The VirtualBox driver seems to be installed: s14% virsh -V Narzędzie wiersza poleceń virsh biblioteki libvirt 1.2.5 Proszę zobaczyć stronę WWW pod adresem http://libvirt.org/ Compiled with support for: Hypervisors: QEMU/KVM UML VMWare PHYP VirtualBox ESX Test Networking: Remote Bridging Storage: Dir SCSI Miscellaneous: Daemon Secrets Debug Readline Modular s14% uname -a FreeBSD s14 9.3-PRERELEASE FreeBSD 9.3-PRERELEASE #0: Fri May 16 06:45:56 CEST 2 014 . Yours faithfully, Tomasz Kowal
Daniel P. Berrange
2014-Jun-06 09:28 UTC
Re: [libvirt-users] Cannot obtain CPU freq during vbox machine creation
On Thu, Jun 05, 2014 at 11:00:43PM +0200, Tomasz Kowal wrote:> Dear libvirt experts, > > I can not instantiate even a simple machine when using the 'vbox' hypervisor: > > s14% virt-install --connect=vbox:///session --virt-type vbox --name vtest --memory 500 > ERROR cannot obtain CPU freq: No such file or directory > > s14% virsh -c vbox:///session > błąd: cannot obtain CPU freq: No such file or directoryThat error message means the following system call is failing if (sysctlbyname("dev.cpu.0.freq", &cpu_freq, &cpu_freq_len, NULL, 0) < 0) { virReportSystemError(errno, "%s", _("cannot obtain CPU freq")); return -1; } Afraid I don't know enough about FreeBSD to say why that might fail, but there's obviously something unexpected in the setup or deployment of your system that differs from what we previously had tested with. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Michal Privoznik
2014-Jun-06 09:31 UTC
Re: [libvirt-users] Cannot obtain CPU freq during vbox machine creation
On 05.06.2014 23:00, Tomasz Kowal wrote:> Dear libvirt experts, > > I can not instantiate even a simple machine when using the 'vbox' hypervisor: > > s14% virt-install --connect=vbox:///session --virt-type vbox --name vtest --memory 500 > ERROR cannot obtain CPU freq: No such file or directory > > s14% virsh -c vbox:///session > błąd: cannot obtain CPU freq: No such file or directory > (1) > > How to fix this error? The VirtualBox driver seems to be installed: > > s14% virsh -V > Narzędzie wiersza poleceń virsh biblioteki libvirt 1.2.5 > Proszę zobaczyć stronę WWW pod adresem http://libvirt.org/ > > Compiled with support for: > Hypervisors: QEMU/KVM UML VMWare PHYP VirtualBox ESX Test > Networking: Remote Bridging > Storage: Dir SCSI > Miscellaneous: Daemon Secrets Debug Readline Modular > > s14% uname -a > FreeBSD s14 9.3-PRERELEASE FreeBSD 9.3-PRERELEASE #0: Fri May 16 06:45:56 CEST 2This is interesting. We have a code for getting this info on FreeBSD, but for some reason it's not working on your system: src/nodeinfo.c=1041=int nodeGetInfo(virNodeInfoPtr nodeinfo) -- src/nodeinfo.c-1083- unsigned long cpu_freq; src/nodeinfo.c-1084- size_t cpu_freq_len = sizeof(cpu_freq); src/nodeinfo.c-1085- src/nodeinfo.c-1086-# ifdef __FreeBSD__ src/nodeinfo.c-1087- if (sysctlbyname("dev.cpu.0.freq", &cpu_freq, &cpu_freq_len, NULL, 0) < 0) { src/nodeinfo.c:1088: virReportSystemError(errno, "%s", _("cannot obtain CPU freq")); src/nodeinfo.c-1089- return -1; src/nodeinfo.c-1090- } src/nodeinfo.c-1091- src/nodeinfo.c-1092- nodeinfo->mhz = cpu_freq; src/nodeinfo.c-1093-# else src/nodeinfo.c-1094- if (sysctlbyname("hw.cpufrequency", &cpu_freq, &cpu_freq_len, NULL, 0) < 0) { src/nodeinfo.c:1095: virReportSystemError(errno, "%s", _("cannot obtain CPU freq")); src/nodeinfo.c-1096- return -1; src/nodeinfo.c-1097- } src/nodeinfo.c-1098- src/nodeinfo.c-1099- nodeinfo->mhz = cpu_freq / 1000000; src/nodeinfo.c-1100-# endif I guess the sysctlbyname() call on te line 1087 failed, but I'm not sure why. Maybe the name is version dependent? Michal
Roman Bogorodskiy
2014-Jun-07 15:56 UTC
Re: [libvirt-users] Cannot obtain CPU freq during vbox machine creation
Tomasz Kowal wrote:> Dear libvirt experts, > > I can not instantiate even a simple machine when using the 'vbox' hypervisor: > > s14% virt-install --connect=vbox:///session --virt-type vbox --name vtest --memory 500 > ERROR cannot obtain CPU freq: No such file or directory > > s14% virsh -c vbox:///session > błąd: cannot obtain CPU freq: No such file or directory > (1) > > How to fix this error? The VirtualBox driver seems to be installed: > > s14% virsh -V > Narzędzie wiersza poleceń virsh biblioteki libvirt 1.2.5 > Proszę zobaczyć stronę WWW pod adresem http://libvirt.org/ > > Compiled with support for: > Hypervisors: QEMU/KVM UML VMWare PHYP VirtualBox ESX Test > Networking: Remote Bridging > Storage: Dir SCSI > Miscellaneous: Daemon Secrets Debug Readline Modular > > s14% uname -a > FreeBSD s14 9.3-PRERELEASE FreeBSD 9.3-PRERELEASE #0: Fri May 16 06:45:56 CEST 2 014Hi, Could you please show an output of the 'sysctl dev.cpu.0.freq' command? PS I'm not aware of anybody using libvirtd on FreeBSD with the vbox driver, so quite probably you're entering an unexplored territory. I've tried connecting to 'vbox:///session' though and it worked, but I didn't go further.> . > > > Yours faithfully, > Tomasz KowalRoman Bogorodskiy