Tests for interface type/model configuration

add a set of tests for Xen interface type and model configurations
This commit is contained in:
Jiri Denemark 2009-12-04 17:01:34 +01:00 committed by Daniel Veillard
parent dddad4bcb4
commit 81ea6e4d9f
15 changed files with 295 additions and 0 deletions

View File

@ -0,0 +1 @@
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type 'ioemu'))))

View File

@ -0,0 +1,42 @@
<domain type='xen' id='3'>
<name>fvtest</name>
<uuid>b5d70dd2-75cd-aca5-1776-9660b059d8bc</uuid>
<memory>409600</memory>
<currentMemory>409600</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:1b:b1:47'/>
<source bridge='xenbr0'/>
<script path='vif-bridge'/>
<target dev='vif3.0'/>
<model type='e1000'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5903' autoport='no' keymap='ja'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type 'netfront'))))

View File

@ -0,0 +1,42 @@
<domain type='xen' id='3'>
<name>fvtest</name>
<uuid>b5d70dd2-75cd-aca5-1776-9660b059d8bc</uuid>
<memory>409600</memory>
<currentMemory>409600</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:1b:b1:47'/>
<source bridge='xenbr0'/>
<script path='vif-bridge'/>
<target dev='vif3.0'/>
<model type='netfront'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5903' autoport='no' keymap='ja'/>
</devices>
</domain>

View File

@ -168,6 +168,9 @@ mymain(int argc, char **argv)
DO_TEST("fv-sound", "fv-sound", 1);
DO_TEST("fv-sound-all", "fv-sound-all", 1);
DO_TEST("fv-net-ioemu", "fv-net-ioemu", 1);
DO_TEST("fv-net-netfront", "fv-net-netfront", 1);
virCapabilitiesFree(caps);
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);

View File

@ -0,0 +1,25 @@
name = "XenGuest2"
uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
maxmem = 579
memory = 394
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 1
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
vnclisten = "127.0.0.1"
vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ]
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ]
parallel = "none"
serial = "none"

View File

@ -0,0 +1,43 @@
<domain type='xen'>
<name>XenGuest2</name>
<uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid>
<memory>592896</memory>
<currentMemory>403456</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='xenfv'>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/HostVG/XenGuest2'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:66:92:9c'/>
<source bridge='xenbr1'/>
<script path='vif-bridge'/>
<model type='e1000'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'/>
</devices>
</domain>

View File

@ -0,0 +1,25 @@
name = "XenGuest2"
uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
maxmem = 579
memory = 394
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 1
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
vnclisten = "127.0.0.1"
vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ]
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,type=netfront" ]
parallel = "none"
serial = "none"

View File

@ -0,0 +1,43 @@
<domain type='xen'>
<name>XenGuest2</name>
<uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid>
<memory>592896</memory>
<currentMemory>403456</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='xenfv'>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/HostVG/XenGuest2'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:66:92:9c'/>
<source bridge='xenbr1'/>
<script path='vif-bridge'/>
<model type='netfront'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'/>
</devices>
</domain>

View File

@ -230,6 +230,9 @@ mymain(int argc, char **argv)
DO_TEST("fullvirt-sound", 2);
DO_TEST("fullvirt-net-ioemu", 2);
DO_TEST("fullvirt-net-netfront", 2);
DO_TEST("escape-paths", 2);
DO_TEST("no-source-cdrom", 2);
DO_TEST("pci-devs", 2);

View File

@ -0,0 +1 @@
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))

View File

@ -0,0 +1,31 @@
<domain type='xen'>
<name>fvtest</name>
<uuid>b5d70dd275cdaca517769660b059d8bc</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<memory>409600</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:1b:b1:47'/>
<script path='vif-bridge'/>
<model type='e1000'/>
</interface>
<disk type='file'>
<source file='/root/foo.img'/>
<target dev='ioemu:hda'/>
</disk>
<graphics type='vnc' port='5917' keymap='ja'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type netfront))))

View File

@ -0,0 +1,31 @@
<domain type='xen'>
<name>fvtest</name>
<uuid>b5d70dd275cdaca517769660b059d8bc</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<memory>409600</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:1b:b1:47'/>
<script path='vif-bridge'/>
<model type='netfront'/>
</interface>
<disk type='file'>
<source file='/root/foo.img'/>
<target dev='ioemu:hda'/>
</disk>
<graphics type='vnc' port='5917' keymap='ja'/>
</devices>
</domain>

View File

@ -151,6 +151,9 @@ mymain(int argc, char **argv)
DO_TEST("fv-sound", "fv-sound", "fvtest", 1);
DO_TEST("fv-net-ioemu", "fv-net-ioemu", "fvtest", 1);
DO_TEST("fv-net-netfront", "fv-net-netfront", "fvtest", 1);
virCapabilitiesFree(caps);
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);