qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
To: qemu-devel@nongnu.org
Cc: izumi.taku@jp.fujitsu.com
Subject: [Qemu-devel] [RFC 0/2] qemu-ga: add guest-network-set-interface command
Date: Wed, 25 Feb 2015 11:26:38 +0800	[thread overview]
Message-ID: <cover.1424832419.git.chen.fan.fnst@cn.fujitsu.com> (raw)

Nowadays, qemu has supported physical NIC hotplug for high network
throughput. but it's in conflict with live migration feature, to keep
network connectivity, we could to create bond device interface which
provides a mechanism for enslaving multiple network interfaces into a
single "bond" interface. the active-backup mode can be used for an
automatic switch. so this patch is adding a guest-network-set-interface
command for creating bond device. so the management can easy to create
a bond device dynamically when guest running.

we can specify:

add interface:
{"execute":"guest-network-set-interface", "arguments":
{"interface": {"type":"bond", "name":"bond0", "onboot":"onboot",
 "options":"mode=active-backup primary=eth1 miimon=100 updelay=10 use_carrier=ioctl",
 "ip-address": {"ip-address":"192.168.122.89", "ip-address-type":"ipv4", "prefix":24,
 "gateway":"192.168.122.1"}, "subInterfaces":[{"name":"eth0"}, {"name":"eth1"}]}}}

delete interface:
{"execute":"guest-network-delete-interface", "arguments":{"name":"bond0"}}

Note:
this patch has introduces netcf lib for create interfaces. because
the netcf provides a convenient facility for programs that want to
shield themselves from the intricacies of networking setup.
on different environment, creating bonding device is distinct.
On Fedora/Redhat, that requires modifying the files ifcfg-eth0,
ifcfg-eth1 and ifcfg-bond0 in /etc/sysconfig/network-scripts;
on Debian, it requires changing several entries in /etc/network/interfaces.

Chen Fan (2):
  qemu-agent: add guest-network-set-interface command
  qemu-agent: add guest-network-delete-interface command

 configure            |  16 +++
 qga/commands-posix.c | 312 +++++++++++++++++++++++++++++++++++++++++++++++++++
 qga/commands-win32.c |  13 +++
 qga/qapi-schema.json |  65 +++++++++++
 4 files changed, 406 insertions(+)

-- 
1.9.3

             reply	other threads:[~2015-02-25  3:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25  3:26 Chen Fan [this message]
2015-02-25  3:26 ` [Qemu-devel] [RFC 1/2] qemu-agent: add guest-network-set-interface command Chen Fan
2015-02-25  3:26 ` [Qemu-devel] [RFC 2/2] qemu-agent: add guest-network-delete-interface command Chen Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1424832419.git.chen.fan.fnst@cn.fujitsu.com \
    --to=chen.fan.fnst@cn.fujitsu.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).