VorticPanel

Migrating

Migrating from VirtFusion or Virtualizor

Imports (/admin/imports) bring servers, packages, IP pools and customers over from VirtFusion or Virtualizor. Imports read the source panel’s API without changing anything, then copy or adopt each server.

Two ways to move a server

Copy Adopt
Where it ends up On one of your nodes Stays on the same hypervisor
Needs SSH as root from your node to the source hypervisor, and room on the node for the disk’s data while it copies This panel’s agent installed on the source hypervisor
Downtime A few minutes for a last pass of what changed, when the hypervisor has Python; otherwise while the whole disk copies One restart
What happens The disk is pulled over SSH while the server runs, then the server shuts down for a last pass and starts here with the same MAC and addresses The disk is renamed into the node’s storage (lvrename, zfs rename or a file rename) and the server restarts once
Rollback The copy goes, and the original starts again The original definition is put back

What comes across

With each server:

  • its size: CPU, memory and disk as it has them there, even when the package it’s mapped to is smaller
  • its disks: the first becomes the server’s own disk, and any others (up to 8) its additional disks
  • its MAC address and IP addresses, with the reverse DNS set on them
  • whether it was on: a server that was switched off stays off, and a suspended one stays suspended, with the reason Suspended on VirtFusion before it moved (or Virtualizor)
  • how it boots (BIOS or UEFI, with its boot entries) and its virtual hardware: chipset, disk bus, network card and video, and for Windows its clock and Hyper-V features too
  • its traffic used this period and its traffic limit (a limit other than its package’s stays its own every month, until it changes package), its port speeds, its name, and Virtualizor’s notes on it as a staff note. From VirtFusion, traffic is counted the way VirtFusion counted it (both ways, inbound only or outbound only), and the period ends on the day it would have there
  • VirtFusion’s protection from deletion, as delete protection
  • its owner: an account with the name the source has, and their saved SSH keys. From VirtFusion, the owner’s time zone comes too, and an owner tied to a WHMCS client keeps that client ID. A customer of a Virtualizor cloud user becomes a customer of the reseller you pick (see Resellers)

What doesn’t: snapshots and backups, its backup plan, firewall rules (for VirtFusion the dry run says which servers had them; your default firewall policies apply, as on a new server), an ISO in the CD drive (the dry run names it, so you can upload it here), a TPM chip, private networks, and the other users a VirtFusion server was shared with. IPv6 addresses work here once one of your IPv6 pools holds them; the dry run lists any that no pool does.

Customers whose account the import makes are emailed a link to choose a password, which lasts 7 days, with Email customers… on. Their services in WHMCS or Blesta move over with the billing module’s switch tool: see WHMCS and Blesta.

Step by step

1. Make an API credential on the source panel

  • VirtFusion: an API token (Settings → API).
  • Virtualizor: an admin API key and pass, from API Key Pairs (Configuration → API Credentials on older versions). Copy both in full; a key or pass Virtualizor doesn’t accept shows as “answered with its sign-in page”. If the key pair limits which addresses may use it, allow the controller’s address.

2. Start the import

Imports → New import. Pick the panel and enter its address, e.g. https://vz.example.com:4085, and the key (plus the pass for Virtualizor), then click Connect and discover. The address has to start with https://. For VirtFusion, use the name you open it at in your browser: it refuses requests sent to its IP address. The address can be on your private network, but not a link-local address such as 169.254.169.254. The source panel’s API port has to be open to the controller. While one import from a panel is unfinished, a second one from the same panel is refused: carry on with the first.

Give it a name if you like, such as Batch 2 or test import: it’s shown in the list of imports, at the top of the import and in the audit log, to tell imports from the same panel apart. Change or clear it at any time, even after the import has finished, with the pencil next to its title (or PATCH /admin/migrations/{id} with {"name": "…"}).

Virtualizor uses a self-signed certificate by default. The panel shows its SHA-256 fingerprint. Compare it on the Virtualizor server, then click It matches: trust it and connect:

openssl x509 -noout -fingerprint -sha256 -in <its certificate file>

3. Discovery

The import lists the source’s hypervisors, packages, IP pools and servers.

Until migrating starts, Discover again (top of the import) reads the source again, for example after you change something there or update this panel. The servers you picked, each server’s own choices, where each hypervisor’s servers go, hypervisors you left out, and each hypervisor’s confirmed host keys and SSH port (while its address stays the same) are kept; package and address mappings and decisions start afresh. Cancel import deletes an import nothing has moved in yet, with its saved API credentials, so you can start a new one from the same panel.

4. Map

Servers, at the top, lists every server the source has, each with a box: ticked servers are in this import, and the rest stay on the source for a later one. Every server starts ticked. Search by hostname, ID, IP address or email, and narrow the list by hypervisor, customer, package or IP range. The buttons above the list pick or leave out every server shown, and with a filter on, Import only these picks the servers shown and leaves out all the others. To bring one customer’s servers, for example, choose them under the customer filter and click Import only these. OpenVZ and LXC containers can’t be picked.

Everything below the list only asks about the servers picked: packages, IP ranges, hypervisors and decisions with no picked servers aren’t asked about, and nothing is checked on a hypervisor none of them are on. Then choose:

  • which of your packages each source package becomes. Not mapped keeps its servers on the source. Create “…” here as a new package (in the same list) makes one of your packages from the source’s: its name (spaces become dashes), CPU, memory, disk, monthly traffic and how it’s counted and reset (as its servers’ was), port speeds and IPv4 count, on the node groups its servers go to, with any storage tier. A package the source no longer sells is created hidden. Create all … here as new packages, above the list, does it for every package at once, after asking. Creating packages needs the Packages and templates permission; edit them afterwards under Packages like any other
  • what happens to each source IP range (see IP addresses below)
  • where each hypervisor’s servers go: a node group of yours. Copies are spread over its nodes by the group’s placement rule, one after another, as new orders are. The dry run shows the node each server goes to.
  • how to settle each conflict, such as an address range that overlaps one of yours
  • under How to move them: Copy to your nodes (the default) or Adopt in place (hypervisors that aren’t enrolled as your nodes are copied either way), whether to Email customers when their servers move (on by default), and how long to keep a rollback option: 3, 7 (the default) or 14 days after the last server moves
  • how copies are made, also under How to move them. When every hypervisor in the import is adopted, only Move … servers at once is shown:
    • Copy servers while they run (on by default). The disk comes across while the server keeps running, in chunks, and only the chunks that changed are sent again. The server is then shut down for a last pass of what changed since, and starts on your node. It’s offline for about as long as the hypervisor takes to read its disk once more, usually a few minutes. This needs Python (2.7 or 3) on the source hypervisor. AlmaLinux, Rocky, CentOS and Ubuntu have it already; where it’s missing, the copying node installs it there with the hypervisor’s own package manager when the first copy starts, and the job’s log says so. If it can’t be installed (no package repository reachable, for example), that hypervisor’s servers are shut down while their whole disk copies, as with this off.
    • Compress disks on the way (on by default). Empty space then takes almost no time. Over a 10 Gbit link between the hypervisor and your nodes, it can be faster off.
    • Move … servers at once (1 to 10, 3 by default) and Copy each at most … MB/s (no limit by default). A limit keeps the copies from crowding out the servers still running on the source hypervisor. The limit and compression apply to every copy, including servers copied while shut down.

The mapping page starts with a short list of what’s left before the dry run: servers to pick, where copies go, host keys to confirm, packages to map and decisions to make. Click one to go to it.

IP addresses

A copied server only keeps working on its old address if that range is routed to the node it’s copied to. Usually the range is routed to the source hypervisor, so ask your provider to move it first, or give the copies new addresses. For each source range, choose:

  • Keep the addresses: add as a new pool. Servers keep their addresses, and a pool for the range is added when its first server moves. Use this when the range is (or will be) routed to your nodes.
  • Give them new addresses from their new node. Each copy gets IPv4 addresses from the IP pools of the node it lands on; IPv6 addresses from the source are dropped. After the copy starts, the node switches the server over inside through its guest agent (qemu-guest-agent), the same way as when you move a server to a node outside its pools. If the guest has no agent, the import says so and the node keeps trying once one answers; until then, set the address from the console. With Email customers… on, owners are emailed their new addresses. The dry run checks there are enough free addresses on each node. Adopted servers always keep their addresses.
  • Keep the addresses: part of your pool …: only offered for your IPv4 pools that overlap the range (every IPv4 pool, when the source didn’t report the range). Servers keep their addresses.
  • Not mapped: servers with addresses in the range stay on the source.

A kept address has to be inside the range it’s imported with, and can’t be the gateway, network or broadcast address of any range the source reported or any of your IP pools. A kept IPv6 block has to be a /64 or narrower, can’t overlap another server’s, can’t be a node’s own address, and can’t hold a pool’s gateway. A server that breaks any of these rules is held back at the dry run.

Rolling a server back gives its new addresses back to the pool, and the original runs again with its old ones.

Owners who already have an account here

Servers only go into an existing account you chose. When an owner’s email already has an account in this panel, the import asks:

  • A customer: merge into that account, or import as a separate account (name+vf@… or name+vz@…).
  • A reseller: the same, and the choice says it’s a reseller’s account.
  • A staff member: their servers never go into the staff account itself. You can put them in that person’s own client area (the one Client area opens), or import them separately.

If the separate address is already taken by an account this import didn’t make, that choice isn’t offered. If imports@<source host> is taken, servers whose owner the source didn’t say can only stay on the source until you rename that account.

Servers whose owner the source didn’t say can be imported under a placeholder account and given to their real owners later: imports@<source host> for your own customers, and imports+<reseller ID>@<source host> for each reseller here their cloud users are mapped to. Servers of different resellers never share one. These accounts are locked: nobody signs in to them, they can’t be unlocked, and no email is sent to their addresses. Move each server to its owner’s account with Change owner.

Resellers

Virtualizor’s cloud users sell servers to customers of their own. When picked servers belong to such customers, the mapping page lists each cloud user under Resellers: choose which of your resellers their customers’ accounts are made under, or None (the default) to make them your own customers. A reseller here with the cloud user’s email is marked same email. Choosing one needs the Manage resellers and Manage accounts permissions. Add the reseller under Resellers first to keep them together. The cloud user’s own servers go to its own account, like any owner’s.

The dry run counts what the import adds to each reseller here (servers, vCPUs, memory, disk, IPv4 addresses and new customer accounts) against its terms, including servers merged into a reseller’s account or its customers’. If it would go over, starting says which limits and asks you to tick Import them anyway, past these limits. Through the API, starting answers 409 over_reseller_quota until it’s sent with "allowOverQuota": true.

Accounts are checked again at the dry run and when you start. If one was added since with an importing owner’s email, starting is refused and the conflict shows, waiting for your choice. A server whose owner gets an account here during the run fails instead of joining it, and stays on the source.

5. Give your nodes access (copy mode)

Check each source hypervisor’s SSH host key

Before your nodes connect to a source hypervisor, to send its root password or copy disks off it, you confirm it’s really that hypervisor. Under Check each source hypervisor’s SSH host key on the mapping page, click Check host key next to it. The nodes that will copy off it read the SSH host keys it shows them on its SSH port (nothing else is sent to it), and the panel lists each key’s type and SHA256 fingerprint.

Each hypervisor’s SSH port is shown beside its address: the one the source panel gave, or 22. If its SSH is on another port, click Change port and enter it before checking the host key. Every connection to that hypervisor uses it from then on, and it can be changed at any stage of the import. Through the API: PATCH /admin/migrations/{id} with {"sshPorts": {"<sourceNodeId>": 2222}}.

Then run this as root on the hypervisor itself, over its console or an SSH session you already trust:

for f in /etc/ssh/ssh_host_*_key.pub; do ssh-keygen -lf "$f"; done

If every fingerprint it prints is in the panel’s list, click They match, then Confirm keys (Confirm key when there’s one). If any differs, don’t confirm.

From then on, every connection to that hypervisor (adding keys with its password, the dry run, the copy, a rollback and taking the keys off again) only goes ahead while it shows a confirmed key. Until it’s confirmed, its servers are held back at the dry run, and Add keys with root password waits for it. If the copying nodes see different keys from each other, the panel says so and nothing can be confirmed. Through the API: GET /admin/migrations/{id}/host-keys/{sourceNodeId} reads the keys, and POST /admin/migrations/{id}/host-keys with {"sourceNodeId": "…", "fingerprints": ["SHA256:…"]} confirms them (only keys read in the last 30 minutes can be confirmed).

If the hypervisor later shows a different key (it was reinstalled, its host keys were replaced, or something else is answering), your nodes don’t connect. The import page says the key changed, staff with the Imports permission are notified, and its servers are held back until you check the new key and confirm it again the same way.

Let your nodes sign in

Copies are pulled over SSH as root, so the nodes that copy need their keys in /root/.ssh/authorized_keys on each source hypervisor. Under Let your nodes sign in to the source hypervisors on the mapping page:

  • Add keys with root password: enter root’s password for that hypervisor, once its host key is confirmed. A node that copies off it signs in once over SSH and adds every copying node’s key. Keys already there aren’t added twice. The password is used for that one sign-in and isn’t saved in the database, the logs or the audit log.
  • Or add them yourself: if root can’t sign in with a password there (PermitRootLogin prohibit-password, or PasswordAuthentication no in /etc/ssh/sshd_config), copy the one command shown and run it as root on each source hypervisor. It adds the same restricted lines as Add keys with root password, except that they don’t expire.

Either way, each key has a line of its own in authorized_keys, ending panel-import:<import ID>, which:

  • lets the key in only from that node’s own addresses (and, for the node that signs in with the root password, the address the hypervisor sees it come from);
  • lets it run commands only: no port, agent or X11 forwarding, and no terminal;
  • when added with Add keys with root password on OpenSSH 7.7 or later (AlmaLinux 8, Debian 10, Ubuntu 20.04 and newer), stops working 45 days after it was added. Older versions, such as CentOS 7’s, don’t know that setting, so their lines don’t have it, and neither do lines from the command under Or add them yourself.

With Add keys with root password, the same key already there without any of these (added by hand earlier, for example) is replaced by the restricted line; the rest of the file is left as it is. The keys come off again once the import no longer needs them (see Finish).

Then run the dry run: it checks every server from the node that will copy it.

For adopt mode, enroll the source hypervisor as a node of this panel instead. The import recognizes it by address: the hypervisor’s address in the source panel has to be the node’s management address or one of its own addresses. Virtualizor lists the server it’s installed on as localhost / 127.0.0.1; the import uses the panel’s address for it. Servers’ names aren’t used to recognize a node.

6. Dry run

The dry run checks every server from the node that will do the work:

  • its hypervisor shows the SSH host key you confirmed, and the node can log in over SSH
  • the domain exists
  • its disks are raw or qcow2, and read no other file. Its first disk becomes the server’s own, and up to 8 more come as its additional disks; adopted in place, they all have to be in the same storage, and a disk that’s a file has to be qcow2. VirtFusion’s cloud-init drive (/home/vf-data/server/<uuid>/cloud-drive.img) doesn’t count: it’s VirtFusion’s settings for the server, not its data, and stays on the source
  • how it boots: BIOS, or UEFI with or without Secure Boot. A UEFI server boots the same way on your node: its boot entries (its NVRAM file) come across with its disk. If your node’s UEFI firmware can’t read them (some older firmware builds store them differently), it starts with fresh ones and boots the disk’s standard UEFI loader, which Linux distributions and Windows all install. Once the disk is on your node, the node reads its partition table: a server the source panel set to UEFI whose disk has no EFI system partition (Virtualizor does this with some BIOS-only templates) couldn’t boot there either, so it starts with BIOS here, and the other way round. Its checks say when that happened
  • for a Windows server, the virtual hardware it has: its chipset (pc or q35), disk bus (VirtIO, SCSI, SATA or IDE), network card (VirtIO, Intel e1000/e1000e or Realtek), clock and Hyper-V features. It keeps all of them on your node, so Windows finds the same devices and boots with the drivers it already has. A server counts as Windows when the source panel says so, or when its definition has what only Windows guests are given (Hyper-V features, a clock on local time, or a Windows OS note). Its dry-run line names the hardware it keeps. Devices this panel doesn’t offer become the nearest one Windows has a driver for: QXL or Cirrus video becomes standard VGA, an IDE disk on the q35 chipset becomes SATA, and other network cards an Intel e1000
  • for VirtFusion, where the server’s definition is: VirtFusion runs its servers as transient libvirt domains, so libvirt only has a running one. A switched-off server’s definition is read from VirtFusion’s own folder (/home/vf-data/server/<uuid>/server.xml), and it’s copied while off and left off here. The import keeps each running domain’s definition before shutting it down, so after a failed copy or a rollback it creates the original again, running, the way VirtFusion would
  • what its MAC address is. It keeps it, unless it’s all zeros, a multicast address, or one another server in this panel or this import already has: then it gets a new one here, and its dry-run line says so. If its network settings name the old one, update them from the console
  • for an address it keeps, that this panel doesn’t already have it in use, reserved, as a customer’s floating IP, or on hold after being released. Such a server is marked for review and isn’t imported until the address is free or its range is renumbered
  • for an adopted server, that its disk’s path has no . or .. in it
  • whether its hypervisor has Python, so it can be copied while it runs

Each server shows how long it’s expected to be offline, and the top of the dry run how long the whole batch takes at the number of servers moving at once. These are estimates from the disk sizes: about a gigabit a second across the network, and for the last pass of a copy made while it runs, about 400 MB a second read from its disk.

Change on a server’s row sets choices for that server alone, over the mapping page’s: leave it on the source for a later import, copy or adopt it, copy it to a particular node (checked against that node’s room and its group’s limits), or give it another package. Use the mapping page’s settings takes them off again.

The dry run has the same search and filters as the mapping page. Tick servers to act on several at once: Leave out, Put back in, or Change…, where each setting left at Keep each server’s own stays as it is. The tabs split the servers into Ready, Review, Held back (something has to be fixed first) and Left out (staying on the source because you left them, or their hypervisor, out, or an earlier import moved them). Left-out servers aren’t checked on their hypervisor.

Fix anything it reports, such as freeing addresses in a pool or making room on a node. The dry run keeps itself up to date: servers are checked again as soon as you confirm a host key, add keys or change a server’s choices, and every 2 minutes while a check failed. Check all again now at the bottom checks every server at once, for example after changes made outside the panel. Your mappings are kept. A server added or removed on the source panel itself needs Discover again (top of the import) instead.

7. Migrate

Migrate … servers asks when to start: now, or at a time up to 30 days ahead (in your time zone, set under Account → Profile). With Email the customers… on, each customer is emailed now, at the address the other panel has for them, with the time, which of their servers move and how long they’ll be offline (the Server move scheduled template under Settings → Email templates). Customers who already have an account here also see it in the panel.

While it waits for its time or runs:

  • Start now starts a scheduled migration at once.
  • Pause stops more servers from starting; those already moving finish. Resume carries on.
  • Change pace sets how many servers move at once and each copy’s speed limit, for the servers that haven’t started yet.

During the run, each server shows its progress. A server that fails can be retried; retrying is safe. A copy that fails before the last pass leaves the original running as it was.

Each server shows its operating system under its name, on the dry run and here: what the source panel says it runs (marked per VirtFusion or per Virtualizor) until it runs on your node, then what its guest agent reports, as on the server’s own page.

Each server’s copy or adoption is also a job (kind Import) under Operations → Jobs, on the node doing the work and on the imported server’s page, with a live log of every command the node runs on the source hypervisor. When one fails, its job log shows exactly which step and what the source said. Each retry is a new job. The import as a whole stays on its own page under Imports: discovery, mapping and the dry run aren’t jobs.

8. Verify and roll back if needed

Each migrated server lists its checks with ✓ or ✗: it runs on its node, its first address answers ping, and, for a server given new addresses, that it switched to them inside. Failed checks run again every 2 minutes for 20 minutes, which covers a guest agent that’s still starting. Check again runs them at once: it switches the server to its new addresses first if it hasn’t yet, then runs the checks again. A node whose agent is older than the panel says so; update the agent on the node’s page first.

Windows guests: Windows may ask to be activated again after the move, as it does after any change of hardware; the server keeps its virtual hardware, which keeps that to a minimum. Windows blocks ping by default: for a Windows server, Remote Desktop (port 3389) answering counts as reachable too; with both off, check it from the console.

Each migrated server says how it was copied (while it ran, or shut down) and how long it was really offline.

Check each server works on the new side. Roll back removes a copy and starts the original again where it was; for an adopted server, it puts the disk and definition back as they were on the hypervisor and starts it there. Rolling back deletes the server here and needs the Terminate permission as well as Imports. A server that has been given to another account since the import can’t be rolled back, and neither can one that’s moving to another node or busy with a reinstall or restore: keep it here, or terminate it.

An imported server shows the operating system the source panel named (Virtualizor’s template, such as almalinux-9-x86_64, becomes “AlmaLinux 9”), or “Imported from …” when it didn’t say. Once the server’s guest agent (qemu-guest-agent) answers, the node reads the real one, such as “AlmaLinux 9.4”, and the panel shows that instead, within a minute. Staff with the Settings, root password and rescue permission can also click Detect OS next to Image on any running server’s Overview, for example after an upgrade inside it. Both are in the server’s activity and the audit log.

Once servers have moved, What’s left lists what’s still to do:

  • customers this import made an account for who haven’t chosen a password yet. Email them again sends each a new link (the old one stops working), at most once every 10 minutes
  • switching their services in your billing panel, with the WHMCS or Blesta module’s switch tool
  • the originals of copied servers, still on the source, switched off. Delete them there once you’re sure; until the rollback window closes, rolling back starts one again

9. Finish

Click Finish migration once no server is still moving and the health checks have run. It deletes the stored API credentials.

After that, the copying nodes’ keys come off each source hypervisor once nothing copied from it can be rolled back: at once if no server copied from it is left to roll back, otherwise once the last one is rolled back or the rollback window closes. Canceling an import takes them off too. Keys added with the command under Or add them yourself are taken off once a server has been copied off that hypervisor; if none ever was, take out the lines ending panel-import:<import ID> yourself. A copying node signs in with its key and takes out exactly the lines ending panel-import:<import ID>; it shows as a Remove import keys job under Operations → Jobs, with the node’s log. If no copying node can reach the hypervisor (it’s switched off, for example), the import isn’t held up: it’s tried again over about a day and a half, and if it still can’t be done, staff with the Imports permission are notified to take those lines out by hand.

10. Remove Virtualizor from adopted nodes (optional)

After a Virtualizor import with servers adopted in place, the finished import asks, for each of those nodes, whether to take Virtualizor off it. Keep Virtualizor leaves it alone. Yes, show me how offers two ways.

Remove Virtualizor now has the node’s agent do it. It changes nothing while libvirt still has a server that isn’t the panel’s, or a server uses a file in Virtualizor’s folders. It stops Virtualizor’s panel service and takes its lines out of root’s crontab (keeping a copy in /root/crontab-before-virtualizor-removal). Only when every bridge the servers plug into is in the node’s own network settings does it also turn off Virtualizor’s network service and move its folders to /root/virtualizor-removed-<time>; otherwise it leaves them and says why. It then checks the servers that were running still are and their bridges are still there, and if not, puts everything back and starts them again. Nothing is deleted. When it leaves them, it works out from the node exactly what to write so the node builds the bridge itself (same port, MAC and addresses, in netplan, /etc/network/interfaces or /etc/sysconfig/network-scripts), and shows the commands: they keep a copy of the old files in /root/network-before-<bridge>, write the new ones and, with netplan, check them with netplan generate. Don’t run netplan try or netplan apply: the bridge is already up, the new settings are for the next boot, and netplan can’t undo bridge settings. Where the bridge’s address now differs from your settings (Virtualizor often sets a wider netmask than the provider’s), it says so: the settings’ address is what the node gets from the next boot. After running them, Run it again finishes the job; then reboot the node with its console at hand.

Or run the commands yourself lists the same as commands to run as root on the node, one step at a time:

  1. See what Virtualizor runs there. This changes nothing.
  2. When the node’s servers plug into a bridge other than br-public (on Virtualizor nodes, viifbr0): check whether that bridge is in your network settings, or only built at boot by Virtualizor’s network service (virtnetwork).
  3. Stop Virtualizor’s panel and its cron jobs. The servers, libvirt and the network service keep running, and the step says how to undo it.
  4. Move its files (/usr/local/virtualizor, /usr/local/emps) to /root/virtualizor-removed. Only do this once the bridge check passes, or the servers lose their network at the next reboot. Delete the folder once the node has rebooted and its servers are back.

It warns first when servers are still on Virtualizor there, when Virtualizor’s own panel runs on the node (its other hypervisors lose it too), and while rollback is still open, since rolling back hands a server back to Virtualizor. The choice can be changed. Through the API: POST /admin/migrations/{id}/source-removal records it, and POST /admin/migrations/{id}/source-removal/run has the panel do it.

11. Remove VirtFusion from adopted nodes (optional)

After a VirtFusion import with servers adopted in place, the finished import asks the same question for each of those nodes, and offers the same two ways.

The node finds what VirtFusion left by its name: systemd services whose unit file names or mentions VirtFusion, Docker containers named after it (its control panel, when that runs on the node), cron jobs, the SSH key its control server signs in with (a line in /root/.ssh/authorized_keys that says virtfusion), and /opt/virtfusion. Run the first manual step, See what VirtFusion left here, to see the list before anything changes.

  • Remove VirtFusion now has the node’s agent do it. It changes nothing while libvirt still has a server that isn’t the panel’s (VirtFusion’s servers are transient, so that’s any of its servers still running there). It stops and disables VirtFusion’s services, stops its containers and keeps them from starting again (they aren’t deleted), takes its cron jobs and its control server’s SSH key out (copies in /root/crontab-before-virtfusion-removal and /root/authorized_keys-before-virtfusion-removal), and moves /opt/virtfusion and its unit and cron files to /root/virtfusion-removed-<time>. If a server stops or its bridge goes, everything is put back.
  • Never touched: libvirt, qemu, SSH, Docker itself, networking and this panel’s agent, even if their settings mention VirtFusion; and /home/vf-data, since adopted servers keep their disks in /home/vf-data/disk. The rest of /home/vf-data (VirtFusion’s cloud-init drives, ISOs and settings) isn’t used by this panel: delete it yourself once you’re sure, but never the disk folder.
  • When nothing has VirtFusion’s name, it says so and changes nothing. If its control server’s key isn’t marked, it says to look for it in authorized_keys yourself.
  • VirtFusion doesn’t build the servers’ bridge, but if that bridge isn’t in the node’s own network settings, it shows what to write so it comes back after a reboot, as for Virtualizor.

Moving a fleet a hypervisor at a time

Always connect to the source’s panel itself: Virtualizor’s master (the control server) or VirtFusion’s panel. That’s the only place with an API. An import lists every hypervisor it manages; the nodes themselves aren’t connected to separately.

  1. Under Servers on the mapping page, choose the hypervisor you’re moving now in the hypervisor filter and click Import only these. Every other hypervisor’s servers stay on the source.
  2. Migrate, verify and finish. Then take Virtualizor off that hypervisor if you like: a hypervisor that isn’t the master only loses Virtualizor’s node software.
  3. Start a new import from the same panel for the next hypervisor. Servers an earlier import moved are skipped (“Already moved by an earlier import”).
  4. Do the master last. The panel won’t take Virtualizor off the master while any server on its other hypervisors is still on Virtualizor: those servers would lose their panel, and later imports connect to it.

If something goes wrong

Collect:

  • the error text on the import page
  • the What VirtFusion’s API returned (or Virtualizor’s) text, at the bottom of the mapping page
  • journalctl -u panel-agent -n 100 from the node that did the work
Message Usual cause
“Confirm …’s SSH host key under Hypervisors on the mapping page” The source hypervisor’s host key hasn’t been confirmed yet. See Check each source hypervisor’s SSH host key
“… showed a different SSH host key from the one confirmed” The hypervisor was reinstalled or its host keys replaced, or something else is answering at its address. Check its key on the hypervisor itself, then confirm it again
“This node couldn’t read …’s SSH host keys on port …” The copying node can’t reach SSH on the source hypervisor on that port. If its SSH is on another port, set it with Change port. Otherwise see Files and ports.
“This node couldn’t log in to … over SSH” The copying node’s key isn’t in root’s authorized_keys on the source hypervisor. Use Add keys with root password on the mapping page. A copying node that reaches the source from an address that isn’t one of its own (through NAT, for example) isn’t let in by its line: in the command under Or add them yourself, add the address the hypervisor sees it come from to the from="…" list in that node’s line, then run it there
“This node couldn’t reach … on SSH port …” That port on the source hypervisor isn’t open to the copying node, or its SSH is on another port (set it with Change port). See Files and ports.
“root on … didn’t accept that password” The password is wrong, or root can’t sign in with a password there. Use Or add them yourself instead
“There isn’t room on this node to copy it” A copy lands in a file first: in the storage folder for folder storage, otherwise in /var/lib/panel-agent/state/imports (when the hypervisor has Python, a raw disk goes straight onto its volume instead). Runs of zeros take no room there. On folder storage the copy is then written out as the server’s disk beside itself, so it needs twice its room there for a while. The copy leaves a tenth of that disk, and at least 5 GB, free so the servers on it keep running, and a copy straight into an LVM thin pool or ZFS pool leaves the same share of that pool free (a thin pool counts as full as the fuller of its data and metadata). The copy is checked before it starts and stopped if the disk or pool runs short as it comes. Free some space there, then retry the server.
“… sent more than its … disk” The source hypervisor sent more than the size it gave for the disk (and a margin), so the copy was stopped. Check the disk on the source with qemu-img info, then retry the server.
“Python couldn’t be installed on …, so the server is shut down while it’s copied” (job log) The source hypervisor’s package manager couldn’t reach its repositories. The server was still copied, shut down. Once the hypervisor can install packages, the next copy from it installs Python and runs alongside its servers.
“The disk there (… bytes) is bigger than …” The disk on the source changed size since the dry run read it. Run the dry run again, then retry the server.
“OpenVZ or LXC container. Stays on the source panel.” Containers can’t run on KVM. They keep working on the source panel.
“A Windows server keeps its hardware, and …’s agent is too old to read it” The node doing the work runs an agent from before Windows imports. Update the agent on its node page, and the server is checked again within 2 minutes.
“This node has no UEFI firmware” A UEFI server is going to a node without OVMF, the UEFI firmware (nodes the install script set up have it; ones set up by hand may not). Install it there (apt-get install -y ovmf, or dnf install -y edk2-ovmf), then retry the server.

Every word has to appear. ↑ ↓ to move, Enter to open.