From Fedora Project Wiki
(Create page) |
(Note about hot remove) |
||
Line 18: | Line 18: | ||
* Online the CPU with: <code>echo 1 > /sys/devices/system/cpu/cpu1/online</code> | * Online the CPU with: <code>echo 1 > /sys/devices/system/cpu/cpu1/online</code> | ||
* Verify the CPU shows up in: <code>cat /proc/cpuinfo</code> | * Verify the CPU shows up in: <code>cat /proc/cpuinfo</code> | ||
Note: Hot remove is not currently supported. | |||
|results= | |results= |
Revision as of 22:08, 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.
- 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.