Windows deployment with cloud-init does not set hostname

donalddk

New Member
Sep 4, 2019
5
0
1
42
Hi

I am deploying windows with a template. It sets IP-address etc and that works.

But it does not set the windows hostname. As far as i can see the hostname should be set to the same value as the VM name.

Anyone seen the same?

I use this script for deploying.

VMID=$(pvesh get /cluster/nextid)

VMNAME=name

VLAN=vlan

IP=x.x.x.x

IPPREFIX=24

GATEWAY=x.x.x.x

DNS1=x.x.x.x

DNS2=x.x.x.x

echo Deploying VM with ID $VMID and name $VMNAME

pvesh create /nodes/pro01/qemu/117/clone --newid $VMID --name $VMNAME

pvesh set /nodes/pro01/qemu/$VMID/config --net0 virtio,bridge=vmbr0,tag=$VLAN

qm set $VMID --ipconfig0 ip=$IP/$IPPREFIX,gw=$GATEWAY --nameserver $DNS1,$DNS2

qm start $VMID
 
Hi

I am deploying windows with a template. It sets IP-address etc and that works.

But it does not set the windows hostname. As far as i can see the hostname should be set to the same value as the VM name.

Anyone seen the same?

I use this script for deploying.

VMID=$(pvesh get /cluster/nextid)

VMNAME=name

VLAN=vlan

IP=x.x.x.x

IPPREFIX=24

GATEWAY=x.x.x.x

DNS1=x.x.x.x

DNS2=x.x.x.x

echo Deploying VM with ID $VMID and name $VMNAME

pvesh create /nodes/pro01/qemu/117/clone --newid $VMID --name $VMNAME

pvesh set /nodes/pro01/qemu/$VMID/config --net0 virtio,bridge=vmbr0,tag=$VLAN

qm set $VMID --ipconfig0 ip=$IP/$IPPREFIX,gw=$GATEWAY --nameserver $DNS1,$DNS2

qm start $VMID


Yes, I can see the same problem. Since the OPENSTACK\LATEST\USER_DATA file has been created correctly I guess it's a problem inside Windows application cloudbase-init.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!