User Tools

Site Tools


open_nebula_kvm_with_drbd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
open_nebula_kvm_with_drbd [2020/02/23 13:07] herwarthopen_nebula_kvm_with_drbd [2020/02/23 13:23] (current) – [Move front-end VM to new cluster] herwarth
Line 284: Line 284:
 +LIVE_DISK_SNAPSHOTS="kvm-qcow2 kvm-ceph kvm-linstor_un" +LIVE_DISK_SNAPSHOTS="kvm-qcow2 kvm-ceph kvm-linstor_un"
 </code> </code>
 +<code>
 +systemctl restart opennebula opennebula-sunstone
 +</code>
 +===== Create datastores =====
 +<code>
 +su - oneadmin
 +</code>
 +<code>
 +cat > system-ds.conf <<EOT
 +NAME="linstor-system"
 +TYPE="SYSTEM_DS"
 +STORAGE_POOL="data"
 +AUTO_PLACE="2"
 +CHECKPOINT_AUTO_PLACE="1"
 +TM_MAD="linstor_un"
 +EOT
 +</code>
 +<code>
 +cat > images-ds.conf <<EOT
 +NAME="linstor-images"
 +TYPE="IMAGE_DS"
 +STORAGE_POOL="data"
 +AUTO_PLACE="2"
 +DISK_TYPE="BLOCK"
 +DS_MAD="linstor_un"
 +TM_MAD="linstor_un"
 +EOT
 +</code>
 +<code>
 +onedatastore create system-ds.conf
 +onedatastore create images-ds.conf
 +</code>
 +===== Configure oneadmin SSH =====
 +<code>
 +su - oneadmin
 +</code>
 +<code>
 +ssh-keygen
 +cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
 +chown oneadmin:oneadmin ~/.ssh/authorized_keys
 +chmod 600 ~/.ssh/authorized_keys
 +</code>
 +<code>
 +cat << EOT > ~/.ssh/config
 +Host *
 +StrictHostKeyChecking no
 +ConnectTimeout 5
 +UserKnownHostsFile /dev/null
 +EOT
 +chmod 600 ~/.ssh/config
 +</code>
 +Now we need to copy it to all nodes. Set a password on the oneadmin user on all nodes first. When done you can disable the password on the back-end nodes by using the following command on all back-end nodes: passwd -d oneadmin
 +<code>
 +scp -r /var/lib/one/.ssh/ oneadmin@YOURHOST:/var/lib/one/
 +</code>
 +Check if you can login to all nodes as the oneadmin user. And do a reboot on the front-end node to make sure.
 +<code>
 +shutdown -r now
 +</code>
 +===== Move front-end VM to new cluster =====
 +I created the VM on a laptop and now I want to move it to a back-end node. In this case I move it to server1 and do not want to see it in Open Nebula.
  
 +Shutdown the VM and copy the qcow2 file to /var/lib/libvirt/images on the back-end server.
 +
 +Create a VM with virt-manager using the import exsisting volume. Make sure you connect it to the mgmt bridge.
 +
 +Enable boot on startup and reboot your back-end server. The VM should start automatically. Check with virt-manager on that server.
open_nebula_kvm_with_drbd.1582463268.txt.gz · Last modified: by herwarth