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

implement a virtio balloon device driver #660

Closed
wjhun opened this issue Mar 28, 2019 · 5 comments · Fixed by #1439
Closed

implement a virtio balloon device driver #660

wjhun opened this issue Mar 28, 2019 · 5 comments · Fixed by #1439

Comments

@wjhun
Copy link
Contributor

wjhun commented Mar 28, 2019

We have the means to reclaim freed/unused physical pages, so make them accessible to the virtio balloon device so that they become available for other VMs.

@eyberg
Copy link
Contributor

eyberg commented Dec 16, 2019

saw this on the minios mailing list just now https://lists.xenproject.org/archives/html/minios-devel/2019-12/msg00215.html

@eyberg
Copy link
Contributor

eyberg commented Mar 31, 2020

#1079

@jeromegn
Copy link

Sorry to comment on an old issue, but it seemed appropriate: is the virtio-balloon device supported w/ firecracker? If so, how does one use it?

I've configured my firecracker to use a balloon device, however if I try to PATCH it (change the size of the balloon), I get an error:

{"fault_message":"Balloon config error: Error creating the balloon device: Device not activated yet."}

Config:

{
  "boot-source": {
    "kernel_image_path": "/home/jerome/.ops/0.1.52/kernel.img",
    "boot_args": "console=ttyS0 reboot=k panic=1 pci=off random.trust_cpu=on"
  },
  "drives": [
    {
      "drive_id": "rootfs",
      "path_on_host": "/home/jerome/.ops/images/app",
      "is_root_device": true,
      "is_read_only": false
    }
  ],
  "network-interfaces": [
    {
      "iface_id": "eth0",
      "guest_mac": "AA:FC:00:00:00:01",
      "host_dev_name": "tap0"
    }
  ],
  "machine-config": {
    "vcpu_count": 1,
    "mem_size_mib": 512
  },
  "balloon": {
    "amount_mib": 0,
    "deflate_on_oom": false,
    "stats_polling_interval_s": 1
  },
  "logger": {
    "log_path": "logs.fifo",
    "level": "Debug"
  },
  "metrics": {
    "metrics_path": "metrics.fifo"
  },
  "vsock": {
    "guest_cid": 3,
    "uds_path": "./v.sock"
  }
}

@francescolavra
Copy link
Member

Nanos currently supports virtio-balloon devices only when wired to the PCI bus; Firecracker doesn't have PCI, so its virtio-balloon devices are not PCI devices (they are most likely accessed via MMIO) and therefore not currently supported.

@francescolavra
Copy link
Member

#2081 adds support for the virtio-balloon device in Firecracker.
To download a kernel build with this feature, you can use a dummy ops image create (or ops run) command with the --nanos-version 05536fb command line option: this will place the kernel binary file at ~/.ops/05536fb/kernel.img; then, you can use this path as "kernel_image_path" in your Firecracker configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants