aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-11 15:21:54 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-11 15:21:54 +0000
commit6f338c3469297d748be33aea864161e36e068436 (patch)
tree99f66dd4c49c9f6ded9b1d13f47e33900a96e47c /monitor.c
parent880345c484df16a1ec91febb8751d43b5fb8fc77 (diff)
qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)
Add monitor command to hot-add PCI devices (nic and storage). Syntax is: pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params It returns the domain, bus and slot for the newly added device on success. It is possible to attach a disk to a device after PCI initialization via the drive_add command. If so, a manual scan of the SCSI bus on the guest is necessary. Save QEMUMachine necessary for drive_init. Add monitor command to hot-remove devices, remove device data on _EJ0 notification. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6610 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 778f49fb3c..35f014d211 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1511,6 +1511,20 @@ static const term_cmd_t term_cmds[] = {
"", "cancel the current VM migration" },
{ "migrate_set_speed", "s", do_migrate_set_speed,
"value", "set maximum speed (in bytes) for migrations" },
+#if defined(TARGET_I386)
+ { "drive_add", "ss", drive_hot_add, "pci_addr=[[<domain>:]<bus>:]<slot>\n"
+ "[file=file][,if=type][,bus=n]\n"
+ "[,unit=m][,media=d][index=i]\n"
+ "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
+ "[snapshot=on|off][,cache=on|off]",
+ "add drive to PCI storage controller" },
+ { "pci_add", "sss", pci_device_hot_add, "pci_addr=auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
+ { "pci_del", "s", pci_device_hot_remove, "pci_addr=[[<domain>:]<bus>:]<slot>", "hot remove PCI device" },
+ { "host_net_add", "ss", net_host_device_add,
+ "[tap,user,socket,vde] options", "add host VLAN client" },
+ { "host_net_remove", "is", net_host_device_remove,
+ "vlan_id name", "remove host VLAN client" },
+#endif
{ "balloon", "i", do_balloon,
"target", "request VM to change it's memory allocation (in MB)" },
{ "set_link", "ss", do_set_link,