Skip to content

Add support for creating cloned UVMs.#838

Merged
ambarve merged 5 commits intouser/ambarve/lcpr1_vmcomputefrom
user/ambarve/lcpr2_clone_uvm
Jan 27, 2021
Merged

Add support for creating cloned UVMs.#838
ambarve merged 5 commits intouser/ambarve/lcpr1_vmcomputefrom
user/ambarve/lcpr2_clone_uvm

Conversation

@ambarve
Copy link
Copy Markdown
Contributor

@ambarve ambarve commented Jun 13, 2020

This is one of the many small PRs that enable the support for late cloning.
This commit adds the template and clone creation support in the uvm module.

Signed-off-by: Amit Barve ambarve@microsoft.com

@ambarve ambarve changed the title Add support for creating cloned UVMs. [Late_clone PR 2/5] Add support for creating cloned UVMs. Jun 13, 2020
Comment thread internal/uvm/clone.go Outdated
Comment thread internal/uvm/clone.go Outdated
Comment thread internal/uvm/create.go Outdated
Comment thread internal/uvm/scsi.go Outdated
Comment thread internal/uvm/create_wcow.go Outdated
Comment thread internal/uvm/scsi.go Outdated
@ambarve ambarve force-pushed the user/ambarve/lcpr2_clone_uvm branch from 3849558 to e010e37 Compare June 15, 2020 19:29
Comment thread internal/hns/hnsglobals.go Outdated
@ambarve ambarve force-pushed the user/ambarve/lcpr2_clone_uvm branch 2 times, most recently from d71a09d to 5ba0510 Compare June 15, 2020 20:20
@ambarve ambarve marked this pull request as ready for review June 16, 2020 00:14
@ambarve ambarve requested a review from a team as a code owner June 16, 2020 00:14
@ambarve ambarve changed the title [Late_clone PR 2/5] Add support for creating cloned UVMs. Add support for creating cloned UVMs. Jun 17, 2020
Comment thread internal/uvm/clone.go Outdated
Comment thread internal/gcs/guestconnection.go Outdated
@kevpar
Copy link
Copy Markdown
Member

kevpar commented Jul 15, 2020

Please rebase these commits into a more curated set for review and check-in.

Comment thread internal/uvm/clone.go Outdated
@kevpar
Copy link
Copy Markdown
Member

kevpar commented Jul 15, 2020

What is inherited from the template VM, versus being specified by the new HCS document? e.g. if the VM already had a given VHD attached to it, does the clone also attempt to connect that VHD?

@ambarve
Copy link
Copy Markdown
Contributor Author

ambarve commented Jul 15, 2020

@kevpar The resources that can be hot-added are always cloned (as of now it's VSMB and SCSI). So even if a VHD was added in the HCS document of the template VM we will still add it via the cloning process instead of adding it into the HCS document of the cloned VM. Everything else will be specified in the HCS document of the clone.

@kevpar
Copy link
Copy Markdown
Member

kevpar commented Jul 15, 2020

@kevpar The resources that can be hot-added are always cloned (as of now it's VSMB and SCSI). So even if a VHD was added in the HCS document of the template VM we will still add it via the cloning process instead of adding it into the HCS document of the cloned VM. Everything else will be specified in the HCS document of the clone.

I see that we explicitly do a "clone" operation for some resources, but I'm wondering about what things are naturally inherited from the template via HCS. If we just created a new VM compute system with a template ID, what resources or other characteristics would be inherited from the template?

@ambarve
Copy link
Copy Markdown
Contributor Author

ambarve commented Jul 15, 2020

HCS doesn't automatically inherit any properties from the template but you still need to make sure that configuration doc of the clone is identical (except for some parameters) to the configuration doc of the template (Otherwise clone startup fails). And so most of the properties that are defined in the template configuration doc will automatically be copied over to the clone. I don't know exactly which properties can be altered in the configuration doc of the clone but I can find that out.

Comment thread internal/uvm/scsi.go Outdated
Comment thread internal/uvm/scsi.go Outdated
Comment thread internal/uvm/clone.go Outdated
Comment thread internal/uvm/clone.go Outdated
Comment thread internal/uvm/clone.go
Comment thread internal/uvm/clone.go Outdated
Comment thread internal/uvm/clone.go Outdated
Comment thread internal/uvm/vsmb.go
@ambarve ambarve force-pushed the user/ambarve/lcpr2_clone_uvm branch from 9ab44b4 to 4fc5e7e Compare October 22, 2020 05:57
Comment thread internal/uvm/create.go
Comment thread internal/uvm/scsi.go Outdated
Comment thread internal/uvm/scsi.go
Comment thread internal/uvm/scsi.go Outdated
Comment thread internal/uvm/scsi.go Outdated
Copy link
Copy Markdown
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

LGTM

@ambarve ambarve force-pushed the user/ambarve/lcpr2_clone_uvm branch from 4fc5e7e to 562bfc4 Compare November 16, 2020 20:35
Comment thread internal/uvm/scsi.go
Comment thread internal/uvm/vsmb.go Outdated
Comment thread internal/uvm/vsmb.go Outdated
Comment thread internal/uvm/scsi.go Outdated
Comment thread internal/uvm/create_wcow.go
Comment thread internal/uvm/create_wcow.go
@ambarve ambarve force-pushed the user/ambarve/lcpr2_clone_uvm branch from 562bfc4 to 3076f21 Compare December 22, 2020 09:37
This is one of the many small PRs that enable the support for late cloning.
This commit adds the template and clone creation support in the uvm module.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
This is one of the many small PRs that enable the support for late cloning.
This commit adds the set of functions required for adding network namespace and
network endpoints to cloned UVMs.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
@ambarve ambarve force-pushed the user/ambarve/lcpr1_vmcompute branch from 1558e2d to c112ff9 Compare December 23, 2020 22:08
@ambarve ambarve force-pushed the user/ambarve/lcpr2_clone_uvm branch from 3076f21 to aa48bc3 Compare December 23, 2020 22:08
Comment thread internal/uvm/scsi.go
Comment thread internal/uvm/vsmb.go
Copy link
Copy Markdown
Member

@kevpar kevpar left a comment

Choose a reason for hiding this comment

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

LGTM

ambarve and others added 3 commits January 27, 2021 14:20
This is one of the many small PRs that enable the support for late
cloning.This commit adds the set of functions that expose the late cloning
functionality from hcsshim and adds new annotations for clients to use
the late cloning feature.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
…aner

Add support for creating late clones via hcsshim
…changes

Add support for creating network namespaces inside cloned uvms.
@ambarve ambarve merged commit 8c0cb6f into user/ambarve/lcpr1_vmcompute Jan 27, 2021
@helsaawy helsaawy deleted the user/ambarve/lcpr2_clone_uvm branch May 24, 2022 16:04
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.

4 participants