Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Hypervisor: UUID fix for acrn hypevisor#2075

Merged
jcvenegas merged 1 commit intokata-containers:masterfrom
vijaydhanraj:acrn_vm_uuid_support
Oct 4, 2019
Merged

Hypervisor: UUID fix for acrn hypevisor#2075
jcvenegas merged 1 commit intokata-containers:masterfrom
vijaydhanraj:acrn_vm_uuid_support

Conversation

@vijaydhanraj
Copy link
Copy Markdown
Contributor

This patch adds support for getting the kata UUID from
acrn hypervisor and using these UUID to create a VM.

Fixes: #1785
Signed-off-by: Vijay Dhanraj vijay.dhanraj@intel.com

Copy link
Copy Markdown

@devimc devimc left a comment

Choose a reason for hiding this comment

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

thanks @vijaydhanraj

// AcrnInfo keeps PID of the hypervisor
// acrnUUIDsToIdx lists Idx corresponding to the UUID
var acrnUUIDsToIdx = map[string]uint8{
"a7ada506-1ab0-4b6b-a0da-e513ca9b8c2f": 0,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

woow, this looks like black magic 😄 , could you please include a comment explaining what mean or from where did you get these IDs ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added comments.


// VCStoreUUIDPath returns a virtcontainers runtime uuid URL.
func VCStoreUUIDPath() string {
return filesystemScheme + "://" + filepath.Join(VMUUIDStoragePath)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

filepath.Join with only one argument? this looks odd 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just used string concatenation "+" instead of join.

@vijaydhanraj
Copy link
Copy Markdown
Contributor Author

Thanks @devimc . Any other feedback on the patch?
/cc @jodh-intel , @amshinde

This patch adds support for getting the kata UUID from
acrn hypervisor and using these UUID to create a VM.

Fixes: kata-containers#1785
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
@devimc
Copy link
Copy Markdown

devimc commented Sep 25, 2019

/test

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 25, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@d3f480d). Click here to learn what that means.
The diff coverage is 17.18%.

@@            Coverage Diff            @@
##             master    #2075   +/-   ##
=========================================
  Coverage          ?   53.21%           
=========================================
  Files             ?      109           
  Lines             ?    16259           
  Branches          ?        0           
=========================================
  Hits              ?     8653           
  Misses            ?     6560           
  Partials          ?     1046

@jcvenegas
Copy link
Copy Markdown
Member

restarting debian job, looks good, @egernst @amshinde PTAL

@jcvenegas jcvenegas merged commit b3aa770 into kata-containers:master Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

virtcontainers: Add support for passing valid UUIDs to launch ACRN VMs

3 participants