Lines Matching full:vm
21 # Test migration to file for taking an external snapshot with VM state.
34 iotests.VM() as vm:
38 iotests.log('=== Launch VM ===')
39 vm.add_object('iothread,id=iothread0')
40 vm.add_blockdev('file,filename=%s,node-name=base-file' % (base_path))
41 vm.add_blockdev('%s,file=base-file,node-name=base-fmt' % (iotests.imgfmt))
42 vm.add_device('virtio-blk,drive=base-fmt,iothread=iothread0,id=vda')
43 vm.launch()
45 vm.enable_migration_events('VM')
48 vm.qmp_log('migrate', uri='exec:cat > /dev/null')
51 vm.wait_migration('postmigrate')
54 iotests.log(vm.qmp('query-migrate')['return']['status'])
55 vm.qmp_log('query-status')
58 vm.blockdev_create({
63 vm.qmp_log('blockdev-add', node_name='top-file',
67 vm.blockdev_create({
72 vm.qmp_log('blockdev-add', node_name='top-fmt',
75 vm.qmp_log('blockdev-snapshot', node='base-fmt', overlay='top-fmt')
77 iotests.log('\n=== Resume the VM and simulate a write request ===')
78 vm.qmp_log('cont')
79 iotests.log(vm.hmp_qemu_io('-d vda/virtio-backend', 'write 4k 4k'))
82 result = vm.qmp_log('block-commit', job_id='job0', auto_dismiss=False,
86 vm.run_job('job0')