mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: improved error messages
Unrelated improvements that help to catch common pitfalls. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
15cab7ee6a
commit
4491a3e412
@@ -2617,6 +2617,15 @@ impl RequestHandler for Vmm {
|
||||
&mut self,
|
||||
receive_data_migration: VmReceiveMigrationData,
|
||||
) -> result::Result<(), MigratableError> {
|
||||
match &self.vm {
|
||||
VmOwnership::Owned(_vm) => {
|
||||
return Err(MigratableError::MigrateReceive(anyhow!(
|
||||
"Can't receive a migration when a VM is already created"
|
||||
)));
|
||||
}
|
||||
VmOwnership::None => {}
|
||||
}
|
||||
|
||||
receive_data_migration
|
||||
.validate()
|
||||
.context("Invalid receive migration configuration")
|
||||
@@ -2633,6 +2642,10 @@ impl RequestHandler for Vmm {
|
||||
receive_data_migration.tls_dir.as_deref(),
|
||||
)?;
|
||||
|
||||
if self.vm_config.is_some() {
|
||||
warn!("The existing VM config will be overwritten");
|
||||
}
|
||||
|
||||
event!("vm", "migration-receive-ready");
|
||||
|
||||
// Accept the connection and get the socket
|
||||
|
||||
Reference in New Issue
Block a user