Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VM]: Support SONiC VM on the server #3036

Merged
merged 4 commits into from
Mar 4, 2021
Merged

Conversation

Pterosaur
Copy link
Contributor

@Pterosaur Pterosaur commented Feb 25, 2021

Signed-off-by: Ze Gan [email protected]

Description of PR

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.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

Some features aren't supported by the default VM image, VEOS.

How did you do it?

Add a switch vm_type in some ansible playbooks to choose the VM os to sonic or veos.

How did you verify/test it?

Follow this document: README.testbed.VsSetup.md

  1. To skip this step: Download an EOS VM image and to put a sound SONiC image sonic-vs.img in ~/veos-vm/images/
  2. To add an extra parameter -k sonic on this the Setup Arista VMs on the server, like ./testbed-cli.sh -m veos_vtb -n 4 -k sonic start-vms server_1 password.txt.
  3. Check that all VMs are up and running by ansible -m ping -i veos_vtb server_1 -u admin -k with password password
  4. To stop all VMs by ./testbed-cli.sh -m veos_vtb -n 4 -k sonic stop-vms server_1 password.txt

Any platform specific information?

None

Supported testbed topology if it's a new test case?

None

Documentation

docs/testbed/README.testbed.VsSetup.md

<name>{{ vm_name }}</name>
<memory unit='KiB'>3072000</memory>
<currentMemory unit='KiB'>3072000</currentMemory>
<vcpu placement='static'>4</vcpu>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need 4 cores per sonic vm or we can reduce to 2 cores?

@@ -0,0 +1,54 @@
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>{{ vm_name }}</name>
<memory unit='KiB'>3072000</memory>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we reduce the memory requirement to 2gb?

Copy link
Collaborator

@wangxin wangxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except some minor comments.

ansible/group_vars/vm_host/main.yml Outdated Show resolved Hide resolved
ansible/roles/vm_set/tasks/start.yml Outdated Show resolved Hide resolved
@wangxin
Copy link
Collaborator

wangxin commented Feb 26, 2021

@Pterosaur Pterosaur changed the title [VM]: Support SONiC VM as testbed servers [VM]: Support SONiC VM on the server Mar 1, 2021
@Pterosaur Pterosaur marked this pull request as ready for review March 3, 2021 12:31
@Pterosaur Pterosaur requested review from yxieca and a team as code owners March 3, 2021 12:31
@Pterosaur Pterosaur requested review from wangxin and lguohan and removed request for a team March 3, 2021 12:32
@lguohan
Copy link
Contributor

lguohan commented Mar 3, 2021

lgtm

@lguohan lguohan merged commit 78d2df9 into sonic-net:master Mar 4, 2021
@Pterosaur Pterosaur deleted the sonic_vm branch March 9, 2021 05:48
lguohan added a commit to lguohan/sonic-mgmt that referenced this pull request Aug 16, 2021
disk_image_dir and cdrom_image should not contain
home_path as the root_path can be absolute path.

the issue is seem only when configure root_path as
absolute path.

bug was introduced in sonic-net#3036

Signed-off-by: Guohan Lu <[email protected]>
@lguohan lguohan mentioned this pull request Aug 16, 2021
4 tasks
lguohan added a commit that referenced this pull request Aug 16, 2021
disk_image_dir and cdrom_image should not contain
home_path as the root_path can be absolute path.

the issue is seem only when configure root_path as
absolute path.

bug was introduced in #3036

Signed-off-by: Guohan Lu <[email protected]>
lolyu pushed a commit to lolyu/sonic-mgmt that referenced this pull request Aug 18, 2021
disk_image_dir and cdrom_image should not contain
home_path as the root_path can be absolute path.

the issue is seem only when configure root_path as
absolute path.

bug was introduced in sonic-net#3036

Signed-off-by: Guohan Lu <[email protected]>
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
disk_image_dir and cdrom_image should not contain
home_path as the root_path can be absolute path.

the issue is seem only when configure root_path as
absolute path.

bug was introduced in sonic-net#3036

Signed-off-by: Guohan Lu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants