From Fedora Project Wiki

(Note about hot remove)
(Link to virt-manager bug)
 
Line 10: Line 10:
  
 
* Launch virt-manager. Start with a shutoff VM. Verify that the guest has a 'Channel qemu-ga' device listed in its hardware details.
 
* Launch virt-manager. Start with a shutoff VM. Verify that the guest has a 'Channel qemu-ga' device listed in its hardware details.
* In Details->CPU, change the Max CPUs to 4 and the Current CPUs to 1.
+
* In Details->CPU, change the Max CPUs to 4 and the Current CPUs to 1. Note: there's a [https://bugzilla.redhat.com/show_bug.cgi?id=1016318 bug in virt-manager] where it doesn't update the 'current vcpus' UI. But it does actually make the change.
 
* Start the VM, log in, open a terminal and <code>su -</code> to get root.
 
* Start the VM, log in, open a terminal and <code>su -</code> to get root.
 
* Verify qemu-ga is running in the guest: <pre>ps axwww | grep qemu-ga</pre>
 
* Verify qemu-ga is running in the guest: <pre>ps axwww | grep qemu-ga</pre>

Latest revision as of 23:11, 7 October 2013

Description

Attach a CPU to a running VM.

Setup

Functioning virt host and VM created on F20+.

How to test

  • Launch virt-manager. Start with a shutoff VM. Verify that the guest has a 'Channel qemu-ga' device listed in its hardware details.
  • In Details->CPU, change the Max CPUs to 4 and the Current CPUs to 1. Note: there's a bug in virt-manager where it doesn't update the 'current vcpus' UI. But it does actually make the change.
  • Start the VM, log in, open a terminal and su - to get root.
  • Verify qemu-ga is running in the guest:
    ps axwww | grep qemu-ga
  • Verify only CPU is visible to the guest, this should only show 'cpu0': ls -d /sys/devices/system/cpu/cpu[0-9]
  • In virt-manager, change the current CPU allocation to 2, hit apply.
  • Back in the guest, run the 'ls' command again, you should now see cpu0 and cpu1.
  • Online the CPU with: echo 1 > /sys/devices/system/cpu/cpu1/online
  • Verify the CPU shows up in: cat /proc/cpuinfo

Note: Hot remove is not currently supported.

Expected Results

No obvious errors occur, all results are as indicated.

Additional info