Wed like to automate enough of the proxmox installation to take over with ansible after. this means default storage, setting up network, adding ssh keys etc. with ubuntu, i usually make a modified iso for the target machine with preseeded answers and a post install script.
is it possible to do...
We script and use pvesh for almost everything. either on the command line or called from python. these python scripts are slow from multiple get calls.
are there any hidden pitfalls, race conditions, etc that could happen with getting data by parsing the config files in /etc/pve as opposed to...
thanks!
i noticed in the case of this vagrant file, the hosts line reads:
10.12.13.21 node1 node1 pvelocalhost
could this cause any problems later on? the vagrantfile could be modified if so.
regarding vagrant recreating /etc/hosts, thats not a problem. the hostmanager plugin can be disabled...
heres vagrant setup i have running. if you make the proxmox box, remember to checkout the pve-5 branch. this one didnt fail until trying to use the web-ui. then, the cluster service was killed and /etc/pve was gone.
here is the packer file so you dont have to scroll back to find it...
it happened again. this time im keeping the vagrant session running, so you can ask me to do more diagnostics.
after vagrant up, i ran "pvesh get /storage" and "ls /etc/pve" to make sure those worked. then tried to log in with the webui. it let me in, but with the node error, the red circle...
it happend again while trying to get ceph running. ill try to make the vagrant run reproducible, but heres requested output,
root@node1:/home/vagrant# systemctl list-units --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● pve-cluster.service...
wish i could. they were vagrant runs. long gone now. i tried re running vagrant in the conditions that caused the problems, but they no longer do. if it helps, today it all worked, yesterday was when i could reliably cause them.
did not update the proxmox image in that time, and none of the...
now i cant get it back in the failed state, which kinda worries me. i hope its because something was fixed.
Thanks for the fast responses! Ill try that and revisit this thread if it happens again.
# pvesh create /storage -storage vmspace -type dir -content rootdir,images -path /vmspace
if that gets executed after the proxmox vm is up, the gui works.
if it is run as part of the provision script, the gui will let you log in,
but node1 has the red circle with an x in it. in either case...
you can use pvesh. for example,
cp image.qcow2 /mystorage/vm-$vmid-disk-1.qcow2
pvesh set /nodes/$node/qemu/$vmid/config -scsi0 mystorage:$vmid/vm-$vmid-disk-1.qcow2,cache=writeback
$node is the name of that proxmox host. storage types other than "dir" will use $vmid-disk-N, without the "vm-"...
running proxmox 5beta2 in vagrant (libvirt/kvm) using this packer build, https://github.com/rgl/proxmox-ve/tree/pve-5
when running any pvesh commands from the provision script, the gui seems to be disabled. the first time i look, the node is replaced by a red "node1", after logging out and back...
someone started on one, maybe you should help. https://github.com/lord2800/terraform-provider-proxmox
also, heres an ansible module, http://docs.ansible.com/ansible/proxmox_module.html
trying to get data on a volume,
$ ssh root@prox1 pvesh get /nodes/prox1/storage/ceph/content/ceph:vm-108-disk-1
Can't locate object method "root@pam" via package "PVE::RPCEnvironment" at /usr/share/perl5/PVE/API2/Storage/Content.pm line 222.
root@prox1:~# uname -a
Linux prox1 4.4.35-2-pve #1...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.