-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VM]: Support SONiC VM on the server (#3036)
The VEOS cannot support MACsec feature, so to make SONiC VM as the testbed servers is useful for testing some scenarios, like MACsec. This PR improves some ansible playbooks to start/stop SONiV VM. Signed-off-by: Ze Gan <[email protected]>
- Loading branch information
Showing
10 changed files
with
251 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> | ||
<name>{{ vm_name }}</name> | ||
<memory unit='KiB'>2097152</memory> | ||
<currentMemory unit='KiB'>2097152</currentMemory> | ||
<vcpu placement='static'>2</vcpu> | ||
<resource> | ||
<partition>/machine</partition> | ||
</resource> | ||
<os> | ||
<type arch='x86_64' machine='q35'>hvm</type> | ||
<boot dev='hd'/> | ||
</os> | ||
<features> | ||
<acpi/> | ||
<apic/> | ||
</features> | ||
<clock offset='utc'/> | ||
<on_poweroff>destroy</on_poweroff> | ||
<on_reboot>restart</on_reboot> | ||
<on_crash>restart</on_crash> | ||
<devices> | ||
<emulator>/usr/bin/qemu-system-x86_64</emulator> | ||
<disk type='file' device='disk'> | ||
<driver name='qemu' type='qcow2' cache='writeback'/> | ||
<source file='{{ disk_image }}'/> | ||
<target bus='virtio' dev='vda'/> | ||
</disk> | ||
<serial type='tcp'> | ||
<source host='127.0.0.1' mode='bind' service='{{ serial_port }}'/> | ||
<target port='0'/> | ||
<protocol type='telnet'/> | ||
</serial> | ||
<interface type='bridge'> | ||
<model type='virtio'/> | ||
<source bridge='{{ mgmt_bridge }}'/> | ||
<target dev='{{ mgmt_tap }}'/> | ||
</interface> | ||
{% for fp_num in range(0, max_fp_num) %} | ||
<interface type='bridge'> | ||
<model type='virtio'/> | ||
<source bridge='br-{{ vm_name }}-{{ fp_num }}'/> | ||
<target dev='{{ vm_name }}-t{{ fp_num }}'/> | ||
<virtualport type='openvswitch'/> | ||
</interface> | ||
{% endfor %} | ||
<controller type='usb' index='0'/> | ||
<memballoon model='virtio'> | ||
<alias name='balloon0'/> | ||
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> | ||
</memballoon> | ||
<watchdog model='i6300esb'/> | ||
</devices> | ||
<seclabel type='dynamic' model='apparmor' relabel='yes'/> | ||
</domain> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.