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

Commit

Permalink
Merge pull request #2382 from jcvenegas/backport-ch-0.4-1.10
Browse files Browse the repository at this point in the history
Backport ch 0.4  for 1.10
  • Loading branch information
chavafg authored Jan 9, 2020
2 parents 9049395 + df1be10 commit c362394
Show file tree
Hide file tree
Showing 24 changed files with 419 additions and 189 deletions.
2 changes: 1 addition & 1 deletion versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ assets:
url: "https://github.com/intel/cloud-hypervisor"
uscan-url: >-
https://github.com/intel/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz
version: "ca97385da5ebb798"
version: "v0.4.0"

firecracker:
description: "Firecracker micro-VMM"
Expand Down
22 changes: 6 additions & 16 deletions virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ const (
// Values are mandatory by http API
// Values based on:
// github.com/cloud-hypervisor/cloud-hypervisor/blob/v0.3.0/vmm/src/config.rs#L395
clhFsQueues = 1
clhFsQueueSize = 1024
clhTimeout = 10
clhAPITimeout = 1
clhStopSandboxTimeout = 3
Expand Down Expand Up @@ -176,9 +174,10 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
clh.vmconfig.Memory.Size = int64(clh.config.MemorySize) << utils.MibToBytesShift
clh.vmconfig.Memory.File = "/dev/shm"
// Set initial amount of cpu's for the virtual machine
clh.vmconfig.Cpus = chclient.CpuConfig{
clh.vmconfig.Cpus = chclient.CpusConfig{
// cast to int32, as openAPI has a limitation that it does not support unsigned values
CpuCount: int32(clh.config.NumVCPUs),
BootVcpus: int32(clh.config.NumVCPUs),
MaxVcpus: int32(clh.config.DefaultMaxVCPUs),
}

// Add the kernel path
Expand Down Expand Up @@ -1037,12 +1036,7 @@ func (clh *cloudHypervisor) addNet(e Endpoint) {
"tap": tapPath,
}).Info("Adding Net")

// FIXME: This is required by CH
// remove after PR is merged:
// https://github.com/cloud-hypervisor/cloud-hypervisor/pull/480
ip := "0.0.0.0"
mask := "0.0.0.0"
clh.vmconfig.Net = append(clh.vmconfig.Net, chclient.NetConfig{Mac: mac, Tap: tapPath, Ip: ip, Mask: mask})
clh.vmconfig.Net = append(clh.vmconfig.Net, chclient.NetConfig{Mac: mac, Tap: tapPath})
}

// Add shared Volume using virtiofs
Expand All @@ -1062,17 +1056,13 @@ func (clh *cloudHypervisor) addVolume(volume types.Volume) error {
Tag: volume.MountTag,
CacheSize: int64(clh.config.VirtioFSCacheSize << 20),
Sock: vfsdSockPath,
NumQueues: clhFsQueues,
QueueSize: clhFsQueueSize,
},
}
} else {
clh.vmconfig.Fs = []chclient.FsConfig{
{
Tag: volume.MountTag,
Sock: vfsdSockPath,
NumQueues: clhFsQueues,
QueueSize: clhFsQueueSize,
Tag: volume.MountTag,
Sock: vfsdSockPath,
},
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.2-SNAPSHOT
4.2.3-SNAPSHOT
5 changes: 3 additions & 2 deletions virtcontainers/pkg/cloud-hypervisor/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**ShutdownVM**](docs/DefaultApi.md#shutdownvm) | **Put** /vm.shutdown | Shut the VM instance down.
*DefaultApi* | [**ShutdownVMM**](docs/DefaultApi.md#shutdownvmm) | **Put** /vmm.shutdown | Shuts the cloud-hypervisor VMM.
*DefaultApi* | [**VmInfoGet**](docs/DefaultApi.md#vminfoget) | **Get** /vm.info | Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
*DefaultApi* | [**VmResizePut**](docs/DefaultApi.md#vmresizeput) | **Put** /vm.resize | Resize the VM
*DefaultApi* | [**VmmPingGet**](docs/DefaultApi.md#vmmpingget) | **Get** /vmm.ping | Ping the VMM to check for API server availability


## Documentation For Models

- [CmdLineConfig](docs/CmdLineConfig.md)
- [ConsoleConfig](docs/ConsoleConfig.md)
- [CpuConfig](docs/CpuConfig.md)
- [CpusConfig](docs/CpusConfig.md)
- [DeviceConfig](docs/DeviceConfig.md)
- [DiskConfig](docs/DiskConfig.md)
- [FsConfig](docs/FsConfig.md)
Expand All @@ -58,10 +59,10 @@ Class | Method | HTTP request | Description
- [PmemConfig](docs/PmemConfig.md)
- [RngConfig](docs/RngConfig.md)
- [VhostUserBlkConfig](docs/VhostUserBlkConfig.md)
- [VhostUserConfig](docs/VhostUserConfig.md)
- [VhostUserNetConfig](docs/VhostUserNetConfig.md)
- [VmConfig](docs/VmConfig.md)
- [VmInfo](docs/VmInfo.md)
- [VmResize](docs/VmResize.md)
- [VmmPingResponse](docs/VmmPingResponse.md)
- [VsockConfig](docs/VsockConfig.md)

Expand Down
Loading

0 comments on commit c362394

Please sign in to comment.