Re: Triggering a checkpoint from inside the VM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I’ll try snapshot create, I didn’t know about that. 

I understand your security concerns, but they don’t apply in this case. The target environment is air gapped and isolated. I can’t see any reason to fear an attack on the VM before an attack on the host. 

2. Well, I was experimenting with getting libvirt out of the system to simplify things, but I didn’t have much luck yet. 

Sent from Workspace ONE Boxer

On September 9, 2021 at 1:20:38 AM PDT, Daniel P. Berrangé <berrange@xxxxxxxxxx> wrote:
On Wed, Sep 08, 2021 at 04:22:31AM +0000, Leek, Jim wrote:
> I'm on a RHEL 8 host, using virt-manager to run a CentOS 8 guest.  I need
> to be able to have a program on the guest trigger a checkpoint to save
> the guest.  I came up with a kludgy way to do this involving a script
> that ssh's to the host and runs 'virsh qemu-monitor-command --hmp
> centos8_1 "savevm savestate1"' and that works to some degree, but it
> takes a long time and sometimes I get an error.

This is a bad idea.

"savevm" completely stops execution of the guest for the duration
that it your ssh conenction is suspended. Depending
on how long this takes, your ssh connection may take some time to
recover, or in the worst case fail.

Using qemu-monitor-command is not neccessary because libvirt already
has support for savevm via its domain snapshot APIs epxosed in virsh
using snapshot-* commands. Using qemu-monitor-command in this case
is likely to confuse libvirt because it is resulting in unexpected
state changes in the guest.

Allowing the guest to ssh into the host and connect to libvirt
throws away any security isolation your host has from the guest.
So if your guest is compromised it'll easily take over the host

> So, I'm trying to think of ways to simplify the system.  If anyone has any ideas, I would love to have them.  All I can think of is:
>   1.  Connect to the qemu monitor with telnet from inside the VM.  (Therefore skipping the whole ssh remote command thing.)

Definitely don't want todo that - access to the QEMU monitor
again allows guest to attack the host in various ways. If
libvirt is connected to the QEMU monitor, you can't have a
second connection anyway.

|:;!!G2kpM7uM-TzIFchu!lFVFSs5C2w6Vt5mss2OePJAnR8QGxohw4OvKhWVxKNwxttCUfPD5f7tPKtVgtmY$       -o-;!!G2kpM7uM-TzIFchu!lFVFSs5C2w6Vt5mss2OePJAnR8QGxohw4OvKhWVxKNwxttCUfPD5f7tPzRsfC3g$  :|
|:;!!G2kpM7uM-TzIFchu!lFVFSs5C2w6Vt5mss2OePJAnR8QGxohw4OvKhWVxKNwxttCUfPD5f7tPsx80x1w$          -o-  ;!!G2kpM7uM-TzIFchu!lFVFSs5C2w6Vt5mss2OePJAnR8QGxohw4OvKhWVxKNwxttCUfPD5f7tPsGUnCCQ$  :|
|:;!!G2kpM7uM-TzIFchu!lFVFSs5C2w6Vt5mss2OePJAnR8QGxohw4OvKhWVxKNwxttCUfPD5f7tPTFrwcL0$     -o-;!!G2kpM7uM-TzIFchu!lFVFSs5C2w6Vt5mss2OePJAnR8QGxohw4OvKhWVxKNwxttCUfPD5f7tPe1eBb0E$  :|

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux