This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Install packages: | |
| # yum install -y libguestfs-tools qemu-img | |
| Create the target image | |
| # qemu-img create -f qcow2 target.qcow2 256G | |
| Expand the new image and resize the partitions | |
| # virt-resize --expand /dev/sda1 ubuntu.qcow2 target.qcow2 | |
| If CentOS, do xfs_growfs inside the VM after boot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #To fix bad hashInsert the following as after "late_commands:" in /etc/maas/preseeds/curtin_userdata | |
| prxyfix_01_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::http::Pipeline-Depth 0;' > /etc/apt/apt.conf.d/99FixBadProxy"] | |
| prxyfix_02_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::http::No-Cache true;' >> /etc/apt/apt.conf.d/99FixBadProxy"] | |
| prxyfix_03_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::BrokenProxy true;' >> /etc/apt/apt.conf.d/99FixBadProxy"] | |
| #Automatically insert above into /etc/maas/preseeds/curtin_userdata using sed | |
| sudo sed -e '/late_commands:/a \ \ prxyfix_01_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '"'"'Acquire::http::Pipeline-Depth 0;'"'"' > /etc/apt/apt.conf.d/99FixBadProxy"]\n\ \ prxyfix_02_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '"'"'Acquire::http::No-Cache true;'"'"' >> /etc/apt/apt.conf.d/99FixBadProxy"]\n\ \ prxyfix_03_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/ec |