Comments (7)
I see, that would require a few modification since I haven't thought about that particular use-case, so for example:
layout:
- device: '/dev/vg0/testvm-root'
fs: ext4
mount: /
This doesn't work currently but shouldn't be too difficult to add.
from ansible-debootstrap.
Do you want to bootstrap the VM from the host system, without booting into a VM? I think this may be possible, you would specify the layout with the logical volume as underlying device, e.g.:
layout:
- device: '/dev/vg0/testvm-root'
partitions:
- num: 1
size: 1M
type: ef02
- num: 2
size: 1022M
type: 8300
- num: 3
type: 8300
What could be difficult is that the partition table may not be detected automatically (one would need to add a step to call partprobe
) and perhaps the detection of device names is off - devices would probably be named /dev/maper/vg0-testvm--root--part1 etc.. I think I already wrote some code to better determine the device names when putting in nvme support.
Creating the fstab and finding the boot device should work already since it uses UUID.
Does this help at all?
from ansible-debootstrap.
I should have been clearer. Yes, bootstrapping from the host would be ideal. I don't want multiple partitions, just one with no partition table so the root partition would be just /dev/vg0/testvm-root (/dev/vda, not /dev/vda1 on the vm). I use direct kernel boot, so a bootloader isn't needed at all.
from ansible-debootstrap.
Would it be possible to implement it so that the lvm volume could be created automatically too, something like this maybe:
layout:
- lvm:
lv: "testvm-root"
vg: vg0
size: 5G
mount: /
fs: ext4
This isn't a great syntax, but you get the point.
from ansible-debootstrap.
I think that would be somewhat out of scope for this ansible role, you can easily create the volume in your playbook beforehand. There are two additional caveats that I just now remembered:
- You can only install one VM at a time
- The role may not fully clean up after itself.
from ansible-debootstrap.
Yeah, you're right.
Installing one vm at a time is okay.
What do you mean by may not fully clean up after itself
from ansible-debootstrap.
I mean that it may create things on the host system that don't get removed, I've just looked at the cleanup task and it seems like at the very least I forgot to remove the bootstrap user and its SSH configuration from the host system. I haven't yet tried running this twice from the same box.
from ansible-debootstrap.
Related Issues (16)
- Support for LVM / mdadm HOT 3
- Add automated tests and test playbook
- Round down LUKS partition to luks-sector-size boundary
- ZFS module issues with version 0.8
- Creating the swap area in a logical volume (LVM) HOT 1
- Include the simplest possible example in README HOT 2
- Changing dbstrp_username causes `chown failed: failed to look up user` HOT 1
- Support zfs legacy mountpoints
- Allow for different _bootstrap_target sizes HOT 2
- "cryptsetup" tool uses early then it is installed HOT 1
- playbook fails creating /etc/fstab HOT 1
- Add support for dropbear initramfs HOT 2
- lsblk -J not available in debian jessie HOT 2
- Network Names on Debian 9 and co. HOT 2
- Convert to two stage playbook to enable running user roles HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-debootstrap.