-
Notifications
You must be signed in to change notification settings - Fork 23
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
docs: proxmoxve: add promoxve install doc #337
base: master
Are you sure you want to change the base?
Conversation
```bash | ||
# THIS IS A DEVELOPMENT BUILD | ||
# TODO: update link with an alpha build | ||
wget http://bincache.flatcar-linux.net/images/amd64/9999.0.102+kai-proxmox-support/flatcar_production_proxmoxve_image.img.bz2 | bzip2 -d > flatcar_production_proxmoxve_image.img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check to directly provide uncompressed image. The benefit is not that important:
$ du --si flatcar_production_proxmoxve_image.img
548M flatcar_production_proxmoxve_image.img
$ du --si flatcar_production_proxmoxve_image.img.bz2
546M flatcar_production_proxmoxve_image.img.bz2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now done.
wget http://bincache.flatcar-linux.net/images/amd64/9999.0.102+kai-proxmox-support/flatcar_production_proxmoxve_image.img.bz2 | bzip2 -d > flatcar_production_proxmoxve_image.img | |
wget http://bincache.flatcar-linux.net/images/amd64/9999.0.102+kai-proxmox-support/flatcar_production_proxmoxve_image.img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Complete process for me:
curl -sS http://bincache.flatcar-linux.net/images/amd64/9999.9.100+kai-proxmox-support/flatcar_production_proxmoxve_image.img.bz2 | bzip2 -d > flatcar_production_proxmoxve_image.img
export VM_ID=123
qm create $VM_ID --cores 2 --memory 4096 --net0 "virtio,bridge=vmbr0" --ipconfig0 "ip=dhcp"
# On my Proxmox "out-of-the-box" installation, images are stored on `local-lvm` instead of `local`
qm disk import $VM_ID flatcar_production_proxmoxve_image.img local-lvm
qm set $VM_ID --scsi0 local-lvm:vm-$VM_ID-disk-0
qm set $VM_ID --boot order=scsi0
# Create the cloud-init CD-ROM drive which activates the cloud-init options for the VM.
qm set $VM_ID --ide2 local-lvm:cloudinit
# SKIPPED MANUAL STEP: paste iginition config into /var/lib/vz/snippets/user-data
qm set $VM_ID --cicustom "user=local:snippets/user-data"
```bash | ||
# THIS IS A DEVELOPMENT BUILD | ||
# TODO: update link with an alpha build | ||
wget http://bincache.flatcar-linux.net/images/amd64/9999.0.102+kai-proxmox-support/flatcar_production_proxmoxve_image.img.bz2 | bzip2 -d > flatcar_production_proxmoxve_image.img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wget | bzip2 -d > …
pipes the output from wget itself to bzip, not the downloaded file (that would be wget -O -
), replacing wget
with curl
would be better.
In order to create a VM with our image we'll need to use the command line. Open a shell on the hypervisor, download the image and convert it to RAW : | ||
|
||
```bash | ||
qemu-img convert -f qcow2 -O raw flatcar_production_proxmoxve_image.img flatcar_production_proxmoxve_image.bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting the image is not required when you use the terminal. qm disk import
can import the qcow2 file directly.
qm disk import $VM_ID flatcar_production_proxmoxve_image.bin local | ||
|
||
# tell the vm to boot from the imported image | ||
qm set $VM_ID --scsi0 local:$VM_ID/vm-$VM_ID-disk-0.raw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proxmox 8.2 uses a different notation:
qm set $VM_ID --scsi0 local-lvm:vm-$VM_ID-disk-0
export VM_ID=123 | ||
|
||
# create the vm and import the image to it's disk | ||
qm create $VM_ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should include a network interface and probably some CPU/RAM settings:
qm create $VM_ID --cores 2 --memory 4096 --net0 "virtio,bridge=vmbr0" --ipconfig0 "ip=dhcp"
|
||
# create the vm and import the image to it's disk | ||
qm create $VM_ID | ||
qm disk import $VM_ID flatcar_production_proxmoxve_image.bin local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local-lvm supports disks, local seems to support only ISOs
|
||
## Configuring the VM with Openstack-style cloud-init config | ||
|
||
Our VM can be booted as-is, however we might want to add a cloud-init configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VM I booted without config drive is not booting - as it stops at the initrd stage and drops into an emergency shell, because the coreos-metadata service fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by:
# Create the cloud-init CD-ROM drive which activates the cloud-init options for the VM.
qm set $VM_ID --ide2 local-lvm:cloudinit
- Setting hostname (hostname is always $VM_ID) | ||
- Writing SSH keys | ||
- Writing network configuration | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small note should be added: if username and password is set, it will not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather a big note. I've been messing around with the settings a bit:
- Setting username, password and SSH key via Proxmox-GUI, providing ignition.json only with "ignition" stanza: Doesn't work, Flatcar doesn't initialize.
- Setting username, password and SSH key via Proxmox-GUI, setting same username (w/o pw/key) in ignition: User settings are not merged, no login posssible.
- Setting only SSH key (leaving username/password), user
core
w/o SSH key in ignition.json: User settings are not merged, no login posssible. - Hostname is not VM name/ID, console still shows
localhost
, when no/etc/hostname
is provided in ignition.json.
Not saying it should be supposed at this point, but this will defninitively be an issue people will run into. Best would be to point out to use ignition config only and not cloud init settings in the GUI.
] | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it s also worth to add a kernelArguments with autologin here, just to have a more friendly environment for testing this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, the cloud-init config drive needs to be added in order for the snippet to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked for me with ignition:
export VM_ID=124
# create the vm and import the image to it's disk
qm create $VM_ID --cores 2 --memory 4096 --net0 "virtio,bridge=vmbr0" --ipconfig0 "ip=dhcp"
qm disk import $VM_ID flatcar_production_proxmoxve_image.bin local-lvm
# tell the vm to boot from the imported image
qm set $VM_ID --scsi0 local-lvm:vm-$VM_ID-disk-0
qm set $VM_ID --boot order=scsi0
qm set $VM_ID --ide2 local-lvm:cloudinit
qm set $VM_ID --cicustom "user=local:snippets/user-data"
qm start $VM_ID
This PR adds Promox VE install doc for upcoming promoxve OEM release.
It explains how to create a VM using the provided image, and how to configure it using either cloud init or Ignition.