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

Create VMs with disks on volume disks #57005

Closed
cbosdo opened this issue Apr 30, 2020 · 0 comments · Fixed by #56666
Closed

Create VMs with disks on volume disks #57005

cbosdo opened this issue Apr 30, 2020 · 0 comments · Fixed by #56666
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. ZRelease-Sodium retired label
Milestone

Comments

@cbosdo
Copy link
Contributor

cbosdo commented Apr 30, 2020

Is your feature request related to a problem? Please describe.

When using the virt.running() state or the virt.init() / virt.update() functions to create a VM, the disks are assumed to be files. This is rather file for qcow2 or raw files stored locally or on a mounted share, but this is not enough to use an iSCSI or RBD storage pool for instance.

Describe the solution you'd like

A state like the following would create a VM with the data disk being on an RBD volume:

myvm:
  virt.running:
    - name: mvvm
    - cpu: 1
    - mem: 512
    - disks:
      - name: system
        pool: default 
        image: /var/testsuite-data/disk-image-template.qcow2
        size: 122880
      - name: data
        model: virtio
        format: raw
        pool: test-rbd
        size: 512

For this to work, the pool property would have to be an existing libvirt storage pool name. This would not only allow using RBD volumes as disks, but also LVM, disk partitions or iSCSI volumes.

Describe alternatives you've considered

Calling virt.define_xml_str() with a custom computed XML would do the job, but it's way simpler for users once integrated with the virt.defined and virt.running states.

@cbosdo cbosdo added the Feature new functionality including changes to functionality and code refactors, etc. label Apr 30, 2020
@cbosdo cbosdo mentioned this issue Apr 30, 2020
3 tasks
@twangboy twangboy added Core relates to code central or existential to Salt ZRelease-Sodium retired label labels Apr 30, 2020
@twangboy twangboy added this to the Approved milestone Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. ZRelease-Sodium retired label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants