Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Need Script Made to save time
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Need Script Made to save time

randvegetarandvegeta Member, Host Rep

Hello all.

We use XEN for our VPS and there is a bug in it / our provisioning system.

Basically, when a node gets full, the provisioning system continues to attempt to build the VPS on the node. It fails because it's full, but the new VM actually exist on the node anyway, just does not start and doesnt have any virtual disks.

So our provisioning system was endlessly trying to create new VMs on a node that is now full, and there are several thousand (halted) VMs on the node.

There are so many VMs that XenCenter no longer works. I do not have a list of the VM UUIDs, but they can be found using the xe vm-list name-label= command.

I can basically only see/list 56 VMs at a time.

Can anyone write some sort of bash script that finds all the UUIDs (based on the server name) and then deletes the VMs?

Comments

  • drserverdrserver Member, Host Rep
    edited June 2018

    What provisioning system are you using ? Are you using Xen or Xenserver. We ended on PXE provisioning and that worked fine. Everything else was too buggy for Xenserver. Alternative is CloudStack or OpenStack

  • randvegetarandvegeta Member, Host Rep

    drserver said: What provisioning system are you using ? Are you using Xen or Xenserver

    NOC-PS and XenServer

  • drserverdrserver Member, Host Rep
    edited June 2018

    Yes, we had same issues with that combo.

  • randvegetarandvegeta Member, Host Rep

    drserver said: Yes, we had same issues with that combo.

    I manually deleted some 1,500 VMs and was finally able to access the server via XenCenter.

    Now attempting to delete all of the bad VMs, but it's hanging like crazy. Will see how it goes after 2 hours.

  • drserverdrserver Member, Host Rep

    We ended up with Virtualizor. Good luck

  • randvegetarandvegeta Member, Host Rep

    drserver said: We ended up with Virtualizor. Good luck

    I'm also using Virtualizor, but still have many that were originally setup with NOC-PS.

    BTW, are you using Virtualizor with XenServer? Or KVM?

  • drserverdrserver Member, Host Rep

    With booth, We do Xen, XenServer and KVM

  • ehhthingehhthing Member
    edited June 2018

    Whoops, ignore this.

  • @randvegeta said:
    Hello all.

    We use XEN for our VPS and there is a bug in it / our provisioning system.

    Basically, when a node gets full, the provisioning system continues to attempt to build the VPS on the node. It fails because it's full, but the new VM actually exist on the node anyway, just does not start and doesnt have any virtual disks.

    So our provisioning system was endlessly trying to create new VMs on a node that is now full, and there are several thousand (halted) VMs on the node.

    There are so many VMs that XenCenter no longer works. I do not have a list of the VM UUIDs, but they can be found using the xe vm-list name-label= command.

    I can basically only see/list 56 VMs at a time.

    Can anyone write some sort of bash script that finds all the UUIDs (based on the server name) and then deletes the VMs?

    I can help you with a bash script but before that, you should show me the output of xe vm-list command.

  • randvegetarandvegeta Member, Host Rep

    @WooServersHosting said:

    @randvegeta said:
    Hello all.

    We use XEN for our VPS and there is a bug in it / our provisioning system.

    Basically, when a node gets full, the provisioning system continues to attempt to build the VPS on the node. It fails because it's full, but the new VM actually exist on the node anyway, just does not start and doesnt have any virtual disks.

    So our provisioning system was endlessly trying to create new VMs on a node that is now full, and there are several thousand (halted) VMs on the node.

    There are so many VMs that XenCenter no longer works. I do not have a list of the VM UUIDs, but they can be found using the xe vm-list name-label= command.

    I can basically only see/list 56 VMs at a time.

    Can anyone write some sort of bash script that finds all the UUIDs (based on the server name) and then deletes the VMs?

    I can help you with a bash script but before that, you should show me the output of xe vm-list command.

    Already sorted this 2 weeks ago I'm afraid.

Sign In or Register to comment.