Hi Dani,
I'm not familiar with snf-image but the problem may be related to [1]?
Also, I don't know if that plays a role here but by default Ubuntu no
longer creates a swap partition but uses a swap file, unless you
instructed it otherwise.
HTH,
Simon
1:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1601997
> *# gnt-instance add -t plain -o snf-image+default -O
> img_format=diskdump,img_id=ubuntu18.diskdump,img_properties='{"EXCLUDE_TASK_ConfigureNetwork":"yes"\,"OSFAMILY":"linux"\,"ROOT_PARTITION":"1"\,"USERS":"root"\,"SWAP":"2:1024"}'
> --disk=0:size=6G --no-name-check --no-ip-check -H
> kvm:vnc_bind_address=0.0.0.0,kernel_path="" -B memory=1G,vcpus=1 --net
> 0:link=br-lan --no-wait-for-sync ubuntu18*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Mon Jul 2 17:36:27 2018 * disk 0, size 6.0GMon Jul 2 17:36:27 2018 *
> creating instance disks...Mon Jul 2 17:36:29 2018 adding instance testub18
> to cluster configMon Jul 2 17:36:29 2018 adding disks to cluster configMon
> Jul 2 17:36:29 2018 * running the instance OS create scripts...Failure:
> command execution error:Could not add os for instance testub18 on node
>
node1.zoconet.es: OS create script failed (exited with exit code 1), last
> lines in the log file:[MONITOR] {"subtype": "task-start", "task":
> "FixPartitionTable", "type": "image-helper", "timestamp":
> 1530545811.853033}[MONITOR] {"subtype": "task-end", "task":
> "FixPartitionTable", "type": "image-helper", "timestamp":
> 1530545812.372859}HELPER: 2018:07:02-15:36:51.876028528 run-parts:
> executing
> /usr/lib/snf-image-helper/tasks/20FilesystemResizeUnmounted[MONITOR]
> {"subtype": "task-start", "task": "FilesystemResizeUnmounted", "type":
> "image-helper", "timestamp": 1530545812.411796}HELPER:
> 2018:07:02-15:36:51.975698543 resize2fs 1.42.12 (29-Aug-2014)HELPER:
> 2018:07:02-15:36:51.979399004 Couldn't find valid filesystem
> superblock.HELPER: 2018:07:02-15:36:51.981825425 /sbin/resize2fs:
> Filesystem has unsupported read-only feature(s) while trying to open
> /dev/vdb1[MONITOR] {"subtype": "error", "type": "image-helper", "stderr":
> "resize2fs 1.42.12 (29-Aug-2014)\n/sbin/resize2fs: Filesystem has
> unsupported read-only feature(s) while trying to open /dev/vdb1\r\n",
> "timestamp": 1530545812.49461}HELPER: 2018:07:02-15:36:51.995649973
> run-parts: /usr/lib/snf-image-helper/tasks/20FilesystemResizeUnmounted
> exited with return code 1HELPER: sysrq: SysRq : Power OffHELPER: reboot:
> Power down2018:07:02-15:36:53.604862907 VM STOP[INFO] Customization VM
> exited normally.[MONITOR] {"messages": ["Customization VM exited
> normally."], "type": "image-info", "timestamp": 1530545813.641424}[INFO]
> Checking customization status...[MONITOR] {"messages": ["Checking
> customization status..."], "type": "image-info", "timestamp":
> 1530545813.697373}[INFO] Customization status is: [MONITOR] {"messages":
> ["Customization status is:"], "type": "image-info", "timestamp":
> 1530545813.733752}[ERROR] Image customization failed.[MONITOR] {"messages":
> ["Image customization failed."], "type": "image-error", "timestamp":
> 1530545813.770243}*
>
> If I avoid the "Shrink" step, which left the partitions untouched, it
> creates the VM, but I also have a problem because the partition that grows
> is the swap one, and it also creates a new swap partition:
>
>
> */dev/vda1 * 2048 ... ... 2.6G 83 Linux/dev/vda2 ... ... ...
> 2.4G 82 Linux swap / Solaris *# The one that grows
> */dev/vda3 ... ... ... 1G 82 Linux swap / Solaris*
>
> I don't understand why in the first case it tries to read /dev/vdb1 when it
> doesn't exists. My Ganeti version, running in Ubuntu 16.04, is:
>
>
>
>
>
>
>
> *# gnt-cluster versionSoftware version: 2.15.2Internode protocol:
> 2150000Configuration format: 2150000OS api version: 20Export interface:
> 0VCS version: (ganeti) version 2.15.2-3*
>
> Regards,
>
> Dani
>