I have a server that I am running the Ubuntu 16.04.2 Server on and I'm trying to start up a Virtual Machine but I'm having some trouble. I can only get it to use one CPU at a time (running it through the roof) even if I specify multiple cores. If I try to specify multiple threading or sockets, it won't even start and gives me a cpu topology error. I have 16 cores with 2 threads each so that's not an issue. I'm running a Intel(R) Xeon(R) CPU X5550 @ 2.67GHz with HTT enabled so I don't understand the problem. If I specify vcpus=2,cores=2 it only uses one, if I try to use vcpus=2,cores=2,threads=2 it doesn't even start and just gives me the error.

Here is the command I am using:

sudo virt-install --name SMB-Ubuntu-Server --ram=1000 --vcpus=2,threads=2,cores=2  --cpuset=1,2 --cpu host --hvm --disk path=/var/lib/libvirt/images/SMB-Ubuntu-Server-vm1,size=150 --cdrom /var/lib/libvirt/boot/ubuntu-16.04.2-server-amd64.iso --graphics vnc

I don't want to use to many cpus because this is one of the more simpler vm's that I want to use on this machine.

  • Show us your actual entire virt-install command. If it is an existing VM, did you try to use virsh edit and try to change the number of vcpus from whatever is set in the .xml definition file? I always allocate 4 cpus, and have never had any troubles. – Doug Smythies Jul 2 '17 at 15:50
  • @DougSmythies I updated the question to include the command. It shouldn't be an existing one as whenever it failed, I would destroy and undefine it. And, where is the .xml definition file saved for a machine? – BobserLuck Jul 2 '17 at 23:11
  • Try changing this: --vcpus=2,threads=2,cores=2 --cpuset=1,2 to this --vcpus=3 (for example). The .xml files are at /etc/libvirt/qemu/ , but never edit directly, only via virsh edit. For example virsh edit SMB-Ubuntu-Server. – Doug Smythies Jul 3 '17 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.