-
Notifications
You must be signed in to change notification settings - Fork 175
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
Partitions are changed after deploying the custom image #219
Comments
we have 3 templates for Ubuntu, two produce raw images (flat, LVM) and the other one (cloudimg) gives you a TGZ image. Raw images have a fixed partition table defined in the template, so you probably should use the |
Ok so cloudimg template worked fine now partitions are as it is, but is there a way I can manage it with .iso format because I have my own downloaded iso image? This is the lvm template: source "qemu" "lvm" { build { provisioner "file" { provisioner "shell" { post-processor "compress" { |
No, you cannot use an ISO, the In the |
Can I forbid the subiquity not to change the existing paritititons of the machine? This is the user-data-lvm: Now, if I am changing the format of layout from lvm to direct , packer is not able to create image. I just don't want the partitions to change after I deploy the image created by packer. |
use the |
Tried with flat file also. Actually while deploying the Custom ubuntu OS at the time of installing os I ssh into the machine and I saw my partitons were as it is like below: But when system reboots this is all gone. Could there be an issue of cloud config that is auto configure partitions after reboot? In tha above case I created a partition as /var/test in 'sdb' block of size 300Gb: |
I think there's a misconception about how disk partitioning works. MAAS won't leave the disk as they were, it will either apply the Storage Layout configured for this machine or use the partitioning defined by the image (in case you use a |
I am confused how MAAS Ubuntu image is doing the same, MAAS provided Ubuntu image is not changing any configurations of the machines. |
Official Ubuntu images are not built using packer, but the install process is roughly the same:
For non-raw images (flat, cloudimg), the final disk layout should be what you see in the machines's |
Creating a custom Ubuntu image using packer and deploying it on a server machine. Before deploying this custom image lets say I have a partitions on dev/sda and dev/sdb/test but after deploying this custom image my partitions are changed as below:
sda 8:0 0 36.4T 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 6.5G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 6.5G 0 lvm /
It is providing 6.5G to root I dont why deployment is changing my partitions.
I am using the packer repo at: https://github.com/canonical/packer-maas.
The text was updated successfully, but these errors were encountered: