Install XCP-ng from the ISO, configure networking, and set up storage during installation. Access the host via SSH or directly at the terminal for CLI management.
xe sr-list
mkdir -p /var/opt/iso_repository
chmod 755 /var/opt/iso_repository
xe sr-create name-label="ISO Repository" type=iso device-config:location=/var/opt/iso_repository device-config:legacy_mode=true content-type=iso
scp my_iso_file.iso root@<XCP-ng_IP>:/var/opt/iso_repository/
xe sr-scan uuid=<SR_UUID>
xe vm-list
xe vm-install template="Other install media" new-name-label="MyNewVM"
xe vm-start vm=<VM_UUID>
xe vm-shutdown vm=<VM_UUID>
xe vbd-create vm-uuid=<VM_UUID> device=3 type=CD mode=RO sr-uuid=<SR_UUID>
xe vm-uninstall vm=<VM_UUID> force=true
Use this command to access the console of a VM:
xe console vm=<VM_NAME_OR_UUID>
Exit the console with Ctrl + ]
.
If the VM uses HVM (e.g., Windows), enable VNC and retrieve the port:
xe vm-param-set uuid=<VM_UUID> other-config:vnc=1
xe vm-param-get uuid=<VM_UUID> param-name=other-config param-key=vnc-port
Connect with a VNC viewer to <XCP-ng_IP>:<VNC_PORT>
.
xe network-list
xe network-create name-label="MyNetwork"
xe vif-create vm-uuid=<VM_UUID> network-uuid=<NETWORK_UUID> device=0
xe host-reboot
xe host-param-list uuid=<HOST_UUID>
xe host-cpu-info
xe patch-upload file-name=/path/to/patch.xsupdate
xe patch-apply uuid=<PATCH_UUID>
xe vm-data-source-list uuid=<VM_UUID>
tail -f /var/log/xensource.log
#!/bin/bash
for vm in $(xe vm-list is-control-domain=false --minimal | tr ',' '\n'); do
xe vm-start uuid=$vm
done
xe vm-export vm=<VM_NAME_OR_UUID> filename=/path/to/backup.xva
xe vm-import filename=/path/to/backup.xva
xe vm-list name-label=<VM_NAME>
df -h
ip a