From 3f0ebe6e173b1315e864f37800a4ad8385a0d6b8 Mon Sep 17 00:00:00 2001 From: aliguori Date: Wed, 11 Feb 2009 15:21:54 +0000 Subject: 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=[[:]:] 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 Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6610 c046a42c-6fe2-441c-8c8c-71466251a162 --- monitor.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'monitor.c') 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=[[:]:]\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|[[:]:] 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=[[:]:]", "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, -- cgit v1.2.3