Skip to content

Instantly share code, notes, and snippets.

@tienthanh2509
Last active April 22, 2021 09:29
Show Gist options
  • Save tienthanh2509/cdb6dc13341c9163177def21aad977e1 to your computer and use it in GitHub Desktop.
Save tienthanh2509/cdb6dc13341c9163177def21aad977e1 to your computer and use it in GitHub Desktop.
Vagrant virtualbox cloud-init
# Default Vagrant with cloud-init will create 2 difference config disk
# iso: our config data, but store in /tmp, will lost if host machine restart, cause boot failure for VM
# vmdk: default, store in same vm folder
dd if=vagrant20210422-1455709-cdqm7s.iso of=cloud-init.iso bs=10M conv=sync
VBoxManage convertfromraw --format vmdk cloud-init.iso cloud-init.vmdk
VBoxManage internalcommands sethduuid cloud-init.vmdk
# Now remove xxxyyy-cloudimg-configdrive.vmdk by cloud-init.vmdk
@tienthanh2509
Copy link
Author

VBoxManage convertfromraw   <filename> <outputfile>
                            [--format VDI|VMDK|VHD]
                            [--variant Standard,Fixed,Split2G,Stream,ESX]
                            [--uuid <uuid>]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment