diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2009-12-14 19:09:40 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-01-18 13:55:56 +0000 |
commit | 1dd6f855c37a008caa20300c5388fb11c836c1fd (patch) | |
tree | 32c761bc79e727e73811124afbec97b7e3733f76 /tests | |
parent | Convert disk drive over to use -device where available (diff) | |
download | libvirt-1dd6f855c37a008caa20300c5388fb11c836c1fd.tar.gz libvirt-1dd6f855c37a008caa20300c5388fb11c836c1fd.tar.bz2 libvirt-1dd6f855c37a008caa20300c5388fb11c836c1fd.zip |
Convert NICs over to use -device & -netdev where possible
The current syntax uses a pair of args
-net nic,macaddr=52:54:00:56:6c:55,vlan=3,model=pcnet,name=pcnet.0
-net user,vlan=3,name=user.0
The new syntax does not need the vlan craziness anymore, and
so has a simplified pair of args
-netdev user,id=user.0
-device pcnet,netdev=user.0,id=pcnet.0,mac=52:54:00:56:6c:55,addr=<PCI SLOT>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args | 1 | ||||
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml | 26 | ||||
-rw-r--r-- | tests/qemuxml2argvtest.c | 1 |
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args new file mode 100644 index 000000000..2b5e856be --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args @@ -0,0 +1 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -netdev user,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=virtio-nic0,mac=00:11:22:33:44:55 -usb diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml new file mode 100644 index 000000000..5d34bd492 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml @@ -0,0 +1,26 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory>219200</memory> + <currentMemory>219200</currentMemory> + <vcpu>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <disk type='block' device='disk'> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='hda' bus='ide'/> + </disk> + <interface type='user'> + <mac address='00:11:22:33:44:55'/> + <model type='virtio'/> + </interface> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 55e7d58bc..645f6b4de 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -260,6 +260,7 @@ mymain(int argc, char **argv) QEMUD_CMD_FLAG_UUID); DO_TEST("net-user", 0); DO_TEST("net-virtio", 0); + DO_TEST("net-virtio-device", QEMUD_CMD_FLAG_DEVICE); DO_TEST("net-eth", 0); DO_TEST("net-eth-ifname", 0); DO_TEST("net-eth-names", QEMUD_CMD_FLAG_NET_NAME); |